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 throw (uno::RuntimeException); 49 50 virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& aServiceName) 51 throw (uno::RuntimeException); 52 53 virtual uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames() 54 throw (uno::RuntimeException); 55 56 /** 57 Provides the implementation name. 58 59 @return implementation name 60 */ 61 static rtl::OUString SAL_CALL getBackendName(void); 62 63 /** 64 Provides the supported services names 65 66 @return service names 67 */ 68 static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void); 69 70 // XPropertySet 71 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo()72 getPropertySetInfo() throw (css::uno::RuntimeException) 73 { return css::uno::Reference< css::beans::XPropertySetInfo >(); } 74 75 virtual void SAL_CALL setPropertyValue( 76 rtl::OUString const &, css::uno::Any const &) 77 throw ( 78 css::beans::UnknownPropertyException, 79 css::beans::PropertyVetoException, 80 css::lang::IllegalArgumentException, 81 css::lang::WrappedTargetException, css::uno::RuntimeException); 82 83 virtual css::uno::Any SAL_CALL getPropertyValue( 84 rtl::OUString const & PropertyName) 85 throw ( 86 css::beans::UnknownPropertyException, 87 css::lang::WrappedTargetException, css::uno::RuntimeException); 88 addPropertyChangeListener(rtl::OUString const &,css::uno::Reference<css::beans::XPropertyChangeListener> const &)89 virtual void SAL_CALL addPropertyChangeListener( 90 rtl::OUString const &, 91 css::uno::Reference< css::beans::XPropertyChangeListener > const &) 92 throw ( 93 css::beans::UnknownPropertyException, 94 css::lang::WrappedTargetException, css::uno::RuntimeException) 95 {} 96 removePropertyChangeListener(rtl::OUString const &,css::uno::Reference<css::beans::XPropertyChangeListener> const &)97 virtual void SAL_CALL removePropertyChangeListener( 98 rtl::OUString const &, 99 css::uno::Reference< css::beans::XPropertyChangeListener > const &) 100 throw ( 101 css::beans::UnknownPropertyException, 102 css::lang::WrappedTargetException, css::uno::RuntimeException) 103 {} 104 addVetoableChangeListener(rtl::OUString const &,css::uno::Reference<css::beans::XVetoableChangeListener> const &)105 virtual void SAL_CALL addVetoableChangeListener( 106 rtl::OUString const &, 107 css::uno::Reference< css::beans::XVetoableChangeListener > const &) 108 throw ( 109 css::beans::UnknownPropertyException, 110 css::lang::WrappedTargetException, css::uno::RuntimeException) 111 {} 112 removeVetoableChangeListener(rtl::OUString const &,css::uno::Reference<css::beans::XVetoableChangeListener> const &)113 virtual void SAL_CALL removeVetoableChangeListener( 114 rtl::OUString const &, 115 css::uno::Reference< css::beans::XVetoableChangeListener > const &) 116 throw ( 117 css::beans::UnknownPropertyException, 118 css::lang::WrappedTargetException, css::uno::RuntimeException) 119 {} 120 121 protected: 122 123 /** 124 Service constructor from a service factory. 125 126 @param xContext component context 127 */ 128 MacOSXBackend(); 129 130 /** Destructor */ 131 ~MacOSXBackend(void); 132 }; 133 134 #endif // _MACBACKEND_HXX_ 135