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 <rtl/ustring.hxx>
26 #include <ucbhelper/ucbhelperdllapi.h>
28 namespace com::sun::star::uno
{ template <class interface_type
> class Reference
; }
29 namespace com::sun::star
{
30 namespace uno
{ class XComponentContext
; }
31 namespace ucb
{ class XContentProviderManager
; }
38 /** Information about a content provider, passed to
39 <method>configureUcb</method>.
41 struct ContentProviderData
43 /** The UNO service name to use to instantiate the content provider.
45 If it is the empty string, a null provider will be used (see the
46 documentation of the Provider argument to
47 com.sun.star.ucb.XContentProviderManager.registerContentProvider).
51 /** The URL template to use to instantiate the content provider.
55 /** The arguments to use to instantiate the content provider.
60 typedef std::vector
< ContentProviderData
> ContentProviderDataList
;
62 /** Register a content provider at a Universal Content Broker.
64 @param rManager A content provider manager (normally, this would be a
65 UCB). May be null, which is only useful if the content provider is an
66 XParameterizedContentProviders.
68 @param rServiceFactory A factory through which to obtain the required
71 @param rName The service name of the content provider. If it is the empty
72 string, a null provider will be used (see the documentation of the Provider
74 com.sun.star.ucb.XContentProviderManager.registerContentProvider).
76 @param rArguments Any arguments to instantiate the content provider with.
78 @param rTemplate The URL template to register the content provider on.
80 @param pInfo If not null, this output parameter is filled with
81 information about the (attemptively) registered provider.
83 @throws css::uno::RuntimeException
86 UCBHELPER_DLLPUBLIC
bool registerAtUcb(
87 css::uno::Reference
< css::ucb::XContentProviderManager
> const & rManager
,
88 css::uno::Reference
< css::uno::XComponentContext
> const & rxContext
,
89 OUString
const & rName
,
90 OUString
const & rArguments
,
91 OUString
const & rTemplate
);
94 #endif // INCLUDED_UCBHELPER_REGISTERUCB_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */