1*7b6bd0c4SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*7b6bd0c4SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*7b6bd0c4SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*7b6bd0c4SAndrew Rist  * distributed with this work for additional information
6*7b6bd0c4SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*7b6bd0c4SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*7b6bd0c4SAndrew Rist  * "License"); you may not use this file except in compliance
9*7b6bd0c4SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*7b6bd0c4SAndrew Rist  *
11*7b6bd0c4SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*7b6bd0c4SAndrew Rist  *
13*7b6bd0c4SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*7b6bd0c4SAndrew Rist  * software distributed under the License is distributed on an
15*7b6bd0c4SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7b6bd0c4SAndrew Rist  * KIND, either express or implied.  See the License for the
17*7b6bd0c4SAndrew Rist  * specific language governing permissions and limitations
18*7b6bd0c4SAndrew Rist  * under the License.
19*7b6bd0c4SAndrew Rist  *
20*7b6bd0c4SAndrew Rist  *************************************************************/
21*7b6bd0c4SAndrew Rist 
22*7b6bd0c4SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _TREEVIEW_TVFACTORY_HXX_
25cdf0e10cSrcweir #define _TREEVIEW_TVFACTORY_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <rtl/ref.hxx>
28cdf0e10cSrcweir #include <rtl/ustring.hxx>
29cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
30cdf0e10cSrcweir #include <ucbhelper/macros.hxx>
31cdf0e10cSrcweir #include <com/sun/star/uno/XInterface.hpp>
32cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
33cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp>
34cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir 
37cdf0e10cSrcweir 
38cdf0e10cSrcweir namespace treeview {
39cdf0e10cSrcweir 
40cdf0e10cSrcweir 	class TVFactory:
41cdf0e10cSrcweir 		public cppu::OWeakObject,
42cdf0e10cSrcweir 		public com::sun::star::lang::XServiceInfo,
43cdf0e10cSrcweir 		public com::sun::star::lang::XTypeProvider,
44cdf0e10cSrcweir 		public com::sun::star::lang::XMultiServiceFactory
45cdf0e10cSrcweir 	{
46cdf0e10cSrcweir 	public:
47cdf0e10cSrcweir 
48cdf0e10cSrcweir 		TVFactory( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 		~TVFactory();
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 		// XInterface
53cdf0e10cSrcweir 		virtual com::sun::star::uno::Any SAL_CALL
54cdf0e10cSrcweir 		queryInterface(
55cdf0e10cSrcweir 			const com::sun::star::uno::Type& aType )
56cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException);
57cdf0e10cSrcweir 
58cdf0e10cSrcweir 		virtual void SAL_CALL
59cdf0e10cSrcweir 		acquire(
60cdf0e10cSrcweir 			void )
61cdf0e10cSrcweir 			throw();
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 		virtual void SAL_CALL
64cdf0e10cSrcweir 		release(
65cdf0e10cSrcweir 			void )
66cdf0e10cSrcweir 			throw();
67cdf0e10cSrcweir 
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 		// XTypeProvider
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 		XTYPEPROVIDER_DECL()
72cdf0e10cSrcweir 
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 		// XServiceInfo
75cdf0e10cSrcweir 		virtual rtl::OUString SAL_CALL
76cdf0e10cSrcweir 		getImplementationName(
77cdf0e10cSrcweir 			void )
78cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 		virtual sal_Bool SAL_CALL
81cdf0e10cSrcweir 		supportsService(
82cdf0e10cSrcweir 			const rtl::OUString& ServiceName )
83cdf0e10cSrcweir 			throw(com::sun::star::uno::RuntimeException );
84cdf0e10cSrcweir 
85cdf0e10cSrcweir 		virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
86cdf0e10cSrcweir 		getSupportedServiceNames(
87cdf0e10cSrcweir 			void )
88cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
89cdf0e10cSrcweir 
90cdf0e10cSrcweir 		// XMultiServiceFactory
91cdf0e10cSrcweir 
92cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL
93cdf0e10cSrcweir 		createInstance(
94cdf0e10cSrcweir 			const rtl::OUString& aServiceSpecifier )
95cdf0e10cSrcweir 			throw( com::sun::star::uno::Exception,
96cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException );
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 		virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL
99cdf0e10cSrcweir 		createInstanceWithArguments(
100cdf0e10cSrcweir 			const rtl::OUString& ServiceSpecifier,
101cdf0e10cSrcweir 			const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& Arguments )
102cdf0e10cSrcweir 			throw( com::sun::star::uno::Exception,
103cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException);
104cdf0e10cSrcweir 
105cdf0e10cSrcweir 		virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
106cdf0e10cSrcweir 		getAvailableServiceNames( )
107cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
108cdf0e10cSrcweir 
109cdf0e10cSrcweir 		// Other
110cdf0e10cSrcweir 
111cdf0e10cSrcweir 		static rtl::OUString SAL_CALL getImplementationName_static();
112cdf0e10cSrcweir 
113cdf0e10cSrcweir 		static com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames_static();
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 		static com::sun::star::uno::Reference< com::sun::star::lang::XSingleServiceFactory > SAL_CALL
116cdf0e10cSrcweir 		createServiceFactory(
117cdf0e10cSrcweir 			const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxServiceMgr );
118cdf0e10cSrcweir 
119cdf0e10cSrcweir 		static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL
120cdf0e10cSrcweir 		CreateInstance(
121cdf0e10cSrcweir 			const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMultiServiceFactory );
122cdf0e10cSrcweir 
123cdf0e10cSrcweir 
124cdf0e10cSrcweir 	private:
125cdf0e10cSrcweir 
126cdf0e10cSrcweir 		// Members
127cdf0e10cSrcweir 		com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >  m_xMSF;
128cdf0e10cSrcweir 		com::sun::star::uno::Reference< com::sun::star::uno::XInterface >             m_xHDS;
129cdf0e10cSrcweir 	};
130cdf0e10cSrcweir 
131cdf0e10cSrcweir }
132cdf0e10cSrcweir 
133cdf0e10cSrcweir 
134cdf0e10cSrcweir #endif
135