Bug 150975. Enable GNOME-Keyring when so is loaded

This commit is contained in:
Jim Norman
2006-02-15 00:17:28 +00:00
parent 4a565834d0
commit 2155b89bf7
5 changed files with 24 additions and 9 deletions

View File

@@ -56,7 +56,7 @@ namespace Novell.CASA.DataEngines
~GKEngine()
{
//GnomeKeyring.ReleaseGnomeKeyringLib();
GnomeKeyring.ReleaseGnomeKeyringLib();
}
public XmlNode Aggregate()
@@ -295,10 +295,20 @@ namespace Novell.CASA.DataEngines
public static Boolean IsStoreAvailable()
{
Console.WriteLine("Checking GKEngine");
try
{
System.Runtime.InteropServices.Marshal.PrelinkAll(typeof(GnomeKeyring));
return true;
System.Runtime.InteropServices.Marshal.PrelinkAll(typeof(GnomeKeyring));
if (GnomeKeyring.IsGnomeKeyringInstalled())
{
//Console.WriteLine("IsGnomeKeyringInstalled is true");
return true;
}
else
{
//Console.WriteLine("IsGnomeKeyringInstalled is false");
return false;
}
}
catch(DllNotFoundException d)
{

View File

@@ -30,7 +30,7 @@
// handle to gnome-keyring library
static void *gnomeIDK = NULL;
static char *GNOME_KEYRING_NDK = "libgnome-keyring.so";
static char *GNOME_KEYRING_NDK = "libgnome-keyring.so.0";
// function typedefs
SSCS_TYPEDEF_LIBCALL(gpointer, GNOME_KEYRING_UNLOCK_T)
@@ -545,7 +545,7 @@ GnomeKeyringItemType casa_gnome_keyring_item_info_get_type (GnomeKeyringItemInfo
//***********************************************************************************************
static int
int
LoadGnomeKeyringLibrary()
{
if (!gnomeIDK)
@@ -556,7 +556,7 @@ LoadGnomeKeyringLibrary()
return SUCCESS;
}
static int
int
ReleaseGnomeKeyringLibrary()
{
if (!gnomeIDK)

View File

@@ -75,8 +75,8 @@ int GetItems(char *keyring, GList **itemList);
int GetItemInfo(char *keyring, int itemId, ItemInfo *info);
int GetAttributeList(char *keyring, int itemId, GList **);
int FreeAttributeList(GList *attrList);
static int LoadGnomeKeyringLibrary();
static int ReleaseGnomeKeyringLibrary();
int LoadGnomeKeyringLibrary();
int ReleaseGnomeKeyringLibrary();
int
UnlockRing(char *keyring, char *password);