This commit is contained in:
Manohar 2006-03-01 10:47:25 +00:00
parent 1cdb45bdc2
commit 9a3daac2ef
2 changed files with 22 additions and 22 deletions

View File

@ -52,16 +52,16 @@ namespace Novell.CASA.DataEngines
public FFEngine() public FFEngine()
{ {
//Get Profile Names //Get Profile Names
Console.WriteLine("FFEngine Constructor:Invoking GetDefaultProfileName:"); //Console.WriteLine("FFEngine Constructor:Invoking GetDefaultProfileName:");
defaultProfileName=FireFox.GetDefaultProfileName(); defaultProfileName=FireFox.GetDefaultProfileName();
//This can be extended to get all profiles : Use FireFox.GetAllProfileNames() //This can be extended to get all profiles : Use FireFox.GetAllProfileNames()
//Currently we support only the default profile. //Currently we support only the default profile.
if(defaultProfileName!=null) if(defaultProfileName!=null)
{ {
Console.WriteLine("FFEngine Constructor:Initializing the Profile "+defaultProfileName); //Console.WriteLine("FFEngine Constructor:Initializing the Profile "+defaultProfileName);
initProfileStatus=FireFox.InitProfile(defaultProfileName); initProfileStatus=FireFox.InitProfile(defaultProfileName);
Console.WriteLine("FFEngine Constructor:InitProfile returned "+initProfileStatus); //Console.WriteLine("FFEngine Constructor:InitProfile returned "+initProfileStatus);
} }
else else
Console.WriteLine("FFEngine Constructor:Could not get a Default Profile Name"); Console.WriteLine("FFEngine Constructor:Could not get a Default Profile Name");
@ -96,7 +96,7 @@ namespace Novell.CASA.DataEngines
//Initialize & Aggregate any other profiles here if required.... //Initialize & Aggregate any other profiles here if required....
Console.WriteLine("FFEngine:Returning Aggregated Node for FireFox:"); //Console.WriteLine("FFEngine:Returning Aggregated Node for FireFox:");
return rootElem; return rootElem;
} }
@ -188,7 +188,7 @@ namespace Novell.CASA.DataEngines
{ {
Host hostList = null; Host hostList = null;
Console.WriteLine("FireFox:Getting Data for profile "+profileName); //Console.WriteLine("FireFox:Getting Data for profile "+profileName);
hostList=FireFox.GetProfileData(profileName); hostList=FireFox.GetProfileData(profileName);
if(hostList!=null) if(hostList!=null)
@ -215,8 +215,8 @@ namespace Novell.CASA.DataEngines
hostName = (String)Marshal.PtrToStringAnsi(hostList.hostName); hostName = (String)Marshal.PtrToStringAnsi(hostList.hostName);
Console.WriteLine("--------------------------------------------"); //Console.WriteLine("--------------------------------------------");
Console.WriteLine("FFEngine::hostName="+hostName); //Console.WriteLine("FFEngine::hostName="+hostName);
XmlAttribute secIdAttr = doc.CreateAttribute(ConstStrings.CCF_ID); //<Secret>-ID XmlAttribute secIdAttr = doc.CreateAttribute(ConstStrings.CCF_ID); //<Secret>-ID
secIdAttr.Value = hostName; secIdAttr.Value = hostName;
xmlSecretElement.SetAttributeNode(secIdAttr); xmlSecretElement.SetAttributeNode(secIdAttr);
@ -236,11 +236,11 @@ namespace Novell.CASA.DataEngines
XmlElement xmlValueElement = null; XmlElement xmlValueElement = null;
name = (String)Marshal.PtrToStringAnsi(hostElementList.name); name = (String)Marshal.PtrToStringAnsi(hostElementList.name);
Console.WriteLine("FFEngine::name="+name); //Console.WriteLine("FFEngine::name="+name);
value = (String)Marshal.PtrToStringAnsi(hostElementList.value); value = (String)Marshal.PtrToStringAnsi(hostElementList.value);
Console.WriteLine("FFEngine::value="+value); //Console.WriteLine("FFEngine::value="+value);
isPassword = hostElementList.isPassword; isPassword = hostElementList.isPassword;
Console.WriteLine("FFEngine::isPassword="+isPassword); //Console.WriteLine("FFEngine::isPassword="+isPassword);
xmlKeyElement = doc.CreateElement(ConstStrings.CCF_KEY); //<Key xmlKeyElement = doc.CreateElement(ConstStrings.CCF_KEY); //<Key
keyIdAttr = doc.CreateAttribute(ConstStrings.CCF_ID); //<Key>-ID keyIdAttr = doc.CreateAttribute(ConstStrings.CCF_ID); //<Key>-ID
@ -266,7 +266,7 @@ namespace Novell.CASA.DataEngines
//OUTERLOOP-Loop for hostList //OUTERLOOP-Loop for hostList
if (hostList.next == IntPtr.Zero) if (hostList.next == IntPtr.Zero)
{ {
Console.WriteLine("FFEngine::End of all Data Items##"); //Console.WriteLine("FFEngine::End of all Data Items##");
break; break;
} }

View File

@ -173,16 +173,16 @@ public class HostElement
int profCount=0; int profCount=0;
String defaultProfileName=null; String defaultProfileName=null;
Console.WriteLine("FireFox:Invoking FPM_GetProfileList:"); //Console.WriteLine("FireFox:Invoking FPM_GetProfileList:");
profCount=FPM_GetProfileList(out profileListIntPtr,out profileFlagsIntPtr); profCount=FPM_GetProfileList(out profileListIntPtr,out profileFlagsIntPtr);
Console.WriteLine("FireFox:No of Profiles found= "+profCount); //Console.WriteLine("FireFox:No of Profiles found= "+profCount);
for(int i=0; i< profCount; i++) for(int i=0; i< profCount; i++)
{ {
profileName=Marshal.PtrToStringAnsi(profileListIntPtr[i]); profileName=Marshal.PtrToStringAnsi(profileListIntPtr[i]);
profileFlag=(int)profileFlagsIntPtr[i]; profileFlag=(int)profileFlagsIntPtr[i];
Console.WriteLine("FireFox:Iter="+i+"profileName="+profileName); //Console.WriteLine("FireFox:Iter="+i+"profileName="+profileName);
Console.WriteLine("FireFox:Iter="+i+"profileFlag="+profileFlag); //Console.WriteLine("FireFox:Iter="+i+"profileFlag="+profileFlag);
if(profileFlag==1) if(profileFlag==1)
defaultProfileName=profileName; //Get the default profile name to init later defaultProfileName=profileName; //Get the default profile name to init later
} }
@ -230,12 +230,12 @@ public class HostElement
IntPtr hostListIntPtr = new IntPtr(); IntPtr hostListIntPtr = new IntPtr();
try try
{ {
Console.WriteLine("FireFox:Getting Data for profile "+profileName); //Console.WriteLine("FireFox:Getting Data for profile "+profileName);
methodStatusCode=-1; methodStatusCode=-1;
methodStatusCode = FPM_GetSignonData(profileName,out hostListIntPtr,LOAD_PROFILE_ALWAYSFROM_FILE); methodStatusCode = FPM_GetSignonData(profileName,out hostListIntPtr,LOAD_PROFILE_ALWAYSFROM_FILE);
if( 1 != methodStatusCode ) if( 1 != methodStatusCode )
{ {
Console.WriteLine("FireFox:Getting Data for profile Failed with error "+methodStatusCode); //Console.WriteLine("FireFox:Getting Data for profile Failed with error "+methodStatusCode);
hostList = null; hostList = null;
} }
@ -243,7 +243,7 @@ public class HostElement
catch(Exception e) catch(Exception e)
{ {
Console.WriteLine("FireFox:Exception during invokation of FPM_GetSignonData"); Console.WriteLine("FireFox:Exception during invokation of FPM_GetSignonData");
Console.WriteLine(e.ToString()); //Console.WriteLine(e.ToString());
hostList = null; hostList = null;
} }
@ -252,7 +252,7 @@ public class HostElement
if (((String)Marshal.PtrToStringAnsi(hostList.hostName)) == null ) if (((String)Marshal.PtrToStringAnsi(hostList.hostName)) == null )
{ {
//TBD: Log that there are no secrets to aggregate //TBD: Log that there are no secrets to aggregate
Console.WriteLine("FireFox:no secrets to aggregate"); //Console.WriteLine("FireFox:no secrets to aggregate");
hostList = null; hostList = null;
} }
@ -291,7 +291,7 @@ public class HostElement
{ {
int methodStatusCode=-1; int methodStatusCode=-1;
Console.WriteLine("FireFox:UninitProfile for "+profileName); //Console.WriteLine("FireFox:UninitProfile for "+profileName);
methodStatusCode=-1; methodStatusCode=-1;
methodStatusCode = FPM_FirefoxProfileExit(profileName); methodStatusCode = FPM_FirefoxProfileExit(profileName);
if( 1 != methodStatusCode ) if( 1 != methodStatusCode )
@ -317,7 +317,7 @@ public class HostElement
{ {
int methodStatusCode=0; int methodStatusCode=0;
Console.WriteLine("FireFox:isMasterPasswordSetFor "+profileName); //Console.WriteLine("FireFox:isMasterPasswordSetFor "+profileName);
methodStatusCode = FPM_IsMasterPasswordSet(profileName); methodStatusCode = FPM_IsMasterPasswordSet(profileName);
return methodStatusCode; return methodStatusCode;
@ -340,7 +340,7 @@ public class HostElement
{ {
int methodStatusCode=0; int methodStatusCode=0;
Console.WriteLine("FireFox:checking MasterPassword for "+profileName); //Console.WriteLine("FireFox:checking MasterPassword for "+profileName);
methodStatusCode = FPM_CheckMasterPassword(profileName,masterPassword); methodStatusCode = FPM_CheckMasterPassword(profileName,masterPassword);
return methodStatusCode; return methodStatusCode;