This commit is contained in:
parent
1cdb45bdc2
commit
9a3daac2ef
@ -52,16 +52,16 @@ namespace Novell.CASA.DataEngines
|
||||
public FFEngine()
|
||||
{
|
||||
//Get Profile Names
|
||||
Console.WriteLine("FFEngine Constructor:Invoking GetDefaultProfileName:");
|
||||
//Console.WriteLine("FFEngine Constructor:Invoking GetDefaultProfileName:");
|
||||
defaultProfileName=FireFox.GetDefaultProfileName();
|
||||
//This can be extended to get all profiles : Use FireFox.GetAllProfileNames()
|
||||
//Currently we support only the default profile.
|
||||
|
||||
if(defaultProfileName!=null)
|
||||
{
|
||||
Console.WriteLine("FFEngine Constructor:Initializing the Profile "+defaultProfileName);
|
||||
//Console.WriteLine("FFEngine Constructor:Initializing the Profile "+defaultProfileName);
|
||||
initProfileStatus=FireFox.InitProfile(defaultProfileName);
|
||||
Console.WriteLine("FFEngine Constructor:InitProfile returned "+initProfileStatus);
|
||||
//Console.WriteLine("FFEngine Constructor:InitProfile returned "+initProfileStatus);
|
||||
}
|
||||
else
|
||||
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....
|
||||
|
||||
Console.WriteLine("FFEngine:Returning Aggregated Node for FireFox:");
|
||||
//Console.WriteLine("FFEngine:Returning Aggregated Node for FireFox:");
|
||||
return rootElem;
|
||||
|
||||
}
|
||||
@ -188,7 +188,7 @@ namespace Novell.CASA.DataEngines
|
||||
{
|
||||
Host hostList = null;
|
||||
|
||||
Console.WriteLine("FireFox:Getting Data for profile "+profileName);
|
||||
//Console.WriteLine("FireFox:Getting Data for profile "+profileName);
|
||||
hostList=FireFox.GetProfileData(profileName);
|
||||
|
||||
if(hostList!=null)
|
||||
@ -215,8 +215,8 @@ namespace Novell.CASA.DataEngines
|
||||
|
||||
|
||||
hostName = (String)Marshal.PtrToStringAnsi(hostList.hostName);
|
||||
Console.WriteLine("--------------------------------------------");
|
||||
Console.WriteLine("FFEngine::hostName="+hostName);
|
||||
//Console.WriteLine("--------------------------------------------");
|
||||
//Console.WriteLine("FFEngine::hostName="+hostName);
|
||||
XmlAttribute secIdAttr = doc.CreateAttribute(ConstStrings.CCF_ID); //<Secret>-ID
|
||||
secIdAttr.Value = hostName;
|
||||
xmlSecretElement.SetAttributeNode(secIdAttr);
|
||||
@ -236,11 +236,11 @@ namespace Novell.CASA.DataEngines
|
||||
XmlElement xmlValueElement = null;
|
||||
|
||||
name = (String)Marshal.PtrToStringAnsi(hostElementList.name);
|
||||
Console.WriteLine("FFEngine::name="+name);
|
||||
//Console.WriteLine("FFEngine::name="+name);
|
||||
value = (String)Marshal.PtrToStringAnsi(hostElementList.value);
|
||||
Console.WriteLine("FFEngine::value="+value);
|
||||
//Console.WriteLine("FFEngine::value="+value);
|
||||
isPassword = hostElementList.isPassword;
|
||||
Console.WriteLine("FFEngine::isPassword="+isPassword);
|
||||
//Console.WriteLine("FFEngine::isPassword="+isPassword);
|
||||
|
||||
xmlKeyElement = doc.CreateElement(ConstStrings.CCF_KEY); //<Key
|
||||
keyIdAttr = doc.CreateAttribute(ConstStrings.CCF_ID); //<Key>-ID
|
||||
@ -266,7 +266,7 @@ namespace Novell.CASA.DataEngines
|
||||
//OUTERLOOP-Loop for hostList
|
||||
if (hostList.next == IntPtr.Zero)
|
||||
{
|
||||
Console.WriteLine("FFEngine::End of all Data Items##");
|
||||
//Console.WriteLine("FFEngine::End of all Data Items##");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -173,16 +173,16 @@ public class HostElement
|
||||
int profCount=0;
|
||||
String defaultProfileName=null;
|
||||
|
||||
Console.WriteLine("FireFox:Invoking FPM_GetProfileList:");
|
||||
//Console.WriteLine("FireFox:Invoking FPM_GetProfileList:");
|
||||
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++)
|
||||
{
|
||||
profileName=Marshal.PtrToStringAnsi(profileListIntPtr[i]);
|
||||
profileFlag=(int)profileFlagsIntPtr[i];
|
||||
Console.WriteLine("FireFox:Iter="+i+"profileName="+profileName);
|
||||
Console.WriteLine("FireFox:Iter="+i+"profileFlag="+profileFlag);
|
||||
//Console.WriteLine("FireFox:Iter="+i+"profileName="+profileName);
|
||||
//Console.WriteLine("FireFox:Iter="+i+"profileFlag="+profileFlag);
|
||||
if(profileFlag==1)
|
||||
defaultProfileName=profileName; //Get the default profile name to init later
|
||||
}
|
||||
@ -230,12 +230,12 @@ public class HostElement
|
||||
IntPtr hostListIntPtr = new IntPtr();
|
||||
try
|
||||
{
|
||||
Console.WriteLine("FireFox:Getting Data for profile "+profileName);
|
||||
//Console.WriteLine("FireFox:Getting Data for profile "+profileName);
|
||||
methodStatusCode=-1;
|
||||
methodStatusCode = FPM_GetSignonData(profileName,out hostListIntPtr,LOAD_PROFILE_ALWAYSFROM_FILE);
|
||||
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;
|
||||
}
|
||||
|
||||
@ -243,7 +243,7 @@ public class HostElement
|
||||
catch(Exception e)
|
||||
{
|
||||
Console.WriteLine("FireFox:Exception during invokation of FPM_GetSignonData");
|
||||
Console.WriteLine(e.ToString());
|
||||
//Console.WriteLine(e.ToString());
|
||||
hostList = null;
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ public class HostElement
|
||||
if (((String)Marshal.PtrToStringAnsi(hostList.hostName)) == null )
|
||||
{
|
||||
//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;
|
||||
}
|
||||
|
||||
@ -291,7 +291,7 @@ public class HostElement
|
||||
{
|
||||
int methodStatusCode=-1;
|
||||
|
||||
Console.WriteLine("FireFox:UninitProfile for "+profileName);
|
||||
//Console.WriteLine("FireFox:UninitProfile for "+profileName);
|
||||
methodStatusCode=-1;
|
||||
methodStatusCode = FPM_FirefoxProfileExit(profileName);
|
||||
if( 1 != methodStatusCode )
|
||||
@ -317,7 +317,7 @@ public class HostElement
|
||||
{
|
||||
int methodStatusCode=0;
|
||||
|
||||
Console.WriteLine("FireFox:isMasterPasswordSetFor "+profileName);
|
||||
//Console.WriteLine("FireFox:isMasterPasswordSetFor "+profileName);
|
||||
methodStatusCode = FPM_IsMasterPasswordSet(profileName);
|
||||
|
||||
return methodStatusCode;
|
||||
@ -340,7 +340,7 @@ public class HostElement
|
||||
{
|
||||
int methodStatusCode=0;
|
||||
|
||||
Console.WriteLine("FireFox:checking MasterPassword for "+profileName);
|
||||
//Console.WriteLine("FireFox:checking MasterPassword for "+profileName);
|
||||
methodStatusCode = FPM_CheckMasterPassword(profileName,masterPassword);
|
||||
|
||||
return methodStatusCode;
|
||||
|
Loading…
Reference in New Issue
Block a user