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 FORMS_SOLAR_DISPATCHER_HXX
25 #define FORMS_SOLAR_DISPATCHER_HXX
26 
27 #include <rtl/ustring.hxx>
28 
29 //.........................................................................
30 namespace frm
31 {
32 //.........................................................................
33 
34     //=========================================================================
35     //= IFeatureDispatcher
36     //=========================================================================
37     class IFeatureDispatcher
38     {
39     public:
40         /** dispatches a feature
41 
42             @param _nFeatureId
43                 the id of the feature to dispatch
44         */
45         virtual void    dispatch( sal_Int16 _nFeatureId ) const = 0;
46 
47         /** dispatches a feature, with an additional named parameter
48 
49             @param _nFeatureId
50                 the id of the feature to dispatch
51 
52             @param _pParamAsciiName
53                 the Ascii name of the parameter of the dispatch call
54 
55             @param _rParamValue
56                 the value of the parameter of the dispatch call
57         */
58         virtual void dispatchWithArgument(
59                 sal_Int16 _nFeatureId,
60                 const sal_Char* _pParamName,
61                 const ::com::sun::star::uno::Any& _rParamValue
62              ) const = 0;
63 
64         /** checks whether a given feature is enabled
65         */
66         virtual bool    isEnabled( sal_Int16 _nFeatureId ) const = 0;
67 
68         /** returns the boolean state of a feature
69 
70             Certain features may support more status information than only the enabled/disabled
71             state. The type of such additional information is fixed relative to a given feature, but
72             may differ between different features.
73 
74             This method allows retrieving status information about features which have an additional
75             boolean information associated with it.
76         */
77         virtual bool    getBooleanState( sal_Int16 _nFeatureId ) const = 0;
78 
79         /** returns the string state of a feature
80 
81             Certain features may support more status information than only the enabled/disabled
82             state. The type of such additional information is fixed relative to a given feature, but
83             may differ between different features.
84 
85             This method allows retrieving status information about features which have an additional
86             string information associated with it.
87         */
88         virtual ::rtl::OUString getStringState( sal_Int16 _nFeatureId ) const = 0;
89 
90         /** returns the integer state of a feature
91 
92             Certain features may support more status information than only the enabled/disabled
93             state. The type of such additional information is fixed relative to a given feature, but
94             may differ between different features.
95 
96             This method allows retrieving status information about features which have an additional
97             integer information associated with it.
98         */
99         virtual sal_Int32       getIntegerState( sal_Int16 _nFeatureId ) const = 0;
100     };
101 
102 //.........................................................................
103 }   // namespace frm
104 //.........................................................................
105 
106 #endif // FORMS_SOLAR_DISPATCHER_HXX
107