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_ACCELERATORS_MODULEACCELERATORCONFIGURATION_HXX_
25 #define __FRAMEWORK_ACCELERATORS_MODULEACCELERATORCONFIGURATION_HXX_
26 
27 //__________________________________________
28 // own includes
29 
30 #include <accelerators/acceleratorconfiguration.hxx>
31 #include <accelerators/presethandler.hxx>
32 
33 #ifndef __FRAMEWORK_MACROS_XINTERFACE_HXX_
34 #include <macros/interface.hxx>
35 #endif
36 #include <macros/xtypeprovider.hxx>
37 #include <macros/xserviceinfo.hxx>
38 
39 //__________________________________________
40 // interface includes
41 #include <com/sun/star/lang/XInitialization.hpp>
42 
43 //__________________________________________
44 // other includes
45 
46 //__________________________________________
47 // definition
48 
49 namespace framework
50 {
51 
52 //__________________________________________
53 /**
54     implements a read/write access to a module
55     dependend accelerator configuration.
56  */
57 class ModuleAcceleratorConfiguration : public XCUBasedAcceleratorConfiguration
58                                      , public css::lang::XServiceInfo
59                                      , public css::lang::XInitialization
60 {
61     //______________________________________
62     // member
63 
64     private:
65 
66         //----------------------------------
67         /** identify the application module, where this accelerator
68             configuration cache should work on. */
69         ::rtl::OUString m_sModule;
70 		::rtl::OUString m_sLocale;
71 
72     //______________________________________
73     // interface
74 
75     public:
76 
77         //----------------------------------
78         /** initialize this instance and fill the internal cache.
79 
80             @param  xSMGR
81                     reference to an uno service manager, which is used internaly.
82          */
83         ModuleAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR);
84 
85         //----------------------------------
86         /** TODO */
87         virtual ~ModuleAcceleratorConfiguration();
88 
89         // XInterface, XTypeProvider, XServiceInfo
90         FWK_DECLARE_XINTERFACE
91         FWK_DECLARE_XTYPEPROVIDER
92         DECLARE_XSERVICEINFO
93 
94         // XInitialization
95         virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any >& lArguments)
96             throw(css::uno::Exception       ,
97                   css::uno::RuntimeException);
98 
99         // XComponent
100         virtual  void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
101 
102     //______________________________________
103     // helper
104 
105     private:
106 
107         //----------------------------------
108         /** read all data into the cache. */
109         void impl_ts_fillCache();
110 };
111 
112 } // namespace framework
113 
114 #endif // __FRAMEWORK_ACCELERATORS_MODULEACCELERATORCONFIGURATION_HXX_
115