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: ProtocolHandler.idl,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 ************************************************************************/
30 #ifndef __com_sun_star_frame_ProtocolHandler_idl__
31 #define __com_sun_star_frame_ProtocolHandler_idl__
33 #ifndef __com_sun_star_frame_XDispatchProvider_idl__
34 #include
<com
/sun
/star
/frame
/XDispatchProvider.idl
>
37 #ifndef __com_sun_star_lang_XInitialization_idl__
38 #include
<com
/sun
/star
/lang
/XInitialization.idl
>
41 //=============================================================================
43 module com
{ module sun
{ module star
{ module frame
{
45 //=============================================================================
46 /** special dispatch provider registered for URL protocols
49 The generic dispatch mechanism on a <type>Frame</type>
50 search for such registered protocol handler and use it if it agrees with
55 Supported URLs must match follow format: <protocol scheme>:<protocol specific part>
56 If a handler provides optional arguments ("?") or jump marks ("#") depends from his
57 defintion and implementation. The generic dispatch provider will use registered
58 URL pattern to detect right handler.
61 published service ProtocolHandler
63 //-------------------------------------------------------------------------
64 /** used from the generic dispatch mechanism of the frame, to ask ProtocolHandler
65 for his agreement for the dispatched URL
68 Such asked handler can agree by returning itself or a special sub dispatch object, which
69 can handle the given URL. Of course he can disagree with it by returning an empty reference.
72 interface XDispatchProvider
;
74 //-------------------------------------------------------------------------
75 /** initialize the new handler instance with some context informations
78 Sometimes it can be usefull for a handler object, to know something about the
79 environment, in which it runs - especily the frame. For this case the generic
80 code (which uses the handler) will ask for this optional interface and use it, if it exist.
81 Following parameters are passed to the service:
83 <li>sequence< any >[0] => the frame for which this ProtocolHandler was created [com.sun.star.frame.XFrame]</li>
88 Please note: if this mechanism is used it seams not usefull (nor possible) to implement a ProtocolHandler
89 as a singleton. Otherwhise the implementation can't distinguish between different environments
90 and her corresponding dispatch requests.
93 [optional] interface ::com
::sun
::star
::lang
::XInitialization
;
96 //=============================================================================