xref: /aoo42x/main/ucb/source/ucp/ftp/ftpintreq.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _FTP_FTPINTREQ_HXX
29 #define _FTP_FTPINTREQ_HXX
30 
31 #include <cppuhelper/weak.hxx>
32 #include <ucbhelper/macros.hxx>
33 #include <rtl/ustring.hxx>
34 #include <com/sun/star/uno/XInterface.hpp>
35 #include <com/sun/star/lang/XTypeProvider.hpp>
36 #include <com/sun/star/task/XInteractionDisapprove.hpp>
37 #include <com/sun/star/task/XInteractionApprove.hpp>
38 #include <com/sun/star/task/XInteractionRequest.hpp>
39 
40 
41 namespace ftp {
42 
43 
44     class XInteractionApproveImpl
45         : public cppu::OWeakObject,
46           public com::sun::star::lang::XTypeProvider,
47           public com::sun::star::task::XInteractionApprove
48     {
49     public:
50 
51         XInteractionApproveImpl();
52 
53         virtual com::sun::star::uno::Any SAL_CALL
54         queryInterface(
55             const com::sun::star::uno::Type& rType )
56             throw( com::sun::star::uno::RuntimeException);
57 
58         virtual void SAL_CALL
59         acquire(
60             void )
61             throw();
62 
63         virtual void SAL_CALL
64         release(
65             void )
66             throw();
67 
68 
69         // XTypeProvider
70 
71         XTYPEPROVIDER_DECL()
72 
73         virtual void SAL_CALL select()
74             throw (com::sun::star::uno::RuntimeException);
75 
76         bool isSelected() const;
77 
78     private:
79 
80         bool          m_bSelected;
81     };
82 
83 
84 
85 
86     class XInteractionDisapproveImpl
87         : public cppu::OWeakObject,
88           public com::sun::star::lang::XTypeProvider,
89           public com::sun::star::task::XInteractionDisapprove
90     {
91     public:
92 
93         XInteractionDisapproveImpl();
94 
95         virtual com::sun::star::uno::Any SAL_CALL
96         queryInterface(
97             const com::sun::star::uno::Type& rType )
98             throw( com::sun::star::uno::RuntimeException);
99 
100         virtual void SAL_CALL
101         acquire(
102             void )
103             throw();
104 
105         virtual void SAL_CALL
106         release(
107             void )
108             throw();
109 
110 
111         // XTypeProvider
112 
113         XTYPEPROVIDER_DECL()
114 
115         virtual void SAL_CALL select()
116             throw (com::sun::star::uno::RuntimeException);
117 
118     private:
119 
120         bool          m_bSelected;
121     };
122 
123 
124 
125     class XInteractionRequestImpl
126         : public cppu::OWeakObject,
127           public com::sun::star::lang::XTypeProvider,
128           public com::sun::star::task::XInteractionRequest
129     {
130     public:
131 
132         XInteractionRequestImpl(const rtl::OUString& aName);
133 
134         virtual com::sun::star::uno::Any SAL_CALL
135         queryInterface(
136             const com::sun::star::uno::Type& rType )
137             throw( com::sun::star::uno::RuntimeException);
138 
139         virtual void SAL_CALL
140         acquire(
141             void )
142             throw();
143 
144         virtual void SAL_CALL
145         release(
146             void )
147             throw();
148 
149 
150         // XTypeProvider
151 
152         XTYPEPROVIDER_DECL()
153 
154         com::sun::star::uno::Any SAL_CALL
155         getRequest(  )
156             throw (com::sun::star::uno::RuntimeException);
157 
158         com::sun::star::uno::Sequence<
159             com::sun::star::uno::Reference<
160             com::sun::star::task::XInteractionContinuation > > SAL_CALL
161         getContinuations(  )
162             throw (com::sun::star::uno::RuntimeException);
163 
164         bool approved() const;
165 
166     private:
167 
168         XInteractionApproveImpl* p1;
169         XInteractionDisapproveImpl* p2;
170 
171         rtl::OUString m_aName;
172 
173         com::sun::star::uno::Sequence<
174             com::sun::star::uno::Reference<
175             com::sun::star::task::XInteractionContinuation > > m_aSeq;
176     };
177 
178 }
179 
180 
181 #endif
182