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