Update ooo320-m1
[ooovba.git] / ucbhelper / source / provider / registerucb.hxx
blobafd9aff26bba3bab4b10cae3516ef55b6d83a3f8
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: registerucb.hxx,v $
10 * $Revision: 1.6 $
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; }
40 } } }
41 namespace rtl { class OUString; }
43 namespace ucbhelper {
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
55 services.
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.
66 bool
67 registerAtUcb(
68 com::sun::star::uno::Reference<
69 com::sun::star::ucb::XContentProviderManager > const &
70 rManager,
71 com::sun::star::uno::Reference<
72 com::sun::star::lang::XMultiServiceFactory > const &
73 rServiceFactory,
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.
89 void
90 deregisterFromUcb(
91 com::sun::star::uno::Reference<
92 com::sun::star::ucb::XContentProviderManager > const &
93 rManager,
94 ContentProviderRegistrationInfo const & rInfo)
95 throw (com::sun::star::uno::RuntimeException);
99 #endif // _UCBHELPER_REGISTERUCB_HXX_