xref: /trunk/main/shell/source/backends/macbe/macbackend.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 _MACBACKEND_HXX_
25 #define _MACBACKEND_HXX_
26 
27 #include <com/sun/star/beans/XPropertySet.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <cppuhelper/implbase2.hxx>
30 #include <rtl/string.hxx>
31 
32 // FIXME: stdio.h only for debugging...
33 #include <stdio.h>
34 
35 namespace css = com::sun::star;
36 namespace uno = css::uno;
37 namespace lang = css::lang;
38 
39 class MacOSXBackend : public ::cppu::WeakImplHelper2 <css::beans::XPropertySet, lang::XServiceInfo >
40 {
41 
42 public:
43 
44     static MacOSXBackend* createInstance();
45 
46     // XServiceInfo
47     virtual rtl::OUString SAL_CALL getImplementationName();
48 
49     virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& aServiceName);
50 
51     virtual uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames();
52 
53     /**
54        Provides the implementation name.
55 
56        @return   implementation name
57     */
58     static rtl::OUString SAL_CALL getBackendName(void);
59 
60     /**
61        Provides the supported services names
62 
63        @return   service names
64     */
65     static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void);
66 
67     // XPropertySet
68     virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo()69     getPropertySetInfo()
70     { return css::uno::Reference< css::beans::XPropertySetInfo >(); }
71 
72     virtual void SAL_CALL setPropertyValue(
73         rtl::OUString const &, css::uno::Any const &);
74 
75     virtual css::uno::Any SAL_CALL getPropertyValue(
76         rtl::OUString const & PropertyName);
77 
addPropertyChangeListener(rtl::OUString const &,css::uno::Reference<css::beans::XPropertyChangeListener> const &)78     virtual void SAL_CALL addPropertyChangeListener(
79         rtl::OUString const &,
80         css::uno::Reference< css::beans::XPropertyChangeListener > const &)
81     {}
82 
removePropertyChangeListener(rtl::OUString const &,css::uno::Reference<css::beans::XPropertyChangeListener> const &)83     virtual void SAL_CALL removePropertyChangeListener(
84         rtl::OUString const &,
85         css::uno::Reference< css::beans::XPropertyChangeListener > const &)
86     {}
87 
addVetoableChangeListener(rtl::OUString const &,css::uno::Reference<css::beans::XVetoableChangeListener> const &)88     virtual void SAL_CALL addVetoableChangeListener(
89         rtl::OUString const &,
90         css::uno::Reference< css::beans::XVetoableChangeListener > const &)
91     {}
92 
removeVetoableChangeListener(rtl::OUString const &,css::uno::Reference<css::beans::XVetoableChangeListener> const &)93     virtual void SAL_CALL removeVetoableChangeListener(
94         rtl::OUString const &,
95         css::uno::Reference< css::beans::XVetoableChangeListener > const &)
96     {}
97 
98 protected:
99 
100     /**
101        Service constructor from a service factory.
102 
103        @param xContext   component context
104     */
105     MacOSXBackend();
106 
107     /** Destructor */
108     ~MacOSXBackend(void);
109 };
110 
111 #endif // _MACBACKEND_HXX_
112