Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / frame / ProtocolHandler.idl
blobffdaa315537a6e44d7adf4fba130c6ca188091b9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_frame_ProtocolHandler_idl__
20 #define __com_sun_star_frame_ProtocolHandler_idl__
22 #include <com/sun/star/frame/XDispatchProvider.idl>
23 #include <com/sun/star/lang/XInitialization.idl>
26 module com { module sun { module star { module frame {
28 /** special dispatch provider registered for URL protocols
30 <p>
31 The generic dispatch mechanism on a Frame
32 search for such registered protocol handler and use it if it agrees with
33 the dispatched URL.
34 </p>
36 <p>
37 Supported URLs must match follow format:
38 <code><i>protocol scheme</i>:<i>protocol specific part</i></code>
39 If a handler provides optional arguments ("?") or jump marks ("#") depends from his
40 definition and implementation. The generic dispatch provider will use registered
41 URL pattern to detect right handler.
42 </p>
44 published service ProtocolHandler
46 /** used from the generic dispatch mechanism of the frame, to ask ProtocolHandler
47 for his agreement for the dispatched URL
49 <p>
50 Such asked handler can agree by returning itself or a special sub dispatch object, which
51 can handle the given URL. Of course he can disagree with it by returning an empty reference.
52 </p>
54 interface XDispatchProvider;
56 /** initialize the new handler instance with some context information
58 <p>
59 Sometimes it can be useful for a handler object, to know something about the
60 environment, in which it runs - especially the frame. For this case the generic
61 code (which uses the handler) will ask for this optional interface and use it, if it exist.
62 Following parameters are passed to the service:
63 <ul>
64 <li>sequence< any >[0] => the frame for which this ProtocolHandler was created [com.sun.star.frame.XFrame]</li>
65 </ul>
66 </p>
68 <p>
69 Please note: if this mechanism is used it seems not useful (nor possible) to implement a ProtocolHandler
70 as a singleton. Otherwise the implementation can't distinguish between different environments
71 and her corresponding dispatch requests.
72 </p>
74 [optional] interface ::com::sun::star::lang::XInitialization;
78 }; }; }; };
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */