CASA/c_adlib/ad_gk/native/casa-gnome-keyring.h

730 lines
24 KiB
C
Raw Normal View History

2006-05-23 22:16:24 +02:00
/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, Novell, Inc.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
#ifndef _CASA_GNOME_KEYRING_H
#define _CASA_GNOME_KEYRING_H
2006-05-23 22:16:24 +02:00
#include <glib.h>
#include <time.h>
2006-05-23 22:16:24 +02:00
typedef enum
{
CASA_GNOME_KEYRING_RESULT_OK,
CASA_GNOME_KEYRING_RESULT_DENIED,
CASA_GNOME_KEYRING_RESULT_NO_KEYRING_DAEMON,
CASA_GNOME_KEYRING_RESULT_ALREADY_UNLOCKED,
CASA_GNOME_KEYRING_RESULT_NO_SUCH_KEYRING,
CASA_GNOME_KEYRING_RESULT_BAD_ARGUMENTS,
CASA_GNOME_KEYRING_RESULT_IO_ERROR,
CASA_GNOME_KEYRING_RESULT_CANCELLED,
CASA_GNOME_KEYRING_RESULT_ALREADY_EXISTS
2006-05-25 18:00:54 +02:00
} CASA_GnomeKeyringResult_T;
2006-05-23 22:16:24 +02:00
#define GNOME_KEYRING_RESULT_OK CASA_GNOME_KEYRING_RESULT_OK
#define GNOME_KEYRING_RESULT_DENIED CASA_GNOME_KEYRING_RESULT_DENIED
#define GNOME_KEYRING_RESULT_NO_KEYRING_DAEMON CASA_GNOME_KEYRING_RESULT_NO_KEYRING_DAEMON
#define GNOME_KEYRING_RESULT_ALREADY_UNLOCKED CASA_GNOME_KEYRING_RESULT_ALREADY_UNLOCKED
#define GNOME_KEYRING_RESULT_NO_SUCH_KEYRING CASA_GNOME_KEYRING_RESULT_NO_SUCH_KEYRING
#define GNOME_KEYRING_RESULT_BAD_ARGUMENTS CASA_GNOME_KEYRING_RESULT_BAD_ARGUMENTS
#define GNOME_KEYRING_RESULT_IO_ERROR CASA_GNOME_KEYRING_RESULT_IO_ERROR
#define GNOME_KEYRING_RESULT_CANCELLED CASA_GNOME_KEYRING_RESULT_CANCELLED
#define GNOME_KEYRING_RESULT_ALREADY_EXISTS CASA_GNOME_KEYRING_RESULT_ALREADY_EXISTS
2006-05-25 18:00:54 +02:00
#define GnomeKeyringResult CASA_GnomeKeyringResult_T
2006-05-23 22:16:24 +02:00
typedef enum
{
CASA_GNOME_KEYRING_ITEM_GENERIC_SECRET,
CASA_GNOME_KEYRING_ITEM_NETWORK_PASSWORD,
CASA_GNOME_KEYRING_ITEM_NOTE,
CASA_GNOME_KEYRING_ITEM_LAST_TYPE,
CASA_GNOME_KEYRING_ITEM_NO_TYPE = 0xffffffff,
2006-05-25 18:00:54 +02:00
} CASA_GnomeKeyringItemType_T;
2006-05-23 22:16:24 +02:00
#define GNOME_KEYRING_ITEM_GENERIC_SECRET CASA_GNOME_KEYRING_ITEM_GENERIC_SECRET
#define GNOME_KEYRING_ITEM_NETWORK_PASSWORD CASA_GNOME_KEYRING_ITEM_NETWORK_PASSWORD
#define GNOME_KEYRING_ITEM_NOTE CASA_GNOME_KEYRING_ITEM_NOTE
#define GNOME_KEYRING_ITEM_LAST_TYPE CASA_GNOME_KEYRING_ITEM_LAST_TYPE
#define GNOME_KEYRING_ITEM_NO_TYPE CASA_GNOME_KEYRING_ITEM_NO_TYPE
2006-05-25 18:00:54 +02:00
#define GnomeKeyringItemType CASA_GnomeKeyringItemType_T
2006-05-23 22:16:24 +02:00
typedef enum
{
CASA_GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
CASA_GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32
2006-05-25 18:00:54 +02:00
} CASA_GnomeKeyringAttributeType_T;
2006-05-23 22:16:24 +02:00
#define GNOME_KEYRING_ATTRIBUTE_TYPE_STRING CASA_GNOME_KEYRING_ATTRIBUTE_TYPE_STRING
#define GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32 CASA_GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32
2006-05-25 18:00:54 +02:00
#define GnomeKeyringAttributeType CASA_GnomeKeyringAttributeType_T
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
typedef struct GnomeKeyringAccessControl CASA_GnomeKeyringAccessControl_T;
typedef struct GnomeKeyringApplicationRef CASA_GnomeKeyringApplicationRef_T;
typedef GArray CASA_GnomeKeyringAttributeList_T;
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
#define GnomeKeyringAccessControl CASA_GnomeKeyringAccessControl_T
#define GnomeKeyringApplicationRef CASA_GnomeKeyringApplicationRef_T
#define GnomeKeyringAttributeList CASA_GnomeKeyringAttributeList_T
2006-05-23 22:16:24 +02:00
typedef enum
{
CASA_GNOME_KEYRING_ACCESS_READ = 1<<0,
CASA_GNOME_KEYRING_ACCESS_WRITE = 1<<1,
CASA_GNOME_KEYRING_ACCESS_REMOVE = 1<<2
2006-05-25 18:00:54 +02:00
} CASA_GnomeKeyringAccessType_T;
2006-05-23 22:16:24 +02:00
#define GNOME_KEYRING_ACCESS_READ CASA_GNOME_KEYRING_ACCESS_READ
#define GNOME_KEYRING_ACCESS_WRITE CASA_GNOME_KEYRING_ACCESS_WRITE
#define GNOME_KEYRING_ACCESS_REMOVE CASA_GNOME_KEYRING_ACCESS_REMOVE
2006-05-25 18:00:54 +02:00
#define GnomeKeyringAccessType CASA_GnomeKeyringAccessType_T
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
typedef struct GnomeKeyringInfo CASA_GnomeKeyringInfo_T;
typedef struct GnomeKeyringItemInfo CASA_GnomeKeyringItemInfo_T;
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
#define GnomeKeyringInfo CASA_GnomeKeyringInfo_T
#define GnomeKeyringItemInfo CASA_GnomeKeyringItemInfo_T
2006-05-23 22:16:24 +02:00
typedef struct
{
2006-05-25 18:00:54 +02:00
char *name;
CASA_GnomeKeyringAttributeType_T type;
2006-05-23 22:16:24 +02:00
union
{
2006-05-25 18:00:54 +02:00
char *string;
guint32 integer;
2006-05-23 22:16:24 +02:00
} value;
2006-05-25 18:00:54 +02:00
} CASA_GnomeKeyringAttribute_T;
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
#define GnomeKeyringAttribute CASA_GnomeKeyringAttribute_T
2006-05-23 22:16:24 +02:00
typedef struct
{
char *keyring;
guint item_id;
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAttributeList_T *attributes;
2006-05-23 22:16:24 +02:00
char *secret;
2006-05-25 18:00:54 +02:00
} CASA_GnomeKeyringFound_T;
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
#define GnomeKeyringFound CASA_GnomeKeyringFound_T
2006-05-25 18:00:54 +02:00
typedef void (*CASA_GnomeKeyringOperationDoneCallback_T)
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T result,
2006-05-23 22:16:24 +02:00
gpointer data
);
2006-05-25 18:00:54 +02:00
#define GnomeKeyringOperationDoneCallback CASA_GnomeKeyringOperationDoneCallback_T
2006-05-25 18:00:54 +02:00
typedef void (*CASA_GnomeKeyringOperationGetStringCallback_T)
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T result,
2006-05-23 22:16:24 +02:00
const char *string,
gpointer data
);
2006-05-25 18:00:54 +02:00
#define GnomeKeyringOperationGetStringCallback CASA_GnomeKeyringOperationGetStringCallback_T
2006-05-25 18:00:54 +02:00
typedef void (*CASA_GnomeKeyringOperationGetIntCallback_T)
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T result,
2006-05-23 22:16:24 +02:00
guint32 val,
gpointer data
);
2006-05-25 18:00:54 +02:00
#define GnomeKeyringOperationGetIntCallback CASA_GnomeKeyringOperationGetIntCallback_T
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
typedef void (*CASA_GnomeKeyringOperationGetListCallback_T)
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T result,
2006-05-23 22:16:24 +02:00
GList *list,
gpointer data
);
2006-05-25 18:00:54 +02:00
#define GnomeKeyringOperationGetListCallback CASA_GnomeKeyringOperationGetListCallback_T
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
typedef void (*CASA_GnomeKeyringOperationGetKeyringInfoCallback_T)
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T result,
CASA_GnomeKeyringInfo_T *info,
2006-05-23 22:16:24 +02:00
gpointer data
);
2006-05-25 18:00:54 +02:00
#define GnomeKeyringOperationGetKeyringInfoCallback CASA_GnomeKeyringOperationGetKeyringInfoCallback_T
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
typedef void (*CASA_GnomeKeyringOperationGetItemInfoCallback_T)
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T result,
CASA_GnomeKeyringItemInfo_T*info,
2006-05-23 22:16:24 +02:00
gpointer data
);
2006-05-25 18:00:54 +02:00
#define GnomeKeyringOperationGetItemInfoCallback CASA_GnomeKeyringOperationGetItemInfoCallback_T
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
typedef void (*CASA_GnomeKeyringOperationGetAttributesCallback_T)
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T result,
CASA_GnomeKeyringAttributeList_T *attributes,
2006-05-23 22:16:24 +02:00
gpointer data
);
2006-05-25 18:00:54 +02:00
#define GnomeKeyringOperationGetAttributesCallback CASA_GnomeKeyringOperationGetAttributesCallback_T
2006-05-23 22:16:24 +02:00
#define CASA_gnome_keyring_attribute_list_index(a, i) g_array_index ((a), GnomeKeyringAttribute, (i))
#define gnome_keyring_attribute_list_index CASA_gnome_keyring_attribute_list_index
#define CASA_gnome_keyring_attribute_list_new() (g_array_new (FALSE, FALSE, sizeof (GnomeKeyringAttribute)))
#define gnome_keyring_attribute_list_new CASA_gnome_keyring_attribute_list_new
void CASA_gnome_keyring_attribute_list_append_string
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAttributeList_T *attributes,
2006-05-23 22:16:24 +02:00
const char *attribute,
const char *value
);
#define gnome_keyring_attribute_list_append_string CASA_gnome_keyring_attribute_list_append_string
void CASA_gnome_keyring_attribute_list_append_uint32
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAttributeList_T *attributes,
2006-05-23 22:16:24 +02:00
const char *attribute,
guint32 value
);
#define gnome_keyring_attribute_list_append_uint32 CASA_gnome_keyring_attribute_list_append_uint32
GnomeKeyringAttributeList *CASA_gnome_keyring_attribute_list_copy
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAttributeList_T *attributes
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_attribute_list_copy CASA_gnome_keyring_attribute_list_copy
gboolean CASA_gnome_keyring_is_available (void);
#define gnome_keyring_is_available CASA_gnome_keyring_is_available
void CASA_gnome_keyring_free_password (char *password);
#define gnome_keyring_free_password CASA_gnome_keyring_free_password
2006-05-25 18:00:54 +02:00
void CASA_gnome_keyring_found_free (CASA_GnomeKeyringFound_T *found);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_found_free CASA_gnome_keyring_found_free
void CASA_gnome_keyring_found_list_free (GList *found_list);
#define gnome_keyring_found_list_free CASA_gnome_keyring_found_list_free
void CASA_gnome_keyring_cancel_request (gpointer request);
#define gnome_keyring_cancel_request CASA_gnome_keyring_cancel_request
gpointer CASA_gnome_keyring_set_default_keyring
(
const char *keyring,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringOperationDoneCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data
);
#define gnome_keyring_set_default_keyring CASA_gnome_keyring_set_default_keyring
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_set_default_keyring_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring
);
#define gnome_keyring_set_default_keyring_sync CASA_gnome_keyring_set_default_keyring_sync
gpointer CASA_gnome_keyring_get_default_keyring
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringOperationGetStringCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data
);
#define gnome_keyring_get_default_keyring CASA_gnome_keyring_get_default_keyring
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_get_default_keyring_sync
2006-05-23 22:16:24 +02:00
(
char **keyring
);
#define gnome_keyring_get_default_keyring_sync CASA_gnome_keyring_get_default_keyring_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_list_keyring_names_sync
2006-05-23 22:16:24 +02:00
(
GList **keyrings
);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_list_keyring_names_sync CASA_gnome_keyring_list_keyring_names_sync
gpointer CASA_gnome_keyring_lock_all
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringOperationDoneCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data
);
#define gnome_keyring_lock_all CASA_gnome_keyring_lock_all
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_lock_all_sync(void);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_lock_all_sync CASA_gnome_keyring_lock_all_sync
/* NULL password means ask user */
2006-05-23 22:55:58 +02:00
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_create_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring_name,
const char *password
);
#define gnome_keyring_create_sync CASA_gnome_keyring_create_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_unlock_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
const char *password
);
#define gnome_keyring_unlock_sync CASA_gnome_keyring_unlock_sync
gpointer CASA_gnome_keyring_lock
(
const char *keyring,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringOperationDoneCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data
);
#define gnome_keyring_lock CASA_gnome_keyring_lock
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_lock_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring
);
#define gnome_keyring_lock_sync CASA_gnome_keyring_lock_sync
gpointer CASA_gnome_keyring_delete
(
const char *keyring,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringOperationDoneCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data
);
#define gnome_keyring_delete CASA_gnome_keyring_delete
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_delete_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring
);
#define gnome_keyring_delete_sync CASA_gnome_keyring_delete_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_get_info_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringInfo_T **info
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_get_info_sync CASA_gnome_keyring_get_info_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_set_info_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
GnomeKeyringInfo *info
);
#define gnome_keyring_set_info_sync CASA_gnome_keyring_set_info_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_list_item_ids_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
GList **ids
);
#define gnome_keyring_list_item_ids_sync CASA_gnome_keyring_list_item_ids_sync
void CASA_gnome_keyring_info_free
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringInfo_T *keyring_info
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_info_free CASA_gnome_keyring_info_free
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringInfo_T *CASA_gnome_keyring_info_copy
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringInfo_T *keyring_info
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_info_copy CASA_gnome_keyring_info_copy
void CASA_gnome_keyring_info_set_lock_on_idle
(
GnomeKeyringInfo *keyring_info,
gboolean value
);
gpointer CASA_gnome_keyring_find_items
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringItemType_T type,
CASA_GnomeKeyringAttributeList_T *attributes,
CASA_GnomeKeyringOperationGetListCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data
);
#define gnome_keyring_find_items CASA_gnome_keyring_find_items
gpointer CASA_gnome_keyring_find_itemsv
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringItemType_T type,
CASA_GnomeKeyringOperationGetListCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data,
...
);
#define gnome_keyring_find_itemsv CASA_gnome_keyring_find_itemsv
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_find_items_sync
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringItemType_T type,
CASA_GnomeKeyringAttributeList_T *attributes,
2006-05-23 22:16:24 +02:00
GList **found
);
#define gnome_keyring_find_items_sync CASA_gnome_keyring_find_items_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_find_itemsv_sync
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringItemType_T type,
2006-05-23 22:16:24 +02:00
GList **found,
...
);
#define gnome_keyring_find_itemsv_sync CASA_gnome_keyring_find_itemsv_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_create_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringItemType_T type,
2006-05-23 22:16:24 +02:00
const char *display_name,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAttributeList_T *attributes,
2006-05-23 22:16:24 +02:00
const char *secret,
gboolean update_if_exists,
guint32 *item_id
);
#define gnome_keyring_item_create_sync CASA_gnome_keyring_item_create_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_delete_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
guint32 id
);
#define gnome_keyring_item_delete_sync CASA_gnome_keyring_item_delete_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_get_info_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
guint32 id,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringItemInfo_T **info
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_item_get_info_sync CASA_gnome_keyring_item_get_info_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_set_info_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
guint32 id,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringItemInfo_T *info
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_item_set_info_sync CASA_gnome_keyring_item_set_info_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_get_attributes_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
guint32 id,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAttributeList_T **attributes
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_item_get_attributes_sync CASA_gnome_keyring_item_get_attributes_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_set_attributes_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
guint32 id,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAttributeList_T *attributes
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_item_set_attributes_sync CASA_gnome_keyring_item_set_attributes_sync
gpointer CASA_gnome_keyring_item_get_acl
(
const char *keyring,
guint32 id,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringOperationGetListCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data
);
#define gnome_keyring_item_get_acl CASA_gnome_keyring_item_get_acl
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_get_acl_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
guint32 id,
GList **acl
);
#define gnome_keyring_item_get_acl_sync CASA_gnome_keyring_item_get_acl_sync
gpointer CASA_gnome_keyring_item_set_acl
(
const char *keyring,
guint32 id,
GList *acl,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringOperationDoneCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data
);
#define gnome_keyring_item_set_acl CASA_gnome_keyring_item_set_acl
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_item_set_acl_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
guint32 id,
GList *acl
);
#define gnome_keyring_item_set_acl_sync CASA_gnome_keyring_item_set_acl_sync
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringItemInfo_T *CASA_gnome_keyring_item_info_copy (CASA_GnomeKeyringItemInfo_T *item_info);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_item_info_copy CASA_gnome_keyring_item_info_copy
void CASA_gnome_keyring_item_info_set_type
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringItemInfo_T *item_info,
CASA_GnomeKeyringItemType_T type
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_item_info_set_type CASA_gnome_keyring_item_info_set_type
void CASA_gnome_keyring_item_info_set_display_name
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringItemInfo_T *item_info,
2006-05-23 22:16:24 +02:00
const char *value
);
#define gnome_keyring_item_info_set_display_name CASA_gnome_keyring_item_info_set_display_name
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringApplicationRef_T *CASA_gnome_keyring_application_ref_new (void);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_application_ref_new CASA_gnome_keyring_application_ref_new
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringApplicationRef_T *CASA_gnome_keyring_application_ref_copy (const CASA_GnomeKeyringApplicationRef_T *app);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_application_ref_copy CASA_gnome_keyring_application_ref_copy
2006-05-25 18:00:54 +02:00
void CASA_gnome_keyring_application_ref_free (CASA_GnomeKeyringApplicationRef_T *app);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_application_ref_free CASA_gnome_keyring_application_ref_free
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAccessControl_T *CASA_gnome_keyring_access_control_new
2006-05-23 22:16:24 +02:00
(
2006-05-25 18:00:54 +02:00
const CASA_GnomeKeyringApplicationRef_T *application,
CASA_GnomeKeyringAccessType_T types_allowed
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_access_control_new CASA_gnome_keyring_access_control_new
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAccessControl_T *CASA_gnome_keyring_access_control_copy (GnomeKeyringAccessControl *ac);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_access_control_copy CASA_gnome_keyring_access_control_copy
2006-05-25 18:00:54 +02:00
void CASA_gnome_keyring_access_control_free (CASA_GnomeKeyringAccessControl_T *ac);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_access_control_free CASA_gnome_keyring_access_control_free
GList * CASA_gnome_keyring_acl_copy (GList *list);
#define gnome_keyring_acl_copy CASA_gnome_keyring_acl_copy
void CASA_gnome_keyring_acl_free (GList *acl);
#define gnome_keyring_acl_free CASA_gnome_keyring_acl_free
2006-05-25 18:00:54 +02:00
char *CASA_gnome_keyring_item_ac_get_display_name (CASA_GnomeKeyringAccessControl_T *ac);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_item_ac_get_display_name CASA_gnome_keyring_item_ac_get_display_name
void CASA_gnome_keyring_item_ac_set_display_name
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAccessControl_T *ac,
2006-05-23 22:16:24 +02:00
const char *value
);
#define gnome_keyring_item_ac_set_display_name CASA_gnome_keyring_item_ac_set_display_name
2006-05-25 18:00:54 +02:00
char *CASA_gnome_keyring_item_ac_get_path_name (CASA_GnomeKeyringAccessControl_T *ac);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_item_ac_get_path_name CASA_gnome_keyring_item_ac_get_path_name
void CASA_gnome_keyring_item_ac_set_path_name
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAccessControl_T *ac,
2006-05-23 22:16:24 +02:00
const char *value
);
#define gnome_keyring_item_ac_set_path_name CASA_gnome_keyring_item_ac_set_path_name
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAccessType_T CASA_gnome_keyring_item_ac_get_access_type (CASA_GnomeKeyringAccessControl_T *ac);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_item_ac_get_access_type CASA_gnome_keyring_item_ac_get_access_type
void CASA_gnome_keyring_item_ac_set_access_type
(
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringAccessControl_T *ac,
const CASA_GnomeKeyringAccessType_T value
2006-05-23 22:16:24 +02:00
);
#define gnome_keyring_item_ac_set_access_type CASA_gnome_keyring_item_ac_set_access_type
/* Specialized Helpers for network passwords items */
2006-05-23 22:16:24 +02:00
typedef struct
{
2006-05-25 18:00:54 +02:00
char *keyring;
guint32 item_id;
char *protocol;
char *server;
char *object;
char *authtype;
2006-05-23 22:16:24 +02:00
guint32 port;
2006-05-25 18:00:54 +02:00
char *user;
char *domain;
char *password;
} CASA_GnomeKeyringNetworkPasswordData_T;
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
#define GnomeKeyringNetworkPasswordData CASA_GnomeKeyringNetworkPasswordData_T
2006-05-23 22:16:24 +02:00
2006-05-25 18:00:54 +02:00
void CASA_gnome_keyring_network_password_free (CASA_GnomeKeyringNetworkPasswordData_T *data);
2006-05-23 22:16:24 +02:00
#define gnome_keyring_network_password_free CASA_gnome_keyring_network_password_free
void CASA_gnome_keyring_network_password_list_free (GList *list);
#define gnome_keyring_network_password_list_free CASA_gnome_keyring_network_password_list_free
gpointer CASA_gnome_keyring_find_network_password
(
const char *user,
const char *domain,
const char *server,
const char *object,
const char *protocol,
const char *authtype,
guint32 port,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringOperationGetListCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data
);
#define gnome_keyring_find_network_password CASA_gnome_keyring_find_network_password
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_find_network_password_sync
2006-05-23 22:16:24 +02:00
(
const char *user,
const char *domain,
const char *server,
const char *object,
const char *protocol,
const char *authtype,
guint32 port,
GList **result
);
#define gnome_keyring_find_network_password_sync CASA_gnome_keyring_find_network_password_sync
gpointer CASA_gnome_keyring_set_network_password
(
const char *keyring,
const char *user,
const char *domain,
const char *server,
const char *object,
const char *protocol,
const char *authtype,
guint32 port,
const char *password,
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringOperationGetIntCallback_T callback,
2006-05-23 22:16:24 +02:00
gpointer data,
GDestroyNotify destroy_data
);
#define gnome_keyring_set_network_password CASA_gnome_keyring_set_network_password
2006-05-25 18:00:54 +02:00
CASA_GnomeKeyringResult_T CASA_gnome_keyring_set_network_password_sync
2006-05-23 22:16:24 +02:00
(
const char *keyring,
const char *user,
const char *domain,
const char *server,
const char *object,
const char *protocol,
const char *authtype,
guint32 port,
const char *password,
guint32 *item_id
);
#define gnome_keyring_set_network_password_sync CASA_gnome_keyring_set_network_password_sync
#endif /* _CASA_GNOME_KEYRING_H */