diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-03-30 14:05:41 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-03-30 14:05:41 +0000 |
commit | 067ae52be08cd30eb5352a2d5808afb5533dfa20 (patch) | |
tree | ad461b55478c71006b1de287a43807a6369d640b /shell/source/backends | |
parent | be32a56cb2fdeea5b41f8667488432cd47e18cbe (diff) |
INTEGRATION: CWS cfg04 (1.1.2); FILE ADDED
2004/02/25 13:01:18 ssmith 1.1.2.4: #114070# adding LayerContentDescriber
2004/02/06 11:25:47 ssmith 1.1.2.3: #114070# adding notification support
2004/02/02 10:26:41 ssmith 1.1.2.2: #114070# adding gconf calls
2004/01/29 11:27:18 ssmith 1.1.2.1: #114070# gconfbe ref imp
Diffstat (limited to 'shell/source/backends')
-rw-r--r-- | shell/source/backends/gconfbe/gconflayer.hxx | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/shell/source/backends/gconfbe/gconflayer.hxx b/shell/source/backends/gconfbe/gconflayer.hxx new file mode 100644 index 000000000000..9237746926da --- /dev/null +++ b/shell/source/backends/gconfbe/gconflayer.hxx @@ -0,0 +1,92 @@ +#ifndef GCONFLAYER_HXX_ +#define GCONFLAYER_HXX_ + +#ifndef GCONFBACKEND_HXX_ +#include "gconfbackend.hxx" +#endif // GCONFBACKEND_HXX_ + + +#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYER_HPP_ +#include <com/sun/star/configuration/backend/XLayer.hpp> +#endif // _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYER_HPP_ + +#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_BACKENDACCESSEXCEPTION_HPP_ +#include <com/sun/star/configuration/backend/BackendAccessException.hpp> +#endif // _COM_SUN_STAR_CONFIGURATION_BACKEND_BACKENDACCESSEXCEPTION_HPP_ + +#ifndef _COM_SUN_STAR_UTIL_XTIMESTAMPED_HPP_ +#include <com/sun/star/util/XTimeStamped.hpp> +#endif // _COM_SUN_STAR_UTIL_XTIMESTAMPED_HPP_ + +#ifndef _CPPUHELPER_IMPLBASE2_HXX_ +#include <cppuhelper/implbase2.hxx> +#endif // _CPPUHELPER_IMPLBASE2_HXX_ + + +#include <gconf/gconf-client.h> + +namespace css = com::sun::star ; +namespace uno = css::uno ; +namespace lang = css::lang ; +namespace backend = css::configuration::backend ; +namespace util = css::util ; + +/** + Implementation of the XLayer interfaces for Gconf. + The class performs the read of the contents of a component + for a given entity. + The read data is then available through the read data of base class + BasicPlatformLayer + The timestamp indicates the last modification time + */ + class GconfLayer : public cppu::WeakImplHelper2<backend::XLayer, + util::XTimeStamped> +{ + public : + /** + Constructor given the configuration keys map and requested + component name + @param aKeyMap Gconf->OO key map + @param aCompoentName Requested Component Name + @param sTimestamp timestamp indicating last modifictaion + */ + GconfLayer( + const rtl::OUString& sComponent, + const KeyMappingTable& aKeyMap, + const rtl::OUString& sTimestamp, + const TSMappingTable& aTSMap, + const uno::Reference<lang::XMultiServiceFactory>& xFactory); + + /** Destructor */ + ~GconfLayer(void) {} + + // XLayer + virtual void SAL_CALL readData( + const uno::Reference<backend::XLayerHandler>& xHandler) + throw ( backend::MalformedDataException, + lang::NullPointerException, + lang::WrappedTargetException, + uno::RuntimeException) ; + + // XTimeStamped + virtual rtl::OUString SAL_CALL getTimestamp(void) + throw (uno::RuntimeException); + private : + /** Convert Gconf Value to OO value */ + void convertGconfValue( + const GConfValue* aValue, + uno::Any* aOOValue, + const rtl::OUString& OOType ); + + /** Timestamp of Gconf layer */ + rtl::OUString mTimestamp ; + rtl::OUString mComponent; + const KeyMappingTable& mKeyMap; + + /** List of updated component TimeStamps */ + const TSMappingTable& mTSMap; + + uno::Reference<lang::XMultiServiceFactory> mFactory; + } ; + +#endif // GCONFLAYER |