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 __FRAMEWORK_SERVICES_URLTRANSFORMER_HXX_
25 #define __FRAMEWORK_SERVICES_URLTRANSFORMER_HXX_
26 
27 //_________________________________________________________________________________________________________________
28 //	my own includes
29 //_________________________________________________________________________________________________________________
30 
31 #ifndef __FRAMEWORK_OMUTEXMEMBER_HXX_
32 #include <threadhelp/threadhelpbase.hxx>
33 #endif
34 #include <macros/generic.hxx>
35 #include <macros/debug.hxx>
36 #include <macros/xinterface.hxx>
37 #include <macros/xtypeprovider.hxx>
38 #include <macros/xserviceinfo.hxx>
39 #include <general.h>
40 
41 //_________________________________________________________________________________________________________________
42 //	interface includes
43 //_________________________________________________________________________________________________________________
44 #include <com/sun/star/util/XURLTransformer.hpp>
45 #include <com/sun/star/util/URL.hpp>
46 
47 //_________________________________________________________________________________________________________________
48 //	other includes
49 //_________________________________________________________________________________________________________________
50 #include <cppuhelper/implbase2.hxx>
51 
52 //_________________________________________________________________________________________________________________
53 //	namespace
54 //_________________________________________________________________________________________________________________
55 
56 namespace framework{
57 
58 //_________________________________________________________________________________________________________________
59 //	exported const
60 //_________________________________________________________________________________________________________________
61 
62 //_________________________________________________________________________________________________________________
63 //	exported definitions
64 //_________________________________________________________________________________________________________________
65 
66 /*-************************************************************************************************************//**
67 	@short
68 
69 	@descr		-
70 
71 	@implements	XInterface
72 				XTypeProvider
73 				XServiceInfo
74 				XURLTransformer
75 
76 	@base		ThreadHelpBase
77 				OWeakObject
78 *//*-*************************************************************************************************************/
79 
80 class URLTransformer	:	public ::cppu::WeakImplHelper2< ::com::sun::star::util::XURLTransformer, css::lang::XServiceInfo>
81 {
82 	//-------------------------------------------------------------------------------------------------------------
83 	//	public methods
84 	//-------------------------------------------------------------------------------------------------------------
85 
86 	public:
87 
88 		//---------------------------------------------------------------------------------------------------------
89 		//	constructor / destructor
90 		//---------------------------------------------------------------------------------------------------------
91 
92 		/*-****************************************************************************************************//**
93 			@short		-
94 			@descr		-
95 
96 			@seealso	-
97 
98 			@param		-
99 			@return		-
100 
101 			@onerror	-
102 		*//*-*****************************************************************************************************/
103 
104 	 	URLTransformer( const css::uno::Reference< css::lang::XMultiServiceFactory >& sFactory );
105 
106 		/*-****************************************************************************************************//**
107 			@short		-
108 			@descr		-
109 
110 			@seealso	-
111 
112 			@param		-
113 			@return		-
114 
115 			@onerror	-
116 		*//*-*****************************************************************************************************/
117 
118 		virtual	~URLTransformer();
119 
120 		//---------------------------------------------------------------------------------------------------------
121 		//	XInterface, XTypeProvider, XServiceInfo
122 		//---------------------------------------------------------------------------------------------------------
123 
124 		DECLARE_XSERVICEINFO
125 
126 		//---------------------------------------------------------------------------------------------------------
127 		//	XURLTransformer
128 		//---------------------------------------------------------------------------------------------------------
129 
130 		/*-****************************************************************************************************//**
131 			@short		-
132 			@descr		-
133 
134 			@seealso	-
135 
136 			@param		-
137 			@return		-
138 
139 			@onerror	-
140 		*//*-*****************************************************************************************************/
141 
142     	virtual sal_Bool SAL_CALL parseStrict( css::util::URL& aURL ) throw( css::uno::RuntimeException );
143 
144 		/*-****************************************************************************************************//**
145 			@short		-
146 			@descr		-
147 
148 			@seealso	-
149 
150 			@param		-
151 			@return		-
152 
153 			@onerror	-
154 		*//*-*****************************************************************************************************/
155 
156     	virtual sal_Bool SAL_CALL parseSmart(			css::util::URL&		aURL			,
157 												const	::rtl::OUString&	sSmartProtocol	) throw( css::uno::RuntimeException );
158 
159 		/*-****************************************************************************************************//**
160 			@short		-
161 			@descr		-
162 
163 			@seealso	-
164 
165 			@param		-
166 			@return		-
167 
168 			@onerror	-
169 		*//*-*****************************************************************************************************/
170 
171     	virtual sal_Bool SAL_CALL assemble( css::util::URL& aURL ) throw( css::uno::RuntimeException );
172 
173 		/*-****************************************************************************************************//**
174 			@short		-
175 			@descr		-
176 
177 			@seealso	-
178 
179 			@param		-
180 			@return		-
181 
182 			@onerror	-
183 		*//*-*****************************************************************************************************/
184 
185     	virtual ::rtl::OUString SAL_CALL getPresentation(	const	css::util::URL&		aURL			,
186 																	sal_Bool			bWithPassword	) throw( css::uno::RuntimeException );
187 
188 	//-------------------------------------------------------------------------------------------------------------
189 	//	protected methods
190 	//-------------------------------------------------------------------------------------------------------------
191 
192 	protected:
193 
194 	//-------------------------------------------------------------------------------------------------------------
195 	//	private methods
196 	//-------------------------------------------------------------------------------------------------------------
197 
198 	private:
199 
200 	//-------------------------------------------------------------------------------------------------------------
201 	//	debug methods
202 	//	(should be private everyway!)
203 	//-------------------------------------------------------------------------------------------------------------
204 
205 
206 	//-------------------------------------------------------------------------------------------------------------
207 	//	variables
208 	//	(should be private everyway!)
209 	//-------------------------------------------------------------------------------------------------------------
210 
211 	private:
212 
213 		css::uno::Reference< css::lang::XMultiServiceFactory >		m_xFactory			;	/// reference to factory, which has created this instance
214 
215 };		//	class URLTransformer
216 
217 }		//	namespace framework
218 
219 #endif	//	#ifndef __FRAMEWORK_SERVICES_URLTRANSFORMER_HXX_
220