xref: /AOO41X/main/offapi/com/sun/star/ucb/XInteractionSupplyAuthentication.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_ucb_XInteractionSupplyAuthentication_idl__
24#define __com_sun_star_ucb_XInteractionSupplyAuthentication_idl__
25
26#ifndef __com_sun_star_task_XInteractionContinuation_idl__
27#include <com/sun/star/task/XInteractionContinuation.idl>
28#endif
29
30#ifndef __com_sun_star_ucb_RememberAuthentication_idl__
31#include <com/sun/star/ucb/RememberAuthentication.idl>
32#endif
33
34
35//=============================================================================
36
37module com { module sun { module star { module ucb {
38
39//=============================================================================
40/** An interaction continuation handing back some authentication data.
41
42    <p> This continuation is typically used in conjunction with
43    <type>AuthenticationRequest</type>. </p>
44*/
45published interface XInteractionSupplyAuthentication: com::sun::star::task::XInteractionContinuation
46{
47    //-------------------------------------------------------------------------
48    /** Specifies if a new 'realm' value can be handed back.
49    */
50    boolean canSetRealm();
51
52    //-------------------------------------------------------------------------
53    /** Set a new 'realm' value to hand back.
54
55        <p>This method should be called before
56        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
57        and should only be called if
58        <member>XInteractionSupplyAuthentication::canSetRealm</member> returned
59        <true/>.</p>
60    */
61    void setRealm( [in] string Realm );
62
63    //-------------------------------------------------------------------------
64    /** Specifies if a 'user name' value can be handed back.
65    */
66    boolean canSetUserName();
67
68    //-------------------------------------------------------------------------
69    /** Set a new 'user name' value to hand back.
70
71        <p>This method should be called before
72        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
73        and should only be called if
74        <member>XInteractionSupplyAuthentication::canSetUserName</member>
75        returned <true/>.</p>
76    */
77    void setUserName( [in] string UserName );
78
79    //-------------------------------------------------------------------------
80    /** Specifies if a 'password' value can be handed back.
81    */
82    boolean canSetPassword();
83
84    //-------------------------------------------------------------------------
85    /** Set a new 'password' value to hand back.
86
87        <p>This method should be called before
88        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
89        and should only be called if
90        <member>XInteractionSupplyAuthentication::canSetPassword</member>
91        returned <true/>.</p>
92    */
93    void setPassword( [in] string Password );
94
95    //-------------------------------------------------------------------------
96    /** Specifies the available modes of how long to remember the password.
97
98        @param Default
99        Returns the default mode (to be initially displayed to the user).
100
101        @returns
102        A sequence of available modes to hand back.  Each individual mode
103        should appear at most once in the sequence.  If the sequence is empty,
104        a new mode cannot be handed back.
105    */
106    sequence<com::sun::star::ucb::RememberAuthentication> getRememberPasswordModes( [out] com::sun::star::ucb::RememberAuthentication Default );
107
108    //-------------------------------------------------------------------------
109    /** Set a new mode of how long to remember the password.
110
111        <p>This method should be called before
112        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
113        and should only be called if
114        <member>XInteractionSupplyAuthentication::setPassword</member>
115        is also called.</p>
116
117        @param Remember
118        The mode to hand back, should be contained in the sequence returned by
119        <member>XInteractionSupplyAuthentication::getRememberPasswordModes</member>.
120    */
121    void setRememberPassword( [in] com::sun::star::ucb::RememberAuthentication Remember );
122
123    //-------------------------------------------------------------------------
124    /** Specifies if an 'account' value can be handed back.
125    */
126    boolean canSetAccount();
127
128    //-------------------------------------------------------------------------
129    /** Set a new 'account' value to hand back.
130
131        <p>This method should be called before
132        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
133        and should only be called if
134        <member>XInteractionSupplyAuthentication::canSetAccount</member>
135        returned <true/>.</p>
136
137    */
138    void setAccount( [in] string Account );
139
140    //-------------------------------------------------------------------------
141    /** Specifies the available modes of how long to remember the account.
142
143        @param Default  Returns the default mode (to be initially displayed to
144        the user).
145
146        @returns  A sequence of available modes to hand back.  Each individual
147        mode should appear at most once in the sequence.  If the sequence is
148        empty, a new mode cannot be handed back.
149     */
150    sequence<com::sun::star::ucb::RememberAuthentication> getRememberAccountModes( [out] com::sun::star::ucb::RememberAuthentication Default );
151
152    //-------------------------------------------------------------------------
153    /** Set a new mode of how long to remember the account.
154
155        <p>This method should be called before
156        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
157        and should only be called if
158        <member>XInteractionSupplyAuthentication::setAccount</member>
159        is also called.</p>
160
161        @param Remember  The mode to hand back, should be contained in the
162        sequence returned by
163        <member>XInteractionSupplyAuthentication::getRememberAccountModes</member>.
164    */
165    void setRememberAccount( [in] com::sun::star::ucb::RememberAuthentication Remember );
166
167};
168
169//=============================================================================
170
171}; }; }; };
172
173#endif
174