xref: /trunk/main/ucb/source/ucp/ftp/ftpintreq.hxx (revision 6df1ea1f)
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             throw( com::sun::star::uno::RuntimeException);
53 
54         virtual void SAL_CALL
55         acquire(
56             void )
57             throw();
58 
59         virtual void SAL_CALL
60         release(
61             void )
62             throw();
63 
64 
65         // XTypeProvider
66 
67         XTYPEPROVIDER_DECL()
68 
69         virtual void SAL_CALL select()
70             throw (com::sun::star::uno::RuntimeException);
71 
72         bool isSelected() const;
73 
74     private:
75 
76         bool          m_bSelected;
77     };
78 
79 
80 
81 
82     class XInteractionDisapproveImpl
83         : public cppu::OWeakObject,
84           public com::sun::star::lang::XTypeProvider,
85           public com::sun::star::task::XInteractionDisapprove
86     {
87     public:
88 
89         XInteractionDisapproveImpl();
90 
91         virtual com::sun::star::uno::Any SAL_CALL
92         queryInterface(
93             const com::sun::star::uno::Type& rType )
94             throw( com::sun::star::uno::RuntimeException);
95 
96         virtual void SAL_CALL
97         acquire(
98             void )
99             throw();
100 
101         virtual void SAL_CALL
102         release(
103             void )
104             throw();
105 
106 
107         // XTypeProvider
108 
109         XTYPEPROVIDER_DECL()
110 
111         virtual void SAL_CALL select()
112             throw (com::sun::star::uno::RuntimeException);
113 
114     private:
115 
116         bool          m_bSelected;
117     };
118 
119 
120 
121     class XInteractionRequestImpl
122         : public cppu::OWeakObject,
123           public com::sun::star::lang::XTypeProvider,
124           public com::sun::star::task::XInteractionRequest
125     {
126     public:
127 
128         XInteractionRequestImpl(const rtl::OUString& aName);
129 
130         virtual com::sun::star::uno::Any SAL_CALL
131         queryInterface(
132             const com::sun::star::uno::Type& rType )
133             throw( com::sun::star::uno::RuntimeException);
134 
135         virtual void SAL_CALL
136         acquire(
137             void )
138             throw();
139 
140         virtual void SAL_CALL
141         release(
142             void )
143             throw();
144 
145 
146         // XTypeProvider
147 
148         XTYPEPROVIDER_DECL()
149 
150         com::sun::star::uno::Any SAL_CALL
151         getRequest(  )
152             throw (com::sun::star::uno::RuntimeException);
153 
154         com::sun::star::uno::Sequence<
155             com::sun::star::uno::Reference<
156             com::sun::star::task::XInteractionContinuation > > SAL_CALL
157         getContinuations(  )
158             throw (com::sun::star::uno::RuntimeException);
159 
160         bool approved() const;
161 
162     private:
163 
164         XInteractionApproveImpl* p1;
165         XInteractionDisapproveImpl* p2;
166 
167         rtl::OUString m_aName;
168 
169         com::sun::star::uno::Sequence<
170             com::sun::star::uno::Reference<
171             com::sun::star::task::XInteractionContinuation > > m_aSeq;
172     };
173 
174 }
175 
176 
177 #endif
178