1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_frame_ProtocolHandler_idl__
28 #define __com_sun_star_frame_ProtocolHandler_idl__
30 #ifndef __com_sun_star_frame_XDispatchProvider_idl__
31 #include
<com
/sun
/star
/frame
/XDispatchProvider.idl
>
34 #ifndef __com_sun_star_lang_XInitialization_idl__
35 #include
<com
/sun
/star
/lang
/XInitialization.idl
>
38 //=============================================================================
40 module com
{ module sun
{ module star
{ module frame
{
42 //=============================================================================
43 /** special dispatch provider registered for URL protocols
46 The generic dispatch mechanism on a <type>Frame</type>
47 search for such registered protocol handler and use it if it agrees with
52 Supported URLs must match follow format: <protocol scheme>:<protocol specific part>
53 If a handler provides optional arguments ("?") or jump marks ("#") depends from his
54 defintion and implementation. The generic dispatch provider will use registered
55 URL pattern to detect right handler.
58 published service ProtocolHandler
60 //-------------------------------------------------------------------------
61 /** used from the generic dispatch mechanism of the frame, to ask ProtocolHandler
62 for his agreement for the dispatched URL
65 Such asked handler can agree by returning itself or a special sub dispatch object, which
66 can handle the given URL. Of course he can disagree with it by returning an empty reference.
69 interface XDispatchProvider
;
71 //-------------------------------------------------------------------------
72 /** initialize the new handler instance with some context informations
75 Sometimes it can be usefull for a handler object, to know something about the
76 environment, in which it runs - especily the frame. For this case the generic
77 code (which uses the handler) will ask for this optional interface and use it, if it exist.
78 Following parameters are passed to the service:
80 <li>sequence< any >[0] => the frame for which this ProtocolHandler was created [com.sun.star.frame.XFrame]</li>
85 Please note: if this mechanism is used it seams not usefull (nor possible) to implement a ProtocolHandler
86 as a singleton. Otherwhise the implementation can't distinguish between different environments
87 and her corresponding dispatch requests.
90 [optional] interface ::com
::sun
::star
::lang
::XInitialization
;
93 //=============================================================================