1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef FORMS_SOLAR_DISPATCHER_HXX
29 #define FORMS_SOLAR_DISPATCHER_HXX
30 
31 #include <rtl/ustring.hxx>
32 
33 //.........................................................................
34 namespace frm
35 {
36 //.........................................................................
37 
38     //=========================================================================
39     //= IFeatureDispatcher
40     //=========================================================================
41     class IFeatureDispatcher
42     {
43     public:
44         /** dispatches a feature
45 
46             @param _nFeatureId
47                 the id of the feature to dispatch
48         */
49         virtual void    dispatch( sal_Int16 _nFeatureId ) const = 0;
50 
51         /** dispatches a feature, with an additional named parameter
52 
53             @param _nFeatureId
54                 the id of the feature to dispatch
55 
56             @param _pParamAsciiName
57                 the Ascii name of the parameter of the dispatch call
58 
59             @param _rParamValue
60                 the value of the parameter of the dispatch call
61         */
62         virtual void dispatchWithArgument(
63                 sal_Int16 _nFeatureId,
64                 const sal_Char* _pParamName,
65                 const ::com::sun::star::uno::Any& _rParamValue
66              ) const = 0;
67 
68         /** checks whether a given feature is enabled
69         */
70         virtual bool    isEnabled( sal_Int16 _nFeatureId ) const = 0;
71 
72         /** returns the boolean state of a feature
73 
74             Certain features may support more status information than only the enabled/disabled
75             state. The type of such additional information is fixed relative to a given feature, but
76             may differ between different features.
77 
78             This method allows retrieving status information about features which have an additional
79             boolean information associated with it.
80         */
81         virtual bool    getBooleanState( sal_Int16 _nFeatureId ) const = 0;
82 
83         /** returns the string state of a feature
84 
85             Certain features may support more status information than only the enabled/disabled
86             state. The type of such additional information is fixed relative to a given feature, but
87             may differ between different features.
88 
89             This method allows retrieving status information about features which have an additional
90             string information associated with it.
91         */
92         virtual ::rtl::OUString getStringState( sal_Int16 _nFeatureId ) const = 0;
93 
94         /** returns the integer state of a feature
95 
96             Certain features may support more status information than only the enabled/disabled
97             state. The type of such additional information is fixed relative to a given feature, but
98             may differ between different features.
99 
100             This method allows retrieving status information about features which have an additional
101             integer information associated with it.
102         */
103         virtual sal_Int32       getIntegerState( sal_Int16 _nFeatureId ) const = 0;
104     };
105 
106 //.........................................................................
107 }   // namespace frm
108 //.........................................................................
109 
110 #endif // FORMS_SOLAR_DISPATCHER_HXX
111