removed single-signon dependency on lo_ele.h and MWContext

This commit is contained in:
morse%netscape.com 1999-02-05 22:05:59 +00:00
parent 45e0041feb
commit aabe3e8b27
5 changed files with 19 additions and 24 deletions

View File

@ -268,11 +268,9 @@ extern Bool LO_GridCanGoBackward(MWContext *context);
extern void SI_RestoreSignonData
(char* URLName, char* name, char** value);
extern void SI_RememberSignonData
(char* URLName, LO_FormSubmitData *submit);
(char* URLName, char** name_array, char** value_array, char** type_array, PRInt32 value_cnt);
extern void SI_RememberSignonDataFromBrowser
(MWContext *context,char* URLName, char* username, char* password);
extern void SI_RestoreOldSignonData
(MWContext *context, LO_FormElementStruct *form_element, char *URLName);
(char* URLName, char* username, char* password);
extern void SI_RestoreOldSignonDataFromBrowser
(MWContext *context, char* URLName, Bool pickFirstUser,
char** username, char** password);

View File

@ -57,7 +57,8 @@
#include "prenv.h"
#ifdef SingleSignon
#include "proto.h"
#define FORM_TYPE_TEXT 1
#define FORM_TYPE_PASSWORD 7
#include "nsINetService.h"
#include "nsIServiceManager.h"
static NS_DEFINE_IID(kINetServiceIID, NS_INETSERVICE_IID);
@ -603,12 +604,7 @@ void nsFormFrame::ProcessAsURLEncoded(PRBool isPost, nsString& aData, nsIFormCon
char* name_array[MAX_ARRAY_SIZE];
char* value_array[MAX_ARRAY_SIZE];
uint8 type_array[MAX_ARRAY_SIZE];
LO_FormSubmitData submit;
submit.value_cnt = 0;
submit.type_array = (PA_Block)type_array;
submit.name_array = (PA_Block)name_array;
submit.value_array = (PA_Block)value_array;
PRInt32 value_cnt = 0;
/* get url name as ascii string */
char *URLName;
@ -643,15 +639,15 @@ void nsFormFrame::ProcessAsURLEncoded(PRBool isPost, nsString& aData, nsIFormCon
child->GetType(&type);
if ((type == NS_FORM_INPUT_PASSWORD) || (type == NS_FORM_INPUT_TEXT)) {
if (type == NS_FORM_INPUT_PASSWORD) {
type_array[submit.value_cnt] = FORM_TYPE_PASSWORD;
type_array[value_cnt] = FORM_TYPE_PASSWORD;
} else {
type_array[submit.value_cnt] = FORM_TYPE_TEXT;
type_array[value_cnt] = FORM_TYPE_TEXT;
}
value_array[submit.value_cnt] =
value_array[value_cnt] =
values[0].ToNewCString();
name_array[submit.value_cnt] =
name_array[value_cnt] =
names[0].ToNewCString();
submit.value_cnt++;
value_cnt++;
}
#endif
for (int valueX = 0; valueX < numValues; valueX++) {
@ -680,13 +676,14 @@ void nsFormFrame::ProcessAsURLEncoded(PRBool isPost, nsString& aData, nsIFormCon
kINetServiceIID,
(nsISupports **)&service);
if ((NS_OK == res) && (nsnull != service)) {
res = service->SI_RememberSignonData(URLName, &submit);
res = service->SI_RememberSignonData
(URLName, (char**)name_array, (char**)value_array, (char**)type_array, value_cnt);
NS_RELEASE(service);
}
PR_FREEIF(URLName);
while (submit.value_cnt--) {
PR_FREEIF(name_array[submit.value_cnt]);
PR_FREEIF(value_array[submit.value_cnt]);
while (value_cnt--) {
PR_FREEIF(name_array[value_cnt]);
PR_FREEIF(value_array[value_cnt]);
}
#endif

View File

@ -109,7 +109,7 @@ struct nsINetService : public nsISupports
#ifdef SingleSignon
NS_IMETHOD SI_DisplaySignonInfoAsHTML()=0;
NS_IMETHOD SI_RememberSignonData
(char* URLName, LO_FormSubmitData *submit)=0;
(char* URLName, char** name_array, char** value_array, char** type_array, PRInt32 value_cnt)=0;
NS_IMETHOD SI_RestoreSignonData
(char* URLNAME, char* name, char** value)=0;
#endif

View File

@ -694,8 +694,8 @@ nsNetlibService::SI_DisplaySignonInfoAsHTML(){
NS_IMETHODIMP
nsNetlibService::SI_RememberSignonData
(char* URLName, LO_FormSubmitData *submit) {
::SI_RememberSignonData(URLName, submit);
(char* URLName, char** name_array, char** value_array, char** type_array, PRInt32 value_cnt) {
::SI_RememberSignonData(URLName, name_array, value_array, type_array, value_cnt);
return NS_OK;
}

View File

@ -53,7 +53,7 @@ public:
#ifdef SingleSignon
NS_IMETHOD SI_DisplaySignonInfoAsHTML();
NS_IMETHOD SI_RememberSignonData
(char* URLName, LO_FormSubmitData *submit);
(char* URLName, char** name_array, char** value_array, char** type_array, PRInt32 value_cnt);
NS_IMETHOD SI_RestoreSignonData
(char* URLNAME, char* name, char** value);
#endif