Bug 133386 fixes

This commit is contained in:
Jim Norman 2006-02-14 00:40:33 +00:00
parent 96b2637e43
commit 72c87b8e2e
4 changed files with 975 additions and 939 deletions

View File

@ -430,5 +430,36 @@ namespace Novell.CASA.DataEngines
return ConstStrings.CASA_SUCCESS;
}
/***********************************************************************************************
IsStoreAvailable : Checks If Store Is Available
It loads the required dlls for a particular store and returns true if
all required dll/.so are present.
public static Boolean IsStoreAvailable(int StoreID);
Parameters
StoreID : int value
Novell.CASA.DataEngines.Common.ConstStrings.CASA_STORE_KWALLET = 3;
Novell.CASA.DataEngines.Common.ConstStrings.CASA_STORE_GK = 4
Remarks
1. This API needs to be called before any other API of the particular store is called.
2. This API needs to be called before Aggregate() and AD_Facade constructor is called
as these initializes the Datangines based on the Aggregate Policy set.
3. The Aggregate Policy needs to be reset appropriately based on the return value of this call.
***********************************************************************************************/
public static Boolean IsStoreAvailable(int StoreID)
{
if (StoreID == ConstStrings.CASA_STORE_GK)
return GKEngine.IsStoreAvailable();
if (StoreID == ConstStrings.CASA_STORE_KWALLET)
return KWalletEngine.IsStoreAvailable();
return true;
}
}
}

View File

@ -56,7 +56,7 @@ namespace Novell.CASA.DataEngines
~GKEngine()
{
GnomeKeyring.ReleaseGnomeKeyringLib();
//GnomeKeyring.ReleaseGnomeKeyringLib();
}
public XmlNode Aggregate()
@ -298,10 +298,10 @@ namespace Novell.CASA.DataEngines
try
{
System.Runtime.InteropServices.Marshal.PrelinkAll(typeof(GnomeKeyring));
if (GnomeKeyring.IsGnomeKeyringInstalled())
//if (GnomeKeyring.IsGnomeKeyringInstalled())
return true;
else
return false;
//else
// return false;
}
catch(DllNotFoundException d)
{

View File

@ -453,6 +453,11 @@ namespace Novell.CASA.DataEngines
return 0;
}
public static Boolean IsStoreAvailable()
{
return true;
}
#if TEST
public static void Main()