#ifndef _AD_GK_H_ #define _AD_GK_H_ #include #include #include #include #define SUCCESS 0 #define FAILURE -1 #define KEY_SIZE 128 #define VAL_SIZE 128 enum KeyringResultExtended { GNOME_KEYRING_RESULT_NO_SUCH_ITEM = 128, GNOME_KEYRING_RESULT_CANNOT_DELETE_SECRET_VALUE, GNOME_KEYRING_RESULT_MALFORMED_XML, GNOME_KEYRING_RESULT_CANNOT_CREATE_KEYRING }; typedef struct _KeyringInfo { int32_t lockOnIdle; uint32_t lockTimeout; uint32_t mTime; uint32_t cTime; int32_t isLocked; }KeyringInfo; typedef struct _ItemInfo { int32_t itemType; char *displayName; char *secret; uint32_t mTime; uint32_t cTime; }ItemInfo; typedef struct _Attribute { uint32_t type; char *key; char *value; }Attribute; int GetKeyrings(GList **retList); int GetKeyringInfo(char *keyring,KeyringInfo *info); 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); int SetItemAttributes (char *keyring, guint32 item_id, Attribute **attrs, int length); int CreateItem(char *keyring, int32_t itemType, char *display_name, char *secret, Attribute **attrs, int attrcnt); int RemoveItem (char *keyring, guint32 itemid); int SetPassword (char *keyring, guint32 itemid, char *secret); typedef struct _GetKeyringsCbData { GList **keyringList; GMainLoop *loop; }GetKeyringsCbData; typedef struct _GetKeyringInfoCbData { KeyringInfo *info; GMainLoop *loop; }GetKeyringInfoCbData; typedef struct _GetItemsCbData { GList **itemList; GMainLoop *loop; }GetItemsCbData; typedef struct _GetItemInfoCbData { ItemInfo *info; GMainLoop *loop; }GetItemInfoCbData; typedef struct _GetAttributeListCbData { GList **attrList; GMainLoop *loop; }GetAttributeListCbData; typedef struct _OperationCompleted { char *OperationName; GnomeKeyringResult result; }OperationCompleted; #endif