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>
29 #include <com/sun/star/lang/WrappedTargetException.hpp>
30 #include <com/sun/star/uno/RuntimeException.hpp>
31 #include <com/sun/star/util/ChangesSet.hpp>
32 #include <com/sun/star/util/XChangesBatch.hpp>
33 #include <com/sun/star/util/XChangesNotifier.hpp>
34 #include <rtl/ref.hxx>
35 #include <rtl/ustring.hxx>
36 #include <sal/types.h>
39 #include "modifications.hxx"
41 namespace com
{ namespace sun
{ namespace star
{
46 namespace util
{ class XChangesListener
; }
56 public Access
, public css::util::XChangesNotifier
,
57 public css::util::XChangesBatch
61 Components
& components
, OUString
const & pathRepresentation
,
62 OUString
const & locale
, bool update
);
64 virtual std::vector
<OUString
> getAbsolutePath() override
;
66 virtual void initBroadcaster(
67 Modifications::Node
const & modifications
, Broadcaster
* broadcaster
) override
;
69 virtual void SAL_CALL
acquire() throw () override
;
71 virtual void SAL_CALL
release() throw () override
;
73 OUString
const & getAbsolutePathRepresentation();
75 const OUString
& getLocale() const { return locale_
;}
77 bool isUpdate() const { return update_
;}
79 void setAlive(bool b
);
81 virtual void SAL_CALL
addChangesListener(
82 css::uno::Reference
< css::util::XChangesListener
>
83 const & aListener
) override
;
85 virtual void SAL_CALL
removeChangesListener(
86 css::uno::Reference
< css::util::XChangesListener
>
87 const & aListener
) override
;
89 virtual void SAL_CALL
commitChanges() override
;
91 virtual sal_Bool SAL_CALL
hasPendingChanges() override
;
93 virtual css::uno::Sequence
< ::css::util::ElementChange
> SAL_CALL
getPendingChanges() override
;
96 virtual ~RootAccess() override
;
98 virtual std::vector
<OUString
> getRelativePath() override
;
100 virtual OUString
getRelativePathRepresentation() override
;
102 virtual rtl::Reference
< Node
> getNode() override
;
104 virtual bool isFinalized() override
;
106 virtual OUString
getNameInternal() override
;
108 virtual rtl::Reference
< RootAccess
> getRootAccess() override
;
110 virtual rtl::Reference
< Access
> getParentAccess() override
;
112 virtual void addTypes(std::vector
< css::uno::Type
> * types
)
115 virtual void addSupportedServiceNames(
116 std::vector
<OUString
> * services
) override
;
118 virtual void initDisposeBroadcaster(Broadcaster
* broadcaster
) override
;
120 virtual void clearListeners() throw () override
;
122 virtual css::uno::Any SAL_CALL
queryInterface(
123 css::uno::Type
const & aType
) override
;
125 virtual OUString SAL_CALL
getImplementationName() override
;
130 css::util::XChangesListener
> >
133 OUString pathRepresentation_
;
135 std::vector
<OUString
> path_
;
136 rtl::Reference
< Node
> node_
;
138 ChangesListeners changesListeners_
;
140 std::shared_ptr
<osl::Mutex
> lock_
;
151 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */