xref: /trunk/main/offapi/com/sun/star/task/XPasswordContainer.idl (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
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_task_XPasswordContainer_idl__
28#define __com_sun_star_task_XPasswordContainer_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_task_UrlRecord_idl__
35#include <com/sun/star/task/UrlRecord.idl>
36#endif
37
38#ifndef __com_sun_star_task_XInteractionHandler_idl__
39#include <com/sun/star/task/XInteractionHandler.idl>
40#endif
41
42
43//=============================================================================
44
45module com { module sun { module star { module task {
46
47//=============================================================================
48/** Allows to save passwords with URL-pattern, to use them later.
49*/
50published interface XPasswordContainer : com::sun::star::uno::XInterface
51{
52    //-------------------------------------------------------------------------
53    /** Save passwords in to the container.
54
55        @param Url        URL-pattern, that will be used later to retrieve
56        passwords.
57
58        @param UseName    The username.
59
60        @param Passwords  The password-list.
61
62        @param Handler    The handler to get superpassword to en/decript passwords
63
64
65    */
66    void   add( [in] string Url, [in] string UserName, [in] sequence<string> Passwords, [in] XInteractionHandler Handler );
67
68    //-------------------------------------------------------------------------
69    /** Save passwords in to the container, and store them in the file.
70
71        @param Url        URL-pattern, that will be used later to retrieve
72                          passwords.
73
74        @param UseName    The username.
75
76        @param Passwords  The password-list.
77
78        @param Handler    The handler to get superpassword to en/decript passwords
79
80
81    */
82    void   addPersistent( [in] string Url, [in] string UserName, [in] sequence<string> Passwords, [in] XInteractionHandler Handler );
83
84    //-------------------------------------------------------------------------
85    /** Find users with passwords for the url pattern.
86
87        @param Url     URL-pattern to retrieve password for.
88
89        @param Handler    The handler to get superpassword to en/decript passwords
90
91        @returns       Best matched url-pattern with user-records list.
92    */
93    UrlRecord find( [in] string Url, [in] XInteractionHandler Handler );
94
95    //-------------------------------------------------------------------------
96    /** Find passwords for the url pattern and username.
97
98        @param Url      URL-pattern to retrieve passwords for.
99
100        @param UserName Username to retrieve passwords for.
101
102        @param Handler    The handler to get superpassword to en/decript passwords
103
104        @returns        Best matched url-pattern for the username.
105    */
106    UrlRecord findForName( [in] string Url, [in] string UserName , [in] XInteractionHandler Handler );
107
108    //-------------------------------------------------------------------------
109    /** Remove passwords for the url pattern and username.
110
111        @param Url      URL-pattern to remove passwords for.
112
113        @param UserName Username to remove passwords for.
114
115    */
116    void remove( [in] string Url, [in] string UserName );
117
118
119    //-------------------------------------------------------------------------
120    /** Remove passwords for the url pattern and username from the file.
121
122        @param Url      URL-pattern to remove passwords for.
123
124        @param UserName Username to remove passwords for.
125
126    */
127    void removePersistent( [in] string Url, [in] string UserName );
128
129    //-------------------------------------------------------------------------
130    /** Clean the file.
131    */
132    void removeAllPersistent();
133
134    //-------------------------------------------------------------------------
135    /** Get all records from the file.
136
137        @returns        List of url-records.
138    */
139    sequence<UrlRecord> getAllPersistent( [in] XInteractionHandler Handler );
140
141};
142
143//=============================================================================
144
145}; }; }; };
146
147#endif
148