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_ucb_XInteractionSupplyAuthentication_idl__
28#define __com_sun_star_ucb_XInteractionSupplyAuthentication_idl__
29
30#ifndef __com_sun_star_task_XInteractionContinuation_idl__
31#include <com/sun/star/task/XInteractionContinuation.idl>
32#endif
33
34#ifndef __com_sun_star_ucb_RememberAuthentication_idl__
35#include <com/sun/star/ucb/RememberAuthentication.idl>
36#endif
37
38
39//=============================================================================
40
41module com { module sun { module star { module ucb {
42
43//=============================================================================
44/** An interaction continuation handing back some authentication data.
45
46	<p> This continuation is typically used in conjunction with
47	<type>AuthenticationRequest</type>. </p>
48*/
49published interface XInteractionSupplyAuthentication: com::sun::star::task::XInteractionContinuation
50{
51	//-------------------------------------------------------------------------
52	/** Specifies if a new 'realm' value can be handed back.
53	*/
54	boolean canSetRealm();
55
56	//-------------------------------------------------------------------------
57	/** Set a new 'realm' value to hand back.
58
59		<p>This method should be called before
60        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
61        and should only	be called if
62        <member>XInteractionSupplyAuthentication::canSetRealm</member> returned
63        <true/>.</p>
64	*/
65	void setRealm( [in] string Realm );
66
67	//-------------------------------------------------------------------------
68	/** Specifies if a 'user name' value can be handed back.
69	*/
70	boolean canSetUserName();
71
72	//-------------------------------------------------------------------------
73	/** Set a new 'user name' value to hand back.
74
75		<p>This method should be called before
76        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
77        and should only	be called if
78        <member>XInteractionSupplyAuthentication::canSetUserName</member>
79        returned <true/>.</p>
80	*/
81	void setUserName( [in] string UserName );
82
83	//-------------------------------------------------------------------------
84	/** Specifies if a 'password' value can be handed back.
85	*/
86	boolean canSetPassword();
87
88	//-------------------------------------------------------------------------
89	/** Set a new 'password' value to hand back.
90
91		<p>This method should be called before
92        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
93        and should only	be called if
94        <member>XInteractionSupplyAuthentication::canSetPassword</member>
95        returned <true/>.</p>
96	*/
97	void setPassword( [in] string Password );
98
99	//-------------------------------------------------------------------------
100	/** Specifies the available modes of how long to remember the password.
101
102		@param Default
103		Returns the default mode (to be initially displayed to the user).
104
105		@returns
106		A sequence of available modes to hand back.  Each individual mode
107		should appear at most once in the sequence.  If the sequence is	empty,
108		a new mode cannot be handed back.
109	*/
110	sequence<com::sun::star::ucb::RememberAuthentication> getRememberPasswordModes( [out] com::sun::star::ucb::RememberAuthentication Default );
111
112	//-------------------------------------------------------------------------
113	/** Set a new mode of how long to remember the password.
114
115		<p>This method should be called before
116        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
117        and should only	be called if
118        <member>XInteractionSupplyAuthentication::setPassword</member>
119        is also called.</p>
120
121		@param Remember
122        The mode to hand back, should be contained in the sequence returned by
123        <member>XInteractionSupplyAuthentication::getRememberPasswordModes</member>.
124	*/
125	void setRememberPassword( [in] com::sun::star::ucb::RememberAuthentication Remember );
126
127	//-------------------------------------------------------------------------
128	/** Specifies if an 'account' value can be handed back.
129	*/
130	boolean canSetAccount();
131
132	//-------------------------------------------------------------------------
133	/** Set a new 'account' value to hand back.
134
135		<p>This method should be called before
136        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
137        and should only	be called if
138        <member>XInteractionSupplyAuthentication::canSetAccount</member>
139        returned <true/>.</p>
140
141	*/
142	void setAccount( [in] string Account );
143
144	//-------------------------------------------------------------------------
145	/** Specifies the available modes of how long to remember the account.
146
147		@param Default  Returns the default mode (to be initially displayed to
148		the user).
149
150		@returns  A sequence of available modes to hand back.  Each individual
151		mode should appear at most once in the sequence.  If the sequence is
152		empty, a new mode cannot be handed back.
153	 */
154	sequence<com::sun::star::ucb::RememberAuthentication> getRememberAccountModes( [out] com::sun::star::ucb::RememberAuthentication Default );
155
156	//-------------------------------------------------------------------------
157	/** Set a new mode of how long to remember the account.
158
159		<p>This method should be called before
160        <member scope="com::sun::star::task">XInteractionContinuation::select</member>,
161        and should only	be called if
162        <member>XInteractionSupplyAuthentication::setAccount</member>
163        is also called.</p>
164
165		@param Remember  The mode to hand back, should be contained in the
166		sequence returned by
167        <member>XInteractionSupplyAuthentication::getRememberAccountModes</member>.
168	*/
169	void setRememberAccount( [in] com::sun::star::ucb::RememberAuthentication Remember );
170
171};
172
173//=============================================================================
174
175}; }; }; };
176
177#endif
178