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/util/XChangesBatch.hpp>
30 #include <com/sun/star/util/XChangesNotifier.hpp>
31 #include <rtl/ref.hxx>
32 #include <rtl/ustring.hxx>
33 #include <sal/types.h>
36 #include "modifications.hxx"
38 namespace com
{ namespace sun
{ namespace star
{
43 namespace util
{ class XChangesListener
; }
53 public Access
, public css::util::XChangesNotifier
,
54 public css::util::XChangesBatch
58 Components
& components
, OUString
const & pathRepresentation
,
59 OUString
const & locale
, bool update
);
61 virtual std::vector
<OUString
> getAbsolutePath() override
;
63 virtual void initBroadcaster(
64 Modifications::Node
const & modifications
, Broadcaster
* broadcaster
) override
;
66 virtual void SAL_CALL
acquire() throw () override
;
68 virtual void SAL_CALL
release() throw () override
;
70 OUString
const & getAbsolutePathRepresentation();
72 const OUString
& getLocale() const { return locale_
;}
74 bool isUpdate() const { return update_
;}
76 void setAlive(bool b
);
78 virtual void SAL_CALL
addChangesListener(
79 css::uno::Reference
< css::util::XChangesListener
>
80 const & aListener
) override
;
82 virtual void SAL_CALL
removeChangesListener(
83 css::uno::Reference
< css::util::XChangesListener
>
84 const & aListener
) override
;
86 virtual void SAL_CALL
commitChanges() override
;
88 virtual sal_Bool SAL_CALL
hasPendingChanges() override
;
90 virtual css::uno::Sequence
< ::css::util::ElementChange
> SAL_CALL
getPendingChanges() override
;
93 virtual ~RootAccess() override
;
95 virtual std::vector
<OUString
> getRelativePath() override
;
97 virtual OUString
getRelativePathRepresentation() override
;
99 virtual rtl::Reference
< Node
> getNode() override
;
101 virtual bool isFinalized() override
;
103 virtual OUString
getNameInternal() override
;
105 virtual rtl::Reference
< RootAccess
> getRootAccess() override
;
107 virtual rtl::Reference
< Access
> getParentAccess() override
;
109 virtual void addTypes(std::vector
< css::uno::Type
> * types
)
112 virtual void addSupportedServiceNames(
113 std::vector
<OUString
> * services
) override
;
115 virtual void initDisposeBroadcaster(Broadcaster
* broadcaster
) override
;
117 virtual void clearListeners() throw () override
;
119 virtual css::uno::Any SAL_CALL
queryInterface(
120 css::uno::Type
const & aType
) override
;
122 virtual OUString SAL_CALL
getImplementationName() override
;
127 css::util::XChangesListener
> >
130 OUString pathRepresentation_
;
132 std::vector
<OUString
> path_
;
133 rtl::Reference
< Node
> node_
;
135 ChangesListeners changesListeners_
;
137 std::shared_ptr
<osl::Mutex
> lock_
;
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */