1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10d1766043SAndrew Rist *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12d1766043SAndrew Rist *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19d1766043SAndrew Rist *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_ucb_UniversalContentBroker_idl__
24cdf0e10cSrcweir#define __com_sun_star_ucb_UniversalContentBroker_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_lang_XComponent_idl__
27cdf0e10cSrcweir#include <com/sun/star/lang/XComponent.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_ucb_XCommandProcessor_idl__
31cdf0e10cSrcweir#include <com/sun/star/ucb/XCommandProcessor.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_ucb_XCommandProcessor2_idl__
35cdf0e10cSrcweir#include <com/sun/star/ucb/XCommandProcessor2.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_ucb_XContentProviderManager_idl__
39cdf0e10cSrcweir#include <com/sun/star/ucb/XContentProviderManager.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir#ifndef __com_sun_star_ucb_XContentProvider_idl__
43cdf0e10cSrcweir#include <com/sun/star/ucb/XContentProvider.idl>
44cdf0e10cSrcweir#endif
45cdf0e10cSrcweir
46cdf0e10cSrcweir#ifndef __com_sun_star_ucb_XContentIdentifierFactory_idl__
47cdf0e10cSrcweir#include <com/sun/star/ucb/XContentIdentifierFactory.idl>
48cdf0e10cSrcweir#endif
49cdf0e10cSrcweir
50cdf0e10cSrcweir#ifndef __com_sun_star_lang_XInitialization_idl__
51cdf0e10cSrcweir#include <com/sun/star/lang/XInitialization.idl>
52cdf0e10cSrcweir#endif
53cdf0e10cSrcweir
54cdf0e10cSrcweir//=============================================================================
55cdf0e10cSrcweir
56cdf0e10cSrcweirmodule com { module sun { module star { module ucb {
57cdf0e10cSrcweir
58cdf0e10cSrcweir//=============================================================================
59cdf0e10cSrcweir/** is a one-instance service that provides access to a set of
60cdf0e10cSrcweir    <type>Content</type>s via <type>ContentProvider</type>s.
61cdf0e10cSrcweir
62cdf0e10cSrcweir	<p>If the instance is created with two arguments of type string,
63cdf0e10cSrcweir	these two strings are used to configure the newly instantiated broker;
64cdf0e10cSrcweir	see the description of the required
65cdf0e10cSrcweir	<type scope="com::sun::star::lang">XInitialization</type> interface for
66cdf0e10cSrcweir	details.
67cdf0e10cSrcweir
68cdf0e10cSrcweir	<p>If the instance is created without arguments, the newly instatiated
69cdf0e10cSrcweir    broker is not configured.
70cdf0e10cSrcweir*/
71cdf0e10cSrcweirpublished service UniversalContentBroker
72cdf0e10cSrcweir{
73cdf0e10cSrcweir	//-------------------------------------------------------------------------
74cdf0e10cSrcweir	/** must be implemented to make it possible to resolve cyclic object
75cdf0e10cSrcweir	    references.
76cdf0e10cSrcweir
77*a893be29SPedro Giffuni		<p>Those references i.e. may occur if content provider	implementations
78cdf0e10cSrcweir		hold references to the Broker. The Broker itself always holds its
79cdf0e10cSrcweir		providers. If the Broker shall be released,
80cdf0e10cSrcweir		<member scope="com::sun::star::lang">XComponent::dispose</member>
81cdf0e10cSrcweir		must be called at the Broker. The implementation of this method must
82cdf0e10cSrcweir		call
83cdf0e10cSrcweir		<member scope="com::sun::star::lang">XEventListener::disposing</member>
84cdf0e10cSrcweir		on the registered listeners	(the providers holding the Broker must be
85cdf0e10cSrcweir		those listeners) and release the appropriate object references. At
86cdf0e10cSrcweir		the other hand, the	implementation of XEventListener::disposing must
87cdf0e10cSrcweir		release its appropriate references.
88cdf0e10cSrcweir
89cdf0e10cSrcweir		<p>This interface is required.
90cdf0e10cSrcweir	 */
91cdf0e10cSrcweir	interface com::sun::star::lang::XComponent;
92cdf0e10cSrcweir
93cdf0e10cSrcweir	//-------------------------------------------------------------------------
94cdf0e10cSrcweir	/** provides access to all kind of contents provided by the registered
95cdf0e10cSrcweir		content providers.
96cdf0e10cSrcweir
97cdf0e10cSrcweir		<p>This interface is required.
98cdf0e10cSrcweir	 */
99cdf0e10cSrcweir	interface com::sun::star::ucb::XContentProvider;
100cdf0e10cSrcweir
101cdf0e10cSrcweir	//-------------------------------------------------------------------------
102cdf0e10cSrcweir	/** provides access to a set of content providers registered with the UCB.
103cdf0e10cSrcweir
104cdf0e10cSrcweir		<p>This interface is required.
105cdf0e10cSrcweir	 */
106cdf0e10cSrcweir	interface com::sun::star::ucb::XContentProviderManager;
107cdf0e10cSrcweir
108cdf0e10cSrcweir	//-------------------------------------------------------------------------
109cdf0e10cSrcweir	/** creates <type>XContentIdentifier</type> implementation objects for
110cdf0e10cSrcweir	    all kind of contents provided by the UCB.
111cdf0e10cSrcweir
112cdf0e10cSrcweir		<p>This interface is required.
113cdf0e10cSrcweir	  */
114cdf0e10cSrcweir	interface com::sun::star::ucb::XContentIdentifierFactory;
115cdf0e10cSrcweir
116cdf0e10cSrcweir	//-------------------------------------------------------------------------
117cdf0e10cSrcweir	/**	supports the configuration of a newly created broker.
118cdf0e10cSrcweir
119cdf0e10cSrcweir		<p>The
120cdf0e10cSrcweir		<member scope="com::sun::star::lang">XInitialization::initialize</member>
121cdf0e10cSrcweir		method should be called with two arguments of type string. These strings
122cdf0e10cSrcweir		are used as a pair of keys to retrieve a set of content provider
123cdf0e10cSrcweir		descriptions from the configuration	management (stored at
124cdf0e10cSrcweir		<code>org.openoffice.ucb.Configuration.ContentProviders.<var>key<sub>1</sub></var>.SecondaryKeys.<var>key<sub>2</sub></var>.ProviderData</code>
125cdf0e10cSrcweir		within the configuration management's hierarchy). The retrieved
126cdf0e10cSrcweir		descriptions are in turn used to register the corresponding content
127cdf0e10cSrcweir		provider services at the broker.
128cdf0e10cSrcweir
129cdf0e10cSrcweir		<p>Typical values for the pair of strings would be
130cdf0e10cSrcweir		<code>"Local"</code>/<code>"Office"</code>, to configure a broker that
131cdf0e10cSrcweir		contains all the relevant content providers.
132cdf0e10cSrcweir
133cdf0e10cSrcweir		<p>This interface is required.
134cdf0e10cSrcweir	 */
135cdf0e10cSrcweir	interface com::sun::star::lang::XInitialization;
136cdf0e10cSrcweir
137cdf0e10cSrcweir	//-------------------------------------------------------------------------
138cdf0e10cSrcweir	/**	enables the caller to execute commands at the broker.
139cdf0e10cSrcweir
140cdf0e10cSrcweir		<p>This interface is required.
141cdf0e10cSrcweir
142cdf0e10cSrcweir		<p><pre>
143cdf0e10cSrcweir		=======================================================================
144cdf0e10cSrcweir		Commands:
145cdf0e10cSrcweir		=======================================================================
146cdf0e10cSrcweir
147cdf0e10cSrcweir		[return type]
148cdf0e10cSrcweir			[command name]
149cdf0e10cSrcweir				[parameter type and name]
150cdf0e10cSrcweir
151cdf0e10cSrcweir		-----------------------------------------------------------------------
152cdf0e10cSrcweir		Requiered commands:
153cdf0e10cSrcweir		-----------------------------------------------------------------------
154cdf0e10cSrcweir
155cdf0e10cSrcweir		// This command obtains an interface which allows to query
156cdf0e10cSrcweir		// information on commands supported by the Content Broker.
157cdf0e10cSrcweir
158cdf0e10cSrcweir		<type>XCommandInfo</type>
159cdf0e10cSrcweir			getCommandInfo
160cdf0e10cSrcweir				void
161cdf0e10cSrcweir
162cdf0e10cSrcweir		// This command transfers Contents from one location to another.
163cdf0e10cSrcweir		// Additionally, it can be used to create a link to a Content.
164cdf0e10cSrcweir		// The implementation must be able to handle Contents provided
165cdf0e10cSrcweir		// by any Content Provider. This is different from the command
166cdf0e10cSrcweir		// 'transfer' that can be supported by a Content. That command
167cdf0e10cSrcweir		// typically can only handle <type>Content</type>s provided by one
168cdf0e10cSrcweir		// <type>ContentProvider</type>.
169cdf0e10cSrcweir
170cdf0e10cSrcweir		void
171cdf0e10cSrcweir			globalTransfer
172cdf0e10cSrcweir				<type>GlobalTransferCommandArgument</type>
173cdf0e10cSrcweir		</pre>
174cdf0e10cSrcweir	 */
175cdf0e10cSrcweir    interface com::sun::star::ucb::XCommandProcessor;
176cdf0e10cSrcweir
177cdf0e10cSrcweir    //-------------------------------------------------------------------------
178cdf0e10cSrcweir    /** is an enhanced version of <type>XCommandProcessor</type> that has an
179cdf0e10cSrcweir        additional method for releasing command identifiers obtained via
180cdf0e10cSrcweir        <member>XCommandProcessor::createCommandIdentifier</member> to avoid
181cdf0e10cSrcweir        resource leaks. For a detailed description of the problem refer to
182cdf0e10cSrcweir        <member>XCommandProcessor2::releaseCommandIdentifier</member>.
183cdf0e10cSrcweir
184cdf0e10cSrcweir        <p>Where many existing <type>UniversalContentBroker</type>
185cdf0e10cSrcweir        implementations do not (yet), every new implementation should support
186cdf0e10cSrcweir        this interface.
187cdf0e10cSrcweir     */
188cdf0e10cSrcweir    [optional] interface com::sun::star::ucb::XCommandProcessor2;
189cdf0e10cSrcweir
190cdf0e10cSrcweir};
191cdf0e10cSrcweir
192cdf0e10cSrcweir//=============================================================================
193cdf0e10cSrcweir
194cdf0e10cSrcweir}; }; }; };
195cdf0e10cSrcweir
196cdf0e10cSrcweir#endif
197