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_UCBHELPER_REGISTERUCB_HXX
21 #define INCLUDED_UCBHELPER_REGISTERUCB_HXX
23 #include <com/sun/star/uno/RuntimeException.hpp>
24 #include <com/sun/star/uno/Reference.h>
25 #include <com/sun/star/ucb/XContentProviderManager.hpp>
28 #include <ucbhelper/ucbhelperdllapi.h>
30 namespace com
{ namespace sun
{ namespace star
{
31 namespace lang
{ class XMultiServiceFactory
; }
32 namespace uno
{ class XComponentContext
; }
39 /** Information about a content provider, passed to
40 <method>configureUcb</method>.
42 struct ContentProviderData
44 /** The UNO service name to use to instanciate the content provider.
46 If it is the empty string, a null provider will be used (see the
47 documentation of the Provider argument to
48 com.sun.star.ucb.XContentProviderManager.registerContentProvider).
52 /** The URL template to use to instanciate the content provider.
56 /** The arguments to use to instanciate the content provider.
61 typedef std::vector
< ContentProviderData
> ContentProviderDataList
;
63 /** Register a content provider at a Universal Content Broker.
65 @param rManager A content provider manager (normally, this would be a
66 UCB). May be null, which is only useful if the content provider is an
67 XParamterizedContentProviders.
69 @param rServiceFactory A factory through which to obtain the required
72 @param rName The service name of the content provider. If it is the empty
73 string, a null provider will be used (see the documentation of the Provider
75 com.sun.star.ucb.XContentProviderManager.registerContentProvider).
77 @param rArguments Any arguments to instantiate the content provider with.
79 @param rTemplate The URL template to register the content provider on.
81 @param pInfo If not null, this output parameter is filled with
82 information about the (attemptively) registered provider.
84 @throws css::uno::RuntimeException
87 UCBHELPER_DLLPUBLIC
bool registerAtUcb(
88 css::uno::Reference
< css::ucb::XContentProviderManager
> const & rManager
,
89 css::uno::Reference
< css::uno::XComponentContext
> const & rxContext
,
90 OUString
const & rName
,
91 OUString
const & rArguments
,
92 OUString
const & rTemplate
);
95 #endif // INCLUDED_UCBHELPER_REGISTERUCB_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */