1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_frame_ProtocolHandler_idl__ 24cdf0e10cSrcweir#define __com_sun_star_frame_ProtocolHandler_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_frame_XDispatchProvider_idl__ 27cdf0e10cSrcweir#include <com/sun/star/frame/XDispatchProvider.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir#ifndef __com_sun_star_lang_XInitialization_idl__ 31cdf0e10cSrcweir#include <com/sun/star/lang/XInitialization.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir//============================================================================= 35cdf0e10cSrcweir 36cdf0e10cSrcweir module com { module sun { module star { module frame { 37cdf0e10cSrcweir 38cdf0e10cSrcweir//============================================================================= 39cdf0e10cSrcweir/** special dispatch provider registered for URL protocols 40cdf0e10cSrcweir 41cdf0e10cSrcweir <p> 42cdf0e10cSrcweir The generic dispatch mechanism on a <type>Frame</type> 43cdf0e10cSrcweir search for such registered protocol handler and use it if it agrees with 44cdf0e10cSrcweir the dispatched URL. 45cdf0e10cSrcweir </p> 46cdf0e10cSrcweir 47cdf0e10cSrcweir <p> 48cdf0e10cSrcweir Supported URLs must match follow format: <protocol scheme>:<protocol specific part> 49cdf0e10cSrcweir If a handler provides optional arguments ("?") or jump marks ("#") depends from his 50cdf0e10cSrcweir defintion and implementation. The generic dispatch provider will use registered 51cdf0e10cSrcweir URL pattern to detect right handler. 52cdf0e10cSrcweir </p> 53cdf0e10cSrcweir */ 54cdf0e10cSrcweirpublished service ProtocolHandler 55cdf0e10cSrcweir{ 56cdf0e10cSrcweir //------------------------------------------------------------------------- 57cdf0e10cSrcweir /** used from the generic dispatch mechanism of the frame, to ask ProtocolHandler 58cdf0e10cSrcweir for his agreement for the dispatched URL 59cdf0e10cSrcweir 60cdf0e10cSrcweir <p> 61cdf0e10cSrcweir Such asked handler can agree by returning itself or a special sub dispatch object, which 62cdf0e10cSrcweir can handle the given URL. Of course he can disagree with it by returning an empty reference. 63cdf0e10cSrcweir </p> 64cdf0e10cSrcweir */ 65cdf0e10cSrcweir interface XDispatchProvider; 66cdf0e10cSrcweir 67cdf0e10cSrcweir //------------------------------------------------------------------------- 68cdf0e10cSrcweir /** initialize the new handler instance with some context informations 69cdf0e10cSrcweir 70cdf0e10cSrcweir <p> 71cdf0e10cSrcweir Sometimes it can be usefull for a handler object, to know something about the 72cdf0e10cSrcweir environment, in which it runs - especily the frame. For this case the generic 73cdf0e10cSrcweir code (which uses the handler) will ask for this optional interface and use it, if it exist. 74cdf0e10cSrcweir Following parameters are passed to the service: 75cdf0e10cSrcweir <ul> 76cdf0e10cSrcweir <li>sequence< any >[0] => the frame for which this ProtocolHandler was created [com.sun.star.frame.XFrame]</li> 77cdf0e10cSrcweir </ul> 78cdf0e10cSrcweir </p> 79cdf0e10cSrcweir 80cdf0e10cSrcweir <p> 81cdf0e10cSrcweir Please note: if this mechanism is used it seams not usefull (nor possible) to implement a ProtocolHandler 82cdf0e10cSrcweir as a singleton. Otherwhise the implementation can't distinguish between different environments 83cdf0e10cSrcweir and her corresponding dispatch requests. 84cdf0e10cSrcweir </p> 85cdf0e10cSrcweir */ 86cdf0e10cSrcweir [optional] interface ::com::sun::star::lang::XInitialization; 87cdf0e10cSrcweir}; 88cdf0e10cSrcweir 89cdf0e10cSrcweir//============================================================================= 90cdf0e10cSrcweir 91cdf0e10cSrcweir}; }; }; }; 92cdf0e10cSrcweir 93cdf0e10cSrcweir#endif 94