![]() |
![]() |
![]() |
mate-keyring Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
enum MateKeyringAttributeType; typedef MateKeyringAttributeList; MateKeyringAttribute; #define mate_keyring_attribute_list_index (a, i) #define mate_keyring_attribute_list_new void mate_keyring_attribute_list_append_string (MateKeyringAttributeList *attributes
,const char *name
,const char *value
); void mate_keyring_attribute_list_append_uint32 (MateKeyringAttributeList *attributes
,const char *name
,guint32 value
); void mate_keyring_attribute_list_free (MateKeyringAttributeList *attributes
); MateKeyringAttributeList * mate_keyring_attribute_list_copy (MateKeyringAttributeList *attributes
);
Attributes allow various other pieces of information to be associated with an item.
These can also be used to search for relevant items. Use mate_keyring_item_get_attributes()
or mate_keyring_item_set_attributes()
.
Each attribute has either a string, or unsigned integer value.
typedef enum { MATE_KEYRING_ATTRIBUTE_TYPE_STRING, MATE_KEYRING_ATTRIBUTE_TYPE_UINT32 } MateKeyringAttributeType;
typedef struct { char *name; MateKeyringAttributeType type; union { char *string; guint32 integer; } value; } MateKeyringAttribute;
void mate_keyring_attribute_list_append_string (MateKeyringAttributeList *attributes
,const char *name
,const char *value
);
Store a key-value-pair with a string value in attributes
.
|
A MateKeyringAttributeList |
|
The name of the new attribute |
|
The value to store in attributes
|
void mate_keyring_attribute_list_append_uint32 (MateKeyringAttributeList *attributes
,const char *name
,guint32 value
);
Store a key-value-pair with an unsigned 32bit number value in attributes
.
|
A MateKeyringAttributeList |
|
The name of the new attribute |
|
The value to store in attributes
|
void mate_keyring_attribute_list_free (MateKeyringAttributeList *attributes
);
Free the memory used by attributes
.
If a NULL
pointer is passed, it is ignored.
|
A MateKeyringAttributeList |
MateKeyringAttributeList * mate_keyring_attribute_list_copy
(MateKeyringAttributeList *attributes
);
Copy a list of item attributes.
|
A MateKeyringAttributeList to copy. |
Returns : |
The new MateKeyringAttributeList |