Unlock support
This commit is contained in:
@@ -12,7 +12,6 @@ OperationCompletedCb (GnomeKeyringResult result,
|
||||
g_main_loop_quit (loop);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
CreateItemCb (GnomeKeyringResult result,
|
||||
guint32 id,
|
||||
@@ -28,6 +27,21 @@ CreateItemCb (GnomeKeyringResult result,
|
||||
g_main_loop_quit (loop);
|
||||
}
|
||||
|
||||
int
|
||||
UnlockRing(char *keyring,
|
||||
char *password)
|
||||
{
|
||||
|
||||
// unlock the named keyring
|
||||
OperationCompleted cbData;
|
||||
cbData.OperationName = "Unlock Ring";
|
||||
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
gnome_keyring_unlock(keyring, password, OperationCompletedCb, &cbData, NULL);
|
||||
|
||||
g_main_loop_run (loop);
|
||||
return cbData.result;
|
||||
}
|
||||
|
||||
static int
|
||||
CreateItemInKeyring(char *keyring, int32_t itemType, char *display_name, char *secret, Attribute **attrs, int attrcnt)
|
||||
@@ -37,7 +51,6 @@ CreateItemInKeyring(char *keyring, int32_t itemType, char *display_name, char *s
|
||||
OperationCompleted cbData;
|
||||
|
||||
int i;
|
||||
printf("ad:gk.c :In CreateItemInKeyring\n");
|
||||
printf("ad.gk.c : CreateItemInKeyring : Keyring %s, itemType %d displayname %s, secret %s \n",keyring,itemType, display_name,secret);
|
||||
cbData.OperationName = "Create Item";
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
|
||||
@@ -54,6 +54,8 @@ int GetItemInfo(char *keyring, int itemId, ItemInfo *info);
|
||||
int GetAttributeList(char *keyring, int itemId, GList **);
|
||||
int FreeAttributeList(GList *attrList);
|
||||
|
||||
int
|
||||
UnlockRing(char *keyring, char *password);
|
||||
int
|
||||
SetItemAttributes (char *keyring, guint32 item_id, Attribute **attrs, int length);
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user