xref: /trunk/main/ucb/source/ucp/ftp/ftpintreq.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _FTP_FTPINTREQ_HXX
25 #define _FTP_FTPINTREQ_HXX
26 
27 #include <cppuhelper/weak.hxx>
28 #include <ucbhelper/macros.hxx>
29 #include <rtl/ustring.hxx>
30 #include <com/sun/star/uno/XInterface.hpp>
31 #include <com/sun/star/lang/XTypeProvider.hpp>
32 #include <com/sun/star/task/XInteractionDisapprove.hpp>
33 #include <com/sun/star/task/XInteractionApprove.hpp>
34 #include <com/sun/star/task/XInteractionRequest.hpp>
35 
36 
37 namespace ftp {
38 
39 
40     class XInteractionApproveImpl
41         : public cppu::OWeakObject,
42           public com::sun::star::lang::XTypeProvider,
43           public com::sun::star::task::XInteractionApprove
44     {
45     public:
46 
47         XInteractionApproveImpl();
48 
49         virtual com::sun::star::uno::Any SAL_CALL
50         queryInterface(
51             const com::sun::star::uno::Type& rType );
52 
53         virtual void SAL_CALL
54         acquire(
55             void )
56             throw();
57 
58         virtual void SAL_CALL
59         release(
60             void )
61             throw();
62 
63 
64         // XTypeProvider
65 
66         XTYPEPROVIDER_DECL()
67 
68         virtual void SAL_CALL select();
69 
70         bool isSelected() const;
71 
72     private:
73 
74         bool          m_bSelected;
75     };
76 
77 
78 
79 
80     class XInteractionDisapproveImpl
81         : public cppu::OWeakObject,
82           public com::sun::star::lang::XTypeProvider,
83           public com::sun::star::task::XInteractionDisapprove
84     {
85     public:
86 
87         XInteractionDisapproveImpl();
88 
89         virtual com::sun::star::uno::Any SAL_CALL
90         queryInterface(
91             const com::sun::star::uno::Type& rType );
92 
93         virtual void SAL_CALL
94         acquire(
95             void )
96             throw();
97 
98         virtual void SAL_CALL
99         release(
100             void )
101             throw();
102 
103 
104         // XTypeProvider
105 
106         XTYPEPROVIDER_DECL()
107 
108         virtual void SAL_CALL select();
109 
110     private:
111 
112         bool          m_bSelected;
113     };
114 
115 
116 
117     class XInteractionRequestImpl
118         : public cppu::OWeakObject,
119           public com::sun::star::lang::XTypeProvider,
120           public com::sun::star::task::XInteractionRequest
121     {
122     public:
123 
124         XInteractionRequestImpl(const rtl::OUString& aName);
125 
126         virtual com::sun::star::uno::Any SAL_CALL
127         queryInterface(
128             const com::sun::star::uno::Type& rType );
129 
130         virtual void SAL_CALL
131         acquire(
132             void )
133             throw();
134 
135         virtual void SAL_CALL
136         release(
137             void )
138             throw();
139 
140 
141         // XTypeProvider
142 
143         XTYPEPROVIDER_DECL()
144 
145         com::sun::star::uno::Any SAL_CALL
146         getRequest(  );
147 
148         com::sun::star::uno::Sequence<
149             com::sun::star::uno::Reference<
150             com::sun::star::task::XInteractionContinuation > > SAL_CALL
151         getContinuations(  );
152 
153         bool approved() const;
154 
155     private:
156 
157         XInteractionApproveImpl* p1;
158         XInteractionDisapproveImpl* p2;
159 
160         rtl::OUString m_aName;
161 
162         com::sun::star::uno::Sequence<
163             com::sun::star::uno::Reference<
164             com::sun::star::task::XInteractionContinuation > > m_aSeq;
165     };
166 
167 }
168 
169 
170 #endif
171