CASA/c_adlib/ad_ff/native/ProfileManager.h

94 lines
2.5 KiB
C
Raw Normal View History

2006-03-10 19:39:22 +01:00
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
2006-02-28 12:17:08 +01:00
#ifndef __FPM_PROFILE_MANAGER_H__
#define __FPM_PROFILE_MANAGER_H__
#include "FirefoxPasswordManager.h"
#include "Common.h"
#include "SignonManager.h"
class ProfileManager
{
SignonManager signonManager;
char *profilePath;
char *libraryPath;
char *masterPassword;
HMODULE libnss;
HMODULE libplc;
// NSS Library function pointers
NSS_Init NSSInit;
NSS_Shutdown NSSShutdown;
//PK11_SetPasswordFunc PK11SetPasswordFunc;
PK11_GetInternalKeySlot PK11GetInternalKeySlot;
PK11_FreeSlot PK11FreeSlot;
PK11_Authenticate PK11Authenticate;
PK11_CheckUserPassword PK11CheckUserPassword;
PK11SDR_Decrypt PK11SDRDecrypt;
PK11SDR_Encrypt PK11SDREncrypt;
PL_Base64Encode PLBase64Encode;
PL_Base64Decode PLBase64Decode;
public :
char *profileName;
int isInitialized;
private :
char *GetFirefoxProfilePath(char *profileName);
char *GetFirefoxLibPath();
HMODULE PMLoadLibrary(char *firefoxDir, char *libName);
int RefreshSignonData();
public:
ProfileManager();
2006-03-08 14:11:43 +01:00
int IsStoreAvailable();
2006-02-28 12:17:08 +01:00
int ProfileInit(char *profileName);
void ProfileExit();
int IsMasterPasswordSet();
int CheckMasterPassword(char *masterPassword, int doSave);
int GetSignonData( struct Host **host, int doRefresh);
int WriteSignonData();
int AddHost(struct Host *host, int doUpdate);
int ModifyHost(struct Host *host, int doUpdat);
int RemoveHost(char *hostname, int doUpdate);
};
#endif