1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_frame_ProtocolHandler_idl__ 28#define __com_sun_star_frame_ProtocolHandler_idl__ 29 30#ifndef __com_sun_star_frame_XDispatchProvider_idl__ 31#include <com/sun/star/frame/XDispatchProvider.idl> 32#endif 33 34#ifndef __com_sun_star_lang_XInitialization_idl__ 35#include <com/sun/star/lang/XInitialization.idl> 36#endif 37 38//============================================================================= 39 40 module com { module sun { module star { module frame { 41 42//============================================================================= 43/** special dispatch provider registered for URL protocols 44 45 <p> 46 The generic dispatch mechanism on a <type>Frame</type> 47 search for such registered protocol handler and use it if it agrees with 48 the dispatched URL. 49 </p> 50 51 <p> 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. 56 </p> 57 */ 58published service ProtocolHandler 59{ 60 //------------------------------------------------------------------------- 61 /** used from the generic dispatch mechanism of the frame, to ask ProtocolHandler 62 for his agreement for the dispatched URL 63 64 <p> 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. 67 </p> 68 */ 69 interface XDispatchProvider; 70 71 //------------------------------------------------------------------------- 72 /** initialize the new handler instance with some context informations 73 74 <p> 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: 79 <ul> 80 <li>sequence< any >[0] => the frame for which this ProtocolHandler was created [com.sun.star.frame.XFrame]</li> 81 </ul> 82 </p> 83 84 <p> 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. 88 </p> 89 */ 90 [optional] interface ::com::sun::star::lang::XInitialization; 91}; 92 93//============================================================================= 94 95}; }; }; }; 96 97#endif 98