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_UIFACTORY_WINDOWCONTENTFACTORYMANAGER_HXX_
25 #define __FRAMEWORK_UIFACTORY_WINDOWCONTENTFACTORYMANAGER_HXX_
26 
27 /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble
28                with solaris headers ...
29 */
30 #include <vector>
31 #include <list>
32 
33 //_________________________________________________________________________________________________________________
34 //	my own includes
35 //_________________________________________________________________________________________________________________
36 #include <threadhelp/threadhelpbase.hxx>
37 #include <macros/generic.hxx>
38 #include <macros/xinterface.hxx>
39 #include <macros/xtypeprovider.hxx>
40 #include <macros/xserviceinfo.hxx>
41 #include <stdtypes.h>
42 
43 //_________________________________________________________________________________________________________________
44 //	interface includes
45 //_________________________________________________________________________________________________________________
46 #include <com/sun/star/lang/XServiceInfo.hpp>
47 #include <com/sun/star/container/XNameAccess.hpp>
48 #include "com/sun/star/frame/XModuleManager.hpp"
49 
50 //_________________________________________________________________________________________________________________
51 //	other includes
52 //_________________________________________________________________________________________________________________
53 #include <cppuhelper/implbase2.hxx>
54 #include <rtl/ustring.hxx>
55 
56 namespace framework
57 {
58 
59 class ConfigurationAccess_FactoryManager;
60 class WindowContentFactoryManager : private ThreadHelpBase							              ,	// Struct for right initalization of mutex member! Must be first of baseclasses.
61 						            public ::cppu::WeakImplHelper2< com::sun::star::lang::XServiceInfo		              ,
62                                                              com::sun::star::lang::XSingleComponentFactory>
63 {
64 	public:
65 		WindowContentFactoryManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
66 		virtual ~WindowContentFactoryManager();
67 
68         //  XInterface, XTypeProvider, XServiceInfo
69 		DECLARE_XSERVICEINFO
70 
71 		// XSingleComponentFactory
72 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithContext( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
73 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
74 
75         static void RetrieveTypeNameFromResourceURL( const ::rtl::OUString& aResourceURL, rtl::OUString& aType, rtl::OUString& aName );
76 	private:
77 
78         sal_Bool                                                                         m_bConfigRead;
79         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
80         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager >      m_xModuleManager;
81         ConfigurationAccess_FactoryManager*                                 m_pConfigAccess;
82 };
83 
84 } // namespace framework
85 
86 #endif // __FRAMEWORK_UIFACTORY_WINDOWCONTENTFACTORYMANAGER_HXX_
87