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"
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
, OUString
const & pathRepresenation
,
63 OUString
const & locale
, bool update
);
65 virtual Path
getAbsolutePath() SAL_OVERRIDE
;
67 virtual void initBroadcaster(
68 Modifications::Node
const & modifications
, Broadcaster
* broadcaster
) SAL_OVERRIDE
;
70 virtual void SAL_CALL
acquire() throw () SAL_OVERRIDE
;
72 virtual void SAL_CALL
release() throw () SAL_OVERRIDE
;
74 OUString
getAbsolutePathRepresentation();
76 OUString
getLocale() const { return locale_
;}
78 bool isUpdate() const { return update_
;}
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
, std::exception
) SAL_OVERRIDE
;
87 virtual void SAL_CALL
removeChangesListener(
88 com::sun::star::uno::Reference
< com::sun::star::util::XChangesListener
>
90 throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
92 virtual void SAL_CALL
commitChanges()
94 com::sun::star::lang::WrappedTargetException
,
95 com::sun::star::uno::RuntimeException
,
96 std::exception
) SAL_OVERRIDE
;
98 virtual sal_Bool SAL_CALL
hasPendingChanges()
99 throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
101 virtual com::sun::star::util::ChangesSet SAL_CALL
getPendingChanges()
102 throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
105 virtual ~RootAccess();
107 virtual Path
getRelativePath() SAL_OVERRIDE
;
109 virtual OUString
getRelativePathRepresentation() SAL_OVERRIDE
;
111 virtual rtl::Reference
< Node
> getNode() SAL_OVERRIDE
;
113 virtual bool isFinalized() SAL_OVERRIDE
;
115 virtual OUString
getNameInternal() SAL_OVERRIDE
;
117 virtual rtl::Reference
< RootAccess
> getRootAccess() SAL_OVERRIDE
;
119 virtual rtl::Reference
< Access
> getParentAccess() SAL_OVERRIDE
;
121 virtual void addTypes(std::vector
< com::sun::star::uno::Type
> * types
)
124 virtual void addSupportedServiceNames(
125 std::vector
< OUString
> * services
) SAL_OVERRIDE
;
127 virtual void initDisposeBroadcaster(Broadcaster
* broadcaster
) SAL_OVERRIDE
;
129 virtual void clearListeners() throw () SAL_OVERRIDE
;
131 virtual com::sun::star::uno::Any SAL_CALL
queryInterface(
132 com::sun::star::uno::Type
const & aType
)
133 throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
135 virtual OUString SAL_CALL
getImplementationName()
136 throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
140 com::sun::star::uno::Reference
<
141 com::sun::star::util::XChangesListener
> >
144 OUString pathRepresentation_
;
147 rtl::Reference
< Node
> node_
;
149 ChangesListeners changesListeners_
;
151 std::shared_ptr
<osl::Mutex
> lock_
;
162 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */