1f8e07b45SAndrew Rist /**************************************************************
2*dccf82beSAriel Constenla-Haile  *
3f8e07b45SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4f8e07b45SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5f8e07b45SAndrew Rist  * distributed with this work for additional information
6f8e07b45SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7f8e07b45SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8f8e07b45SAndrew Rist  * "License"); you may not use this file except in compliance
9f8e07b45SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*dccf82beSAriel Constenla-Haile  *
11f8e07b45SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*dccf82beSAriel Constenla-Haile  *
13f8e07b45SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14f8e07b45SAndrew Rist  * software distributed under the License is distributed on an
15f8e07b45SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f8e07b45SAndrew Rist  * KIND, either express or implied.  See the License for the
17f8e07b45SAndrew Rist  * specific language governing permissions and limitations
18f8e07b45SAndrew Rist  * under the License.
19*dccf82beSAriel Constenla-Haile  *
20f8e07b45SAndrew Rist  *************************************************************/
21f8e07b45SAndrew Rist 
22*dccf82beSAriel Constenla-Haile #ifndef __FRAMEWORK_UICONTROLLERFACTORY_HXX_
23*dccf82beSAriel Constenla-Haile #define __FRAMEWORK_UICONTROLLERFACTORY_HXX_
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #include <threadhelp/threadhelpbase.hxx>
26cdf0e10cSrcweir #include <macros/generic.hxx>
27cdf0e10cSrcweir #include <macros/xinterface.hxx>
28cdf0e10cSrcweir #include <macros/xtypeprovider.hxx>
29cdf0e10cSrcweir #include <macros/xserviceinfo.hxx>
30cdf0e10cSrcweir #include <stdtypes.h>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
33cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp>
34*dccf82beSAriel Constenla-Haile #include <com/sun/star/frame/XUIControllerFactory.hpp>
35cdf0e10cSrcweir 
36*dccf82beSAriel Constenla-Haile #include <cppuhelper/implbase2.hxx>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir namespace framework
39cdf0e10cSrcweir {
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class ConfigurationAccess_ControllerFactory;
42*dccf82beSAriel Constenla-Haile class UIControllerFactory :  protected ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses.
43*dccf82beSAriel Constenla-Haile                              public ::cppu::WeakImplHelper2<
44*dccf82beSAriel Constenla-Haile                                  com::sun::star::lang::XServiceInfo,
45*dccf82beSAriel Constenla-Haile                                  com::sun::star::frame::XUIControllerFactory >
46cdf0e10cSrcweir {
47*dccf82beSAriel Constenla-Haile     public:
48*dccf82beSAriel Constenla-Haile         virtual ~UIControllerFactory();
49cdf0e10cSrcweir 
50*dccf82beSAriel Constenla-Haile         // XServiceInfo
51*dccf82beSAriel Constenla-Haile         virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException) = 0;
52*dccf82beSAriel Constenla-Haile         virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0;
53*dccf82beSAriel Constenla-Haile         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException) = 0;
54cdf0e10cSrcweir 
55cdf0e10cSrcweir         // XMultiComponentFactory
56cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithContext( const ::rtl::OUString& aServiceSpecifier, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
57cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( const ::rtl::OUString& ServiceSpecifier, 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);
58cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames() throw (::com::sun::star::uno::RuntimeException);
59cdf0e10cSrcweir 
60cdf0e10cSrcweir         // XUIControllerRegistration
61cdf0e10cSrcweir         virtual sal_Bool SAL_CALL hasController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException);
62cdf0e10cSrcweir         virtual void SAL_CALL registerController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName, const ::rtl::OUString& aControllerImplementationName ) throw (::com::sun::star::uno::RuntimeException);
63cdf0e10cSrcweir         virtual void SAL_CALL deregisterController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException);
64cdf0e10cSrcweir 
65cdf0e10cSrcweir     protected:
66*dccf82beSAriel Constenla-Haile         UIControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager, const rtl::OUString &rUINode  );
67cdf0e10cSrcweir         sal_Bool                                                                         m_bConfigRead;
68cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
69cdf0e10cSrcweir         ConfigurationAccess_ControllerFactory*                                           m_pConfigAccess;
70cdf0e10cSrcweir };
71cdf0e10cSrcweir 
72*dccf82beSAriel Constenla-Haile class PopupMenuControllerFactory :  public UIControllerFactory
73*dccf82beSAriel Constenla-Haile {
74*dccf82beSAriel Constenla-Haile     public:
75*dccf82beSAriel Constenla-Haile         PopupMenuControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
76*dccf82beSAriel Constenla-Haile 
77*dccf82beSAriel Constenla-Haile         //  XInterface, XTypeProvider, XServiceInfo
78*dccf82beSAriel Constenla-Haile         DECLARE_XSERVICEINFO
79*dccf82beSAriel Constenla-Haile };
80*dccf82beSAriel Constenla-Haile 
81*dccf82beSAriel Constenla-Haile class ToolbarControllerFactory :  public UIControllerFactory
82*dccf82beSAriel Constenla-Haile {
83*dccf82beSAriel Constenla-Haile     public:
84*dccf82beSAriel Constenla-Haile         ToolbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
85*dccf82beSAriel Constenla-Haile 
86*dccf82beSAriel Constenla-Haile         //  XInterface, XTypeProvider, XServiceInfo
87*dccf82beSAriel Constenla-Haile         DECLARE_XSERVICEINFO
88*dccf82beSAriel Constenla-Haile };
89*dccf82beSAriel Constenla-Haile 
90*dccf82beSAriel Constenla-Haile class StatusbarControllerFactory :  public UIControllerFactory
91*dccf82beSAriel Constenla-Haile {
92*dccf82beSAriel Constenla-Haile     public:
93*dccf82beSAriel Constenla-Haile         StatusbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
94*dccf82beSAriel Constenla-Haile 
95*dccf82beSAriel Constenla-Haile         //  XInterface, XTypeProvider, XServiceInfo
96*dccf82beSAriel Constenla-Haile         DECLARE_XSERVICEINFO
97*dccf82beSAriel Constenla-Haile };
98*dccf82beSAriel Constenla-Haile 
99*dccf82beSAriel Constenla-Haile }
100cdf0e10cSrcweir 
101*dccf82beSAriel Constenla-Haile #endif // __FRAMEWORK_UICONTROLLERFACTORY_HXX_
102