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