2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 21:00:32 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2009-05-15 18:00:17 +02:00
|
|
|
|
2009-09-08 14:59:07 +02:00
|
|
|
#ifndef INCLUDED_CONFIGMGR_SOURCE_CHILDACCESS_HXX
|
|
|
|
#define INCLUDED_CONFIGMGR_SOURCE_CHILDACCESS_HXX
|
2009-05-15 18:00:17 +02:00
|
|
|
|
|
|
|
#include "sal/config.h"
|
|
|
|
|
2009-06-04 18:08:16 +02:00
|
|
|
#include <memory>
|
2009-07-02 14:21:36 +02:00
|
|
|
#include <vector>
|
2009-05-28 10:19:30 +02:00
|
|
|
|
2009-05-26 17:25:36 +02:00
|
|
|
#include "com/sun/star/container/XChild.hpp"
|
|
|
|
#include "com/sun/star/lang/NoSupportException.hpp"
|
2009-05-18 15:03:21 +02:00
|
|
|
#include "com/sun/star/lang/XUnoTunnel.hpp"
|
2009-05-26 17:25:36 +02:00
|
|
|
#include "com/sun/star/uno/Reference.hxx"
|
2009-05-18 15:03:21 +02:00
|
|
|
#include "com/sun/star/uno/RuntimeException.hpp"
|
|
|
|
#include "com/sun/star/uno/Sequence.hxx"
|
2010-11-25 20:36:03 +00:00
|
|
|
#include "boost/shared_ptr.hpp"
|
2009-05-15 18:00:17 +02:00
|
|
|
#include "rtl/ref.hxx"
|
2009-05-18 15:03:21 +02:00
|
|
|
#include "sal/types.h"
|
2009-05-15 18:00:17 +02:00
|
|
|
|
|
|
|
#include "access.hxx"
|
2009-09-22 17:15:42 +02:00
|
|
|
#include "path.hxx"
|
2009-05-15 18:00:17 +02:00
|
|
|
|
2009-06-24 16:10:18 +02:00
|
|
|
namespace com { namespace sun { namespace star { namespace uno {
|
|
|
|
class Any;
|
2009-09-22 10:36:09 +02:00
|
|
|
class Type;
|
2009-06-24 16:10:18 +02:00
|
|
|
class XInterface;
|
|
|
|
} } } }
|
2009-05-20 17:20:08 +02:00
|
|
|
|
2009-05-15 18:00:17 +02:00
|
|
|
namespace configmgr {
|
|
|
|
|
2009-09-23 17:48:27 +02:00
|
|
|
class Components;
|
|
|
|
class Modifications;
|
2009-05-15 18:00:17 +02:00
|
|
|
class Node;
|
|
|
|
class RootAccess;
|
|
|
|
|
2009-05-18 15:03:21 +02:00
|
|
|
class ChildAccess:
|
2009-09-22 10:36:09 +02:00
|
|
|
public Access, public com::sun::star::container::XChild,
|
|
|
|
public com::sun::star::lang::XUnoTunnel
|
2009-05-18 15:03:21 +02:00
|
|
|
{
|
2009-05-15 18:00:17 +02:00
|
|
|
public:
|
2009-05-18 15:03:21 +02:00
|
|
|
static com::sun::star::uno::Sequence< sal_Int8 > getTunnelId();
|
2009-05-15 18:00:17 +02:00
|
|
|
|
2009-05-20 13:33:52 +02:00
|
|
|
ChildAccess(
|
2009-09-23 17:48:27 +02:00
|
|
|
Components & components, rtl::Reference< RootAccess > const & root,
|
2012-12-10 23:06:10 +02:00
|
|
|
rtl::Reference< Access > const & parent, OUString const & name,
|
2009-05-29 15:19:40 +02:00
|
|
|
rtl::Reference< Node > const & node);
|
2009-05-20 13:33:52 +02:00
|
|
|
|
2009-05-18 15:03:21 +02:00
|
|
|
ChildAccess(
|
2009-09-23 17:48:27 +02:00
|
|
|
Components & components, rtl::Reference< RootAccess > const & root,
|
2009-05-19 17:32:24 +02:00
|
|
|
rtl::Reference< Node > const & node);
|
2009-05-18 15:03:21 +02:00
|
|
|
|
2009-09-22 17:15:42 +02:00
|
|
|
virtual Path getAbsolutePath();
|
|
|
|
virtual Path getRelativePath();
|
|
|
|
|
2012-12-10 23:06:10 +02:00
|
|
|
virtual OUString getRelativePathRepresentation();
|
2009-05-19 10:49:37 +02:00
|
|
|
virtual rtl::Reference< Node > getNode();
|
|
|
|
|
2009-07-29 15:30:40 +02:00
|
|
|
virtual bool isFinalized();
|
|
|
|
|
2012-12-10 23:06:10 +02:00
|
|
|
virtual OUString getNameInternal();
|
2009-09-11 10:11:42 +02:00
|
|
|
|
2009-06-04 10:46:43 +02:00
|
|
|
virtual rtl::Reference< RootAccess > getRootAccess();
|
|
|
|
virtual rtl::Reference< Access > getParentAccess();
|
2009-05-19 10:49:37 +02:00
|
|
|
|
2009-09-22 10:36:09 +02:00
|
|
|
virtual void SAL_CALL acquire() throw ();
|
|
|
|
virtual void SAL_CALL release() throw ();
|
|
|
|
|
2009-06-03 18:02:52 +02:00
|
|
|
virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
|
|
|
|
SAL_CALL getParent()
|
|
|
|
throw (com::sun::star::uno::RuntimeException);
|
|
|
|
|
|
|
|
virtual void SAL_CALL setParent(
|
|
|
|
com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
|
|
|
|
const &)
|
|
|
|
throw (
|
|
|
|
com::sun::star::lang::NoSupportException,
|
|
|
|
com::sun::star::uno::RuntimeException);
|
|
|
|
|
|
|
|
virtual sal_Int64 SAL_CALL getSomething(
|
|
|
|
com::sun::star::uno::Sequence< sal_Int8 > const & aIdentifier)
|
|
|
|
throw (com::sun::star::uno::RuntimeException);
|
|
|
|
|
2009-05-29 15:19:40 +02:00
|
|
|
void bind(
|
|
|
|
rtl::Reference< RootAccess > const & root,
|
2012-12-10 23:06:10 +02:00
|
|
|
rtl::Reference< Access > const & parent, OUString const & name)
|
2009-06-04 17:06:02 +02:00
|
|
|
throw ();
|
2009-05-20 13:33:52 +02:00
|
|
|
|
|
|
|
void unbind() throw ();
|
2009-05-15 18:00:17 +02:00
|
|
|
|
2014-01-22 22:37:35 -06:00
|
|
|
bool isInTransaction() const { return m_bInTransaction; }
|
2009-07-23 12:42:37 +02:00
|
|
|
void committed();
|
2009-06-24 16:10:18 +02:00
|
|
|
void setNode(rtl::Reference< Node > const & node);
|
2009-05-28 10:19:30 +02:00
|
|
|
|
2009-09-21 13:14:11 +02:00
|
|
|
void setProperty(
|
|
|
|
com::sun::star::uno::Any const & value,
|
|
|
|
Modifications * localModifications);
|
2009-05-28 10:19:30 +02:00
|
|
|
|
2009-05-20 17:20:08 +02:00
|
|
|
com::sun::star::uno::Any asValue();
|
|
|
|
|
2009-09-21 13:14:11 +02:00
|
|
|
void commitChanges(bool valid, Modifications * globalModifications);
|
2009-06-24 16:10:18 +02:00
|
|
|
|
2009-05-15 18:00:17 +02:00
|
|
|
private:
|
2009-05-18 15:03:21 +02:00
|
|
|
virtual ~ChildAccess();
|
|
|
|
|
2009-10-09 15:34:20 +02:00
|
|
|
virtual void addTypes(
|
|
|
|
std::vector< com::sun::star::uno::Type > * types) const;
|
|
|
|
|
2009-07-02 14:21:36 +02:00
|
|
|
virtual void addSupportedServiceNames(
|
2012-12-10 23:06:10 +02:00
|
|
|
std::vector< OUString > * services);
|
2009-07-02 14:21:36 +02:00
|
|
|
|
2009-09-22 10:36:09 +02:00
|
|
|
virtual com::sun::star::uno::Any SAL_CALL queryInterface(
|
|
|
|
com::sun::star::uno::Type const & aType)
|
|
|
|
throw (com::sun::star::uno::RuntimeException);
|
|
|
|
|
2014-01-22 22:37:35 -06:00
|
|
|
rtl::Reference< RootAccess > m_rRoot;
|
|
|
|
rtl::Reference< Access > m_rParent; // null if free node
|
|
|
|
OUString m_sName;
|
|
|
|
rtl::Reference< Node > m_rNode;
|
|
|
|
std::auto_ptr< com::sun::star::uno::Any > m_changedValue;
|
|
|
|
bool m_bInTransaction;
|
2009-06-24 16:10:18 +02:00
|
|
|
// to determine if a free node can be inserted underneath some root
|
2014-01-22 22:37:35 -06:00
|
|
|
boost::shared_ptr<osl::Mutex> m_pLock;
|
2009-05-15 18:00:17 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2010-10-27 13:11:31 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|