Back to index

lightning-sunbird  0.9+nobinonly
wallet.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is Mozilla Communicator client code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 
00039 /*
00040    wallet.h --- prototypes for wallet functions.
00041 */
00042 
00043 
00044 #ifndef _WALLET_H
00045 #define _WALLET_H
00046 
00047 #include "prtypes.h"
00048 #include "nsIPresShell.h"
00049 #include "nsString.h"
00050 #include "nsIPrompt.h"
00051 
00052 class nsIInputStream;
00053 class nsIOutputStream;
00054 class nsIFile;
00055 class nsIDOMWindowInternal;
00056 class nsIDOMNode;
00057 
00058 PR_BEGIN_EXTERN_C
00059 
00060 #define HEADER_VERSION "#2c"
00061 
00062 #define YES_BUTTON 0
00063 #define NO_BUTTON 1
00064 #define NEVER_BUTTON 2
00065 
00066 #define pref_Crypto "wallet.crypto"
00067 #define pref_AutoCompleteOverride "wallet.crypto.autocompleteoverride"
00068 
00069 extern void
00070 WLLT_ChangePassword(PRBool* status);
00071 
00072 extern void
00073 WLLT_DeleteAll();
00074 
00075 extern void
00076 WLLT_ClearUserData();
00077 
00078 extern void
00079 WLLT_DeletePersistentUserData();
00080 
00081 extern void
00082 WLLT_PreEdit(nsAString& walletList);
00083 
00084 extern void
00085 WLLT_PostEdit(const nsAString& walletList);
00086 
00087 extern void
00088 WLLT_PrefillReturn(const nsAString& results);
00089 
00090 extern void
00091 WLLT_RequestToCapture(nsIPresShell* shell, nsIDOMWindowInternal * win, PRUint32* status);
00092 
00093 extern nsresult
00094 WLLT_PrefillOneElement
00095   (nsIDOMWindowInternal* win, nsIDOMNode* elementNode, nsAString& compositeValue);
00096 
00097 extern nsresult
00098 WLLT_Prefill(nsIPresShell* shell, PRBool quick, nsIDOMWindowInternal* win);
00099 
00100 extern void
00101 WLLT_GetNopreviewListForViewer(nsAString& aNopreviewList);
00102 
00103 extern void
00104 WLLT_GetNocaptureListForViewer(nsAString& aNocaptureList);
00105 
00106 extern void
00107 WLLT_GetPrefillListForViewer(nsAString& aPrefillList);
00108 
00109 extern void
00110 WLLT_OnSubmit(nsIContent* formNode, nsIDOMWindowInternal* window);
00111 
00112 extern void
00113 WLLT_ExpirePassword(PRBool* status);
00114 
00115 extern void
00116 WLLT_ExpirePasswordOnly(PRBool* status);
00117 
00118 extern void
00119 WLLT_InitReencryptCallback(nsIDOMWindowInternal* window);
00120 
00121 extern nsresult
00122 Wallet_Encrypt(const nsAString& text, nsAString& crypt);
00123 
00124 extern nsresult
00125 Wallet_Decrypt(const nsAString& crypt, nsAString& text);
00126 
00127 extern nsresult
00128 wallet_GetLine(nsIInputStream* strm, nsACString& line);
00129 
00134 extern void
00135 wallet_PutLine(nsIOutputStream* strm, const char* line);
00136 
00140 extern nsresult Wallet_ProfileDirectory(nsIFile** aFile);
00141 
00142 extern PRUnichar * Wallet_Localize(const char * genericString);
00143 
00144 extern char* Wallet_RandomName(char* suffix);
00145 
00146 extern PRBool Wallet_ConfirmYN(PRUnichar * szMessage, nsIDOMWindowInternal* window);
00147 
00148 extern PRInt32 Wallet_3ButtonConfirm(PRUnichar * szMessage, nsIDOMWindowInternal* window);
00149 
00150 extern void Wallet_GiveCaveat(nsIDOMWindowInternal* window, nsIPrompt* dialog);
00151 
00152 extern void
00153 Wallet_SignonViewerReturn(const nsAString& results);
00154 
00155 extern void
00156 Wallet_ReleaseAllLists();
00157 
00158 PR_END_EXTERN_C
00159 
00160 #endif /* !_WALLET_H */