1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: registerucb.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _UCBHELPER_REGISTERUCB_HXX_
32 #define _UCBHELPER_REGISTERUCB_HXX_
34 #include <com/sun/star/uno/RuntimeException.hpp>
35 #include <com/sun/star/uno/Reference.h>
37 namespace com
{ namespace sun
{ namespace star
{
38 namespace lang
{ class XMultiServiceFactory
; }
39 namespace ucb
{ class XContentProviderManager
; }
41 namespace rtl
{ class OUString
; }
45 struct ContentProviderRegistrationInfo
;
47 //============================================================================
48 /** Register a content provider at a Universal Content Broker.
50 @param rManager A content provider manager (normally, this would be a
51 UCB). May be null, which is only useful if the content provider is an
52 <type>XParamterizedContentProvider</type>s.
54 @param rServiceFactory A factory through which to obtain the required
57 @param rName The service name of the content provider.
59 @param rArguments Any arguments to instantiate the content provider with.
61 @param rTemplate The URL template to register the content provider on.
63 @param pInfo If not null, this output parameter is filled with
64 information about the (atemptively) registered provider.
68 com::sun::star::uno::Reference
<
69 com::sun::star::ucb::XContentProviderManager
> const &
71 com::sun::star::uno::Reference
<
72 com::sun::star::lang::XMultiServiceFactory
> const &
74 rtl::OUString
const & rName
,
75 rtl::OUString
const & rArguments
,
76 rtl::OUString
const & rTemplate
,
77 ContentProviderRegistrationInfo
* pInfo
)
78 throw (com::sun::star::uno::RuntimeException
);
80 //============================================================================
81 /** Deregister a content provider from a Universal Content Broker.
83 @param rManager A content provider manager (normally, this would be a
84 UCB). May be null, which is only useful if the content provider is an
85 <type>XParamterizedContentProvider</type>s.
87 @param rInfo Information about the content provider to deregister.
91 com::sun::star::uno::Reference
<
92 com::sun::star::ucb::XContentProviderManager
> const &
94 ContentProviderRegistrationInfo
const & rInfo
)
95 throw (com::sun::star::uno::RuntimeException
);
99 #endif // _UCBHELPER_REGISTERUCB_HXX_