1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CONFIGMGR_SOURCE_ROOTACCESS_HXX
21 #define INCLUDED_CONFIGMGR_SOURCE_ROOTACCESS_HXX
23 #include "sal/config.h"
28 #include "com/sun/star/lang/WrappedTargetException.hpp"
29 #include "com/sun/star/uno/RuntimeException.hpp"
30 #include "com/sun/star/util/ChangesSet.hpp"
31 #include "com/sun/star/util/XChangesBatch.hpp"
32 #include "com/sun/star/util/XChangesNotifier.hpp"
33 #include "boost/shared_ptr.hpp"
34 #include "rtl/ref.hxx"
35 #include "rtl/ustring.hxx"
36 #include "sal/types.h"
39 #include "modifications.hxx"
42 namespace com
{ namespace sun
{ namespace star
{
47 namespace util
{ class XChangesListener
; }
57 public Access
, public com::sun::star::util::XChangesNotifier
,
58 public com::sun::star::util::XChangesBatch
62 Components
& components
, rtl::OUString
const & pathRepresenation
,
63 rtl::OUString
const & locale
, bool update
);
65 virtual Path
getAbsolutePath();
67 virtual void initBroadcaster(
68 Modifications::Node
const & modifications
, Broadcaster
* broadcaster
);
70 virtual void SAL_CALL
acquire() throw ();
72 virtual void SAL_CALL
release() throw ();
74 rtl::OUString
getAbsolutePathRepresentation();
76 rtl::OUString
getLocale() const;
78 bool isUpdate() const;
80 void setAlive(bool b
);
82 virtual void SAL_CALL
addChangesListener(
83 com::sun::star::uno::Reference
< com::sun::star::util::XChangesListener
>
85 throw (com::sun::star::uno::RuntimeException
);
87 virtual void SAL_CALL
removeChangesListener(
88 com::sun::star::uno::Reference
< com::sun::star::util::XChangesListener
>
90 throw (com::sun::star::uno::RuntimeException
);
92 virtual void SAL_CALL
commitChanges()
94 com::sun::star::lang::WrappedTargetException
,
95 com::sun::star::uno::RuntimeException
);
97 virtual sal_Bool SAL_CALL
hasPendingChanges()
98 throw (com::sun::star::uno::RuntimeException
);
100 virtual com::sun::star::util::ChangesSet SAL_CALL
getPendingChanges()
101 throw (com::sun::star::uno::RuntimeException
);
104 virtual ~RootAccess();
106 virtual Path
getRelativePath();
108 virtual rtl::OUString
getRelativePathRepresentation();
110 virtual rtl::Reference
< Node
> getNode();
112 virtual bool isFinalized();
114 virtual rtl::OUString
getNameInternal();
116 virtual rtl::Reference
< RootAccess
> getRootAccess();
118 virtual rtl::Reference
< Access
> getParentAccess();
120 virtual void addTypes(std::vector
< com::sun::star::uno::Type
> * types
)
123 virtual void addSupportedServiceNames(
124 std::vector
< rtl::OUString
> * services
);
126 virtual void initDisposeBroadcaster(Broadcaster
* broadcaster
);
128 virtual void clearListeners() throw ();
130 virtual com::sun::star::uno::Any SAL_CALL
queryInterface(
131 com::sun::star::uno::Type
const & aType
)
132 throw (com::sun::star::uno::RuntimeException
);
134 virtual rtl::OUString SAL_CALL
getImplementationName()
135 throw (com::sun::star::uno::RuntimeException
);
139 com::sun::star::uno::Reference
<
140 com::sun::star::util::XChangesListener
> >
143 rtl::OUString pathRepresentation_
;
144 rtl::OUString locale_
;
146 rtl::Reference
< Node
> node_
;
148 ChangesListeners changesListeners_
;
150 boost::shared_ptr
<osl::Mutex
> lock_
;
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */