summaryrefslogtreecommitdiff
path: root/ucbhelper/inc
diff options
context:
space:
mode:
Diffstat (limited to 'ucbhelper/inc')
-rw-r--r--ucbhelper/inc/ucbhelper/configurationkeys.hxx32
-rw-r--r--ucbhelper/inc/ucbhelper/content.hxx14
-rw-r--r--ucbhelper/inc/ucbhelper/contentbroker.hxx170
-rw-r--r--ucbhelper/inc/ucbhelper/fileidentifierconverter.hxx10
4 files changed, 17 insertions, 209 deletions
diff --git a/ucbhelper/inc/ucbhelper/configurationkeys.hxx b/ucbhelper/inc/ucbhelper/configurationkeys.hxx
deleted file mode 100644
index 2f7992047993..000000000000
--- a/ucbhelper/inc/ucbhelper/configurationkeys.hxx
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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 .
- */
-
-#ifndef _UCBHELPER_CONFIGURATIONKEYS_HXX_
-#define _UCBHELPER_CONFIGURATIONKEYS_HXX_
-
-//============================================================================
-/** Various primary and secondary keys under which UCB configurations can be
- accessed in the configuration database.
- */
-#define UCB_CONFIGURATION_KEY1_LOCAL "Local"
-#define UCB_CONFIGURATION_KEY2_OFFICE "Office"
-
-#endif // _UCBHELPER_CONFIGURATIONKEYS_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/inc/ucbhelper/content.hxx b/ucbhelper/inc/ucbhelper/content.hxx
index 9667190944ed..9c06bf5366e7 100644
--- a/ucbhelper/inc/ucbhelper/content.hxx
+++ b/ucbhelper/inc/ucbhelper/content.hxx
@@ -53,6 +53,10 @@ namespace com { namespace sun { namespace star { namespace ucb {
struct NumberedSortingInfo;
} } } }
+namespace com { namespace sun { namespace star { namespace uno {
+ class XComponentContext;
+} } } }
+
namespace ucbhelper
{
@@ -118,7 +122,9 @@ public:
*/
Content( const rtl::OUString& rURL,
const ::com::sun::star::uno::Reference<
- ::com::sun::star::ucb::XCommandEnvironment >& rEnv )
+ ::com::sun::star::ucb::XCommandEnvironment >& rEnv,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& rCtx )
throw ( ::com::sun::star::ucb::ContentCreationException,
::com::sun::star::uno::RuntimeException );
/**
@@ -133,7 +139,9 @@ public:
Content( const ::com::sun::star::uno::Reference<
::com::sun::star::ucb::XContent >& rContent,
const ::com::sun::star::uno::Reference<
- ::com::sun::star::ucb::XCommandEnvironment >& rEnv )
+ ::com::sun::star::ucb::XCommandEnvironment >& rEnv,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& rCtx )
throw ( ::com::sun::star::ucb::ContentCreationException,
::com::sun::star::uno::RuntimeException );
/**
@@ -172,6 +180,8 @@ public:
create( const rtl::OUString& rURL,
const ::com::sun::star::uno::Reference<
::com::sun::star::ucb::XCommandEnvironment >& rEnv,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& rCtx,
Content& rContent );
//////////////////////////////////////////////////////////////////////
diff --git a/ucbhelper/inc/ucbhelper/contentbroker.hxx b/ucbhelper/inc/ucbhelper/contentbroker.hxx
deleted file mode 100644
index 564b11e18b71..000000000000
--- a/ucbhelper/inc/ucbhelper/contentbroker.hxx
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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 .
- */
-
-#ifndef _UCBHELPER_CONTENTBROKER_HXX
-#define _UCBHELPER_CONTENTBROKER_HXX
-
-#include <boost/noncopyable.hpp>
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/Sequence.h>
-
-namespace com { namespace sun { namespace star { namespace lang {
- class XMultiServiceFactory;
-} } } }
-
-namespace com { namespace sun { namespace star { namespace ucb {
- class XContentIdentifierFactory;
- class XContentProvider;
- class XContentProviderManager;
- class XCommandProcessor;
-} } } }
-#include <ucbhelper/registerucb.hxx>
-#include "ucbhelper/ucbhelperdllapi.h"
-
-namespace ucbhelper
-{
-
-class ContentBroker_Impl;
-
-//=========================================================================
-
-/**
- * This class simplifies access to the Universal Content Broker (UCB).
- * Currently there can only be one UCB instance per process. This class can
- * be used to initialize and deinitialize the Broker and to access its
- * interfaces directly.
- */
-class UCBHELPER_DLLPUBLIC ContentBroker : private boost::noncopyable
-{
- ContentBroker_Impl* m_pImpl;
- // The "one and only" Broker.
- static ContentBroker* m_pTheBroker;
-
-private:
- /** Constructor.
- *
- * @param rxSMgr is a Service Manager.
- * @param rArguments are the arguments to pass to the
- * com.sun.star.ucb.UniversalContentBroker service when creating it.
- * Currently, this must be a sequence containing exactly two
- * strings, a primary and a secondary configuration key.
- * Refer to http://ucb.openoffice.org/docs/ucb-configuration.html
- * for more information on UCB configuration.
- */
- UCBHELPER_DLLPRIVATE ContentBroker( const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Any >& rArguments );
-
-protected:
- /**
- * Destructor.
- */
- ~ContentBroker();
-
-public:
- /** Initialize "the one and only" Broker. This method must be called
- * exactly once, before the Broker is used in any way.
- *
- * @param rSMgr is a factory to create services needed in the Broker's
- * implementation.
- *
- * @param rArguments are the arguments to pass to the
- * com.sun.star.ucb.UniversalContentBroker service when creating
- * it. Currently, this must be a sequence containing exactly two
- * strings, a primary and a secondary configuration key.
- * Refer to http://ucb.openoffice.org/docs/ucb-configuration.html
- * for more information on UCB configuration.
- *
- * @return True if creation and possible configuration of the Broker
- * was successful.
- */
- static sal_Bool
- initialize( const::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Any >& rArguments );
-
- /** Deinitialize "the one and only" Broker. Once this method has been
- * called, the Broker must not be used any longer.
- */
- static void
- deinitialize();
-
- /**
- * This method returns the Broker, if it was already initialized.
- *
- * @return the Broker or 0, if ContentBroker::initialize() was not yet
- * called or did fail.
- */
- static ContentBroker*
- get();
-
- /**
- * This method returns the Service Manager used to instanciate the Broker.
- *
- * @return a Service Manager.
- */
- ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory >
- getServiceManager() const;
-
- /**
- * This method returns the XContentIdentifierFactory interface of the
- * Broker.
- *
- * @return a XContentIdentifierFactory interface.
- */
- ::com::sun::star::uno::Reference<
- ::com::sun::star::ucb::XContentIdentifierFactory >
- getContentIdentifierFactoryInterface() const;
-
- /**
- * This method returns the XContentProvider interface of the Broker.
- *
- * @return a XContentProvider interface.
- */
- ::com::sun::star::uno::Reference<
- ::com::sun::star::ucb::XContentProvider >
- getContentProviderInterface() const;
-
- /**
- * This method returns the XContentProviderManager interface of the Broker.
- *
- * @return a XContentProviderManager interface.
- */
- ::com::sun::star::uno::Reference<
- ::com::sun::star::ucb::XContentProviderManager >
- getContentProviderManagerInterface() const;
-
- /**
- * This method returns the XCommandProcessor interface of the Broker.
- *
- * @return a XCommandProcessor interface.
- */
- ::com::sun::star::uno::Reference<
- ::com::sun::star::ucb::XCommandProcessor >
- getCommandProcessorInterface() const;
-};
-
-} /* namespace ucbhelper */
-
-#endif /* !_UCBHELPER_CONTENTBROKER_HXX */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/inc/ucbhelper/fileidentifierconverter.hxx b/ucbhelper/inc/ucbhelper/fileidentifierconverter.hxx
index be7ce3b0c33e..b044c31db7c8 100644
--- a/ucbhelper/inc/ucbhelper/fileidentifierconverter.hxx
+++ b/ucbhelper/inc/ucbhelper/fileidentifierconverter.hxx
@@ -26,7 +26,7 @@
#include "ucbhelper/ucbhelperdllapi.h"
namespace com { namespace sun { namespace star { namespace ucb {
- class XContentProviderManager;
+ class XUniversalContentBroker;
} } } }
namespace rtl { class OUString; }
@@ -73,8 +73,8 @@ UCBHELPER_DLLPUBLIC rtl::OUString getLocalFileURL()
UCBHELPER_DLLPUBLIC rtl::OUString
getFileURLFromSystemPath(
com::sun::star::uno::Reference<
- com::sun::star::ucb::XContentProviderManager > const &
- rManager,
+ com::sun::star::ucb::XUniversalContentBroker > const &
+ rUcb,
rtl::OUString const & rBaseURL,
rtl::OUString const & rSystemPath)
SAL_THROW((com::sun::star::uno::RuntimeException));
@@ -103,8 +103,8 @@ getFileURLFromSystemPath(
UCBHELPER_DLLPUBLIC rtl::OUString
getSystemPathFromFileURL(
com::sun::star::uno::Reference<
- com::sun::star::ucb::XContentProviderManager > const &
- rManager,
+ com::sun::star::ucb::XUniversalContentBroker > const &
+ rUcb,
rtl::OUString const & rURL)
SAL_THROW((com::sun::star::uno::RuntimeException));