tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / offapi / com / sun / star / task / InteractionHandler.idl
blob00e036930f7318a3e2f9002c249f33d62f551361
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 .
20 module com { module sun { module star {
21 module task { published interface XInteractionHandler2; };
22 module awt { published interface XWindow; };
23 }; }; };
25 module com { module sun { module star { module task {
27 /** An interaction request handler that lets the user handle requests via GUI dialogs.
29 <p>The interaction handler service has a number of <a href="#built_in_handler">built-in handlers</a>, responsible
30 for a lot of well known interactions. Additionally, there's a configuration module which allows to
31 <a href="#configuring_handlers">configure additional handlers</a>, responsible for arbitrary requests.</a></p>
33 <a name="built_in_handler"></a>
34 <h3>Built-in Handlers</h3>
35 The following well-known requests can be dealt with by the built-in handlers:
36 <UL>
37 <LI>com::sun::star::ucb::AuthenticationRequest</LI>
38 <LI>com::sun::star::ucb::CertificateValidationRequest</LI>
39 <LI>com::sun::star::ucb::InteractiveAugmentedIOException*</LI>
40 <LI>com::sun::star::ucb::InteractiveFileIOException*</LI>
41 <LI>com::sun::star::ucb::InteractiveIOException*</LI>
42 <LI>com::sun::star::ucb::InteractiveNetworkConnectException*</LI>
43 <LI>com::sun::star::ucb::InteractiveNetworkException*</LI>
44 <LI>com::sun::star::ucb::InteractiveNetworkGeneralException*</LI>
45 <LI>com::sun::star::ucb::InteractiveNetworkOffLineException*</LI>
46 <LI>com::sun::star::ucb::InteractiveNetworkReadException*</LI>
47 <LI>com::sun::star::ucb::InteractiveNetworkResolveNameException*</LI>
48 <LI>com::sun::star::ucb::InteractiveNetworkWriteException*</LI>
49 <LI>com::sun::star::ucb::InteractiveWrongMediumException*</LI>
50 <LI>com::sun::star::task::PasswordRequest</LI>
51 <LI>com::sun::star::java::WrongJavaVersionException*</LI>
52 <LI>com::sun::star::task::DocumentMacroConfirmationRequest</LI>
53 </UL>
54 The requests marked with an asterisk are only handled if (a) their
55 continuations match certain restrictions (see below), and (b) the
56 necessary resource strings are available (this can be exploited by
57 applications that carry only a subset of all resource files with
58 them).</P>
60 <P>The continuation restrictions are as follows: Let <VAR>C</VAR> be the
61 subset of the provided continuations that are of type
62 com::sun::star::task::XInteractionApprove,
63 com::sun::star::task::XInteractionDisapprove,
64 com::sun::star::task::XInteractionRetry, or
65 com::sun::star::task::XInteractionAbort (or of a
66 derived type). All other continuations are ignored for these requests.
67 The request is only handled if the set <VAR>C</VAR> is any of the
68 following:
69 <UL>
70 <LI>Abort</LI>
71 <LI>Retry, Abort</LI>
72 <LI>Approve</LI>
73 <LI>Approve, Abort</LI>
74 <LI>Approve, Disapprove</LI>
75 <LI>Approve, Disapprove, Abort</LI>
76 </UL></P>
78 <P>An
79 com::sun::star::ucb::InteractiveAugmentedIOException
80 carries with it a sequence of arguments, which should be
81 com::sun::star::beans::PropertyValues. The following
82 details which properties are interpreted by the interaction handler,
83 depending on the request's
84 com::sun::star::ucb::IOErrorCode:
85 <DL>
86 <DT><code>"Uri"</code></DT>
87 <DD>All error codes except
88 com::sun::star::ucb::IOErrorCode::DIFFERENT_DEVICES.
89 The URI of the involved resource (a `string`).</DD>
91 <DT><code>"ResourceName"</code></DT>
92 <DD>All error codes except
93 com::sun::star::ucb::IOErrorCode::DIFFERENT_DEVICES.
94 A name for the involved resource (a `string`) that might be
95 more meaningful to the user than the URI. For example, a
96 (platform-dependent) path notation for file system resources.</DD>
98 <DT><code>"ResourceType"</code></DT>
99 <DD>com::sun::star::ucb::IOErrorCode::DEVICE_NOT_READY
101 com::sun::star::ucb::IOErrorCode::NOT_EXISTING
102 only. An identifier for the type of resource involved (a
103 `string`). Currently understood values are
104 <code>"volume"</code> (e.g., a file system volume) and
105 <code>"folder"</code> (i.e., a resource that contains other
106 resources).</DD>
108 <DT><code>"Removable"</code></DT>
109 <DD>com::sun::star::ucb::IOErrorCode::NOT_EXISTING
110 only. A flag indicating whether the resource resides on a storage
111 medium that can be removed by the user (a `boolean`).</DD>
113 <DT><code>"Folder"</code></DT>
114 <DD>com::sun::star::ucb::IOErrorCode::CANT_CREATE
115 only. The name of the folder in which a resource cannot be created (a
116 `string`).</DD>
118 <DT><code>"Volume"</code> and <code>"OtherVolume"</code></DT>
119 <DD>com::sun::star::ucb::IOErrorCode::DIFFERENT_DEVICES
120 only. The names of the two volumes involved (two
121 `string`s).</DD>
122 </DL></P>
124 <a name="configuring_handlers"></a>
125 <h3>Configuring additional Handlers</h3>
127 <p>It is possible to configure additional interaction handlers, to which certain requests can be delegated. The
128 configuration node <code>/org.openoffice.Interaction/InteractionHandlers</code> is evaluated and respected
129 by the <code>InteractionHandler</code> implementation.</p>
131 <p>A custom interaction handler can declare itself responsible for an arbitrary number of UNO types, specified
132 by full-qualified type name. Also, for each type, it can specify whether it is responsible for only this particular
133 type, or all possibly existent derived types.</p>
135 <p>Whenever the <code>InteractionHandler</code> encounters a request it cannot fulfill itself, it will examine
136 the configuration, to find a handler implementation for the request, and delegate it to the first matching
137 handler.</p>
139 <p>If multiple custom interaction handlers declare themselves responsible for the same request type, it is not
140 defined which handler will actually be invoked. Thus, when deploying a custom interaction handler, ensure
141 that the types you specify are general enough to cover all requests you want to handle, but also specific
142 enough to not cover requests which other handlers might be interested in.</p>
144 published service InteractionHandler : XInteractionHandler2
146 /** Creates an instance.
148 @param parent denotes the parent window for any GUI dialogs the
149 interaction handler pops up; may be null.
151 createWithParent([in] com::sun::star::awt::XWindow parent);
153 /** Creates an instance with an additional context.
155 @param parent denotes the parent window for any GUI dialogs the
156 interaction handler pops up; may be null.
158 @param context is a textual description of the current context (used,
159 e.g., as a first line of text in error boxes).
161 createWithParentAndContext([in] com::sun::star::awt::XWindow parent, [in] string context);
164 }; }; }; };
166 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */