1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef INCLUDED_CONFIGMGR_SOURCE_ROOTACCESS_HXX
29 #define INCLUDED_CONFIGMGR_SOURCE_ROOTACCESS_HXX
31 #include "sal/config.h"
36 #include "com/sun/star/lang/WrappedTargetException.hpp"
37 #include "com/sun/star/uno/RuntimeException.hpp"
38 #include "com/sun/star/util/ChangesSet.hpp"
39 #include "com/sun/star/util/XChangesBatch.hpp"
40 #include "com/sun/star/util/XChangesNotifier.hpp"
41 #include "rtl/ref.hxx"
42 #include "rtl/ustring.hxx"
43 #include "sal/types.h"
46 #include "modifications.hxx"
49 namespace com
{ namespace sun
{ namespace star
{
54 namespace util
{ class XChangesListener
; }
64 public Access
, public com::sun::star::util::XChangesNotifier
,
65 public com::sun::star::util::XChangesBatch
69 Components
& components
, rtl::OUString
const & pathRepresenation
,
70 rtl::OUString
const & locale
, bool update
);
72 virtual Path
getAbsolutePath();
74 virtual void initBroadcaster(
75 Modifications::Node
const & modifications
, Broadcaster
* broadcaster
);
77 virtual void SAL_CALL
acquire() throw ();
79 virtual void SAL_CALL
release() throw ();
81 rtl::OUString
getAbsolutePathRepresentation();
83 rtl::OUString
getLocale() const;
85 bool isUpdate() const;
88 virtual ~RootAccess();
90 virtual Path
getRelativePath();
92 virtual rtl::OUString
getRelativePathRepresentation();
94 virtual rtl::Reference
< Node
> getNode();
96 virtual bool isFinalized();
98 virtual rtl::OUString
getNameInternal();
100 virtual rtl::Reference
< RootAccess
> getRootAccess();
102 virtual rtl::Reference
< Access
> getParentAccess();
104 virtual void addTypes(std::vector
< com::sun::star::uno::Type
> * types
)
107 virtual void addSupportedServiceNames(
108 std::vector
< rtl::OUString
> * services
);
110 virtual void initDisposeBroadcaster(Broadcaster
* broadcaster
);
112 virtual void clearListeners() throw ();
114 virtual com::sun::star::uno::Any SAL_CALL
queryInterface(
115 com::sun::star::uno::Type
const & aType
)
116 throw (com::sun::star::uno::RuntimeException
);
118 virtual void SAL_CALL
addChangesListener(
119 com::sun::star::uno::Reference
< com::sun::star::util::XChangesListener
>
121 throw (com::sun::star::uno::RuntimeException
);
123 virtual void SAL_CALL
removeChangesListener(
124 com::sun::star::uno::Reference
< com::sun::star::util::XChangesListener
>
126 throw (com::sun::star::uno::RuntimeException
);
128 virtual void SAL_CALL
commitChanges()
130 com::sun::star::lang::WrappedTargetException
,
131 com::sun::star::uno::RuntimeException
);
133 virtual sal_Bool SAL_CALL
hasPendingChanges()
134 throw (com::sun::star::uno::RuntimeException
);
136 virtual com::sun::star::util::ChangesSet SAL_CALL
getPendingChanges()
137 throw (com::sun::star::uno::RuntimeException
);
141 com::sun::star::uno::Reference
<
142 com::sun::star::util::XChangesListener
> >
145 rtl::OUString pathRepresentation_
;
146 rtl::OUString locale_
;
149 rtl::Reference
< Node
> node_
;
152 ChangesListeners changesListeners_
;