Item ACLs

## Item ACLs Item ACLs — Access control lists for keyring items. |

## Synopsis

    typedef             MateKeyringAccessControl;
    typedef             MateKeyringApplicationRef;
    enum                MateKeyringAccessType;
    MateKeyringApplicationRef * mate_keyring_application_ref_new
                                                            (void);
    MateKeyringApplicationRef * mate_keyring_application_ref_copy
                                                            (const MateKeyringApplicationRef *app);
    void                mate_keyring_application_ref_free  (MateKeyringApplicationRef *app);
    MateKeyringAccessControl * mate_keyring_access_control_new
                                                            (const MateKeyringApplicationRef *application,
                                                             MateKeyringAccessType types_allowed);
    MateKeyringAccessControl * mate_keyring_access_control_copy
                                                            (MateKeyringAccessControl *ac);
    void                mate_keyring_access_control_free   (MateKeyringAccessControl *ac);
    GList *             mate_keyring_acl_copy              (GList *list);
    void                mate_keyring_acl_free              (GList *acl);
    char *              mate_keyring_item_ac_get_display_name
                                                            (MateKeyringAccessControl *ac);
    void                mate_keyring_item_ac_set_display_name
                                                            (MateKeyringAccessControl *ac,
                                                             const char *value);
    char *              mate_keyring_item_ac_get_path_name (MateKeyringAccessControl *ac);
    void                mate_keyring_item_ac_set_path_name (MateKeyringAccessControl *ac,
                                                             const char *value);
    MateKeyringAccessType  mate_keyring_item_ac_get_access_type
                                                            (MateKeyringAccessControl *ac);
    void                mate_keyring_item_ac_set_access_type
                                                            (MateKeyringAccessControl *ac,
                                                             const MateKeyringAccessType value);

## Description

Each item has an access control list, which specifies the applications that can read, write or delete an item. The read access applies only to reading the secret. All applications can read other parts of the item. ACLs are accessed and changed `mate_keyring_item_get_acl()` and `mate_keyring_item_set_acl()`.

## Details

### MateKeyringAccessControl

    typedef struct MateKeyringAccessControl MateKeyringAccessControl;

### MateKeyringApplicationRef

    typedef struct MateKeyringApplicationRef MateKeyringApplicationRef;

### enum MateKeyringAccessType

    typedef enum {
    	MATE_KEYRING_ACCESS_READ = 1<<0,
    	MATE_KEYRING_ACCESS_WRITE = 1<<1,
    	MATE_KEYRING_ACCESS_REMOVE = 1<<2
    } MateKeyringAccessType;

### mate_keyring_application_ref_new ()

    MateKeyringApplicationRef * mate_keyring_application_ref_new
                                                            (void);

Create a new application reference.

Returns : | A new MateKeyringApplicationRef pointer.

### mate_keyring_application_ref_copy ()

    MateKeyringApplicationRef * mate_keyring_application_ref_copy
                                                            (const MateKeyringApplicationRef *app);

Copy an application reference.

`app` : | A MateKeyringApplicationRef pointer
Returns : | A new MateKeyringApplicationRef pointer.

### mate_keyring_application_ref_free ()

    void                mate_keyring_application_ref_free  (MateKeyringApplicationRef *app);

Free an application reference.

`app` : | A MateKeyringApplicationRef pointer

### mate_keyring_access_control_new ()

    MateKeyringAccessControl * mate_keyring_access_control_new
                                                            (const MateKeyringApplicationRef *application,
                                                             MateKeyringAccessType types_allowed);

Create a new access control for an item. Combine the various access rights allowed.

`application` : | A MateKeyringApplicationRef pointer
`types_allowed` : | Access types allowed.
Returns : | The new MateKeyringAccessControl pointer. Use `mate_keyring_access_control_free()` to free the memory.

### mate_keyring_access_control_copy ()

    MateKeyringAccessControl * mate_keyring_access_control_copy
                                                            (MateKeyringAccessControl *ac);

Copy an access control for an item.

`ac` : | A MateKeyringAcessControl pointer
Returns : | The new MateKeyringAccessControl pointer. Use `mate_keyring_access_control_free()` to free the memory.

### mate_keyring_access_control_free ()

    void                mate_keyring_access_control_free   (MateKeyringAccessControl *ac);

Free an access control for an item.

`ac` : | A MateKeyringAccessControl pointer

### mate_keyring_acl_copy ()

    GList *             mate_keyring_acl_copy              (GList *list);

Copy an access control list.

`list` : | A list of MateKeyringAccessControl pointers.
Returns : | A new list of MateKeyringAccessControl items. Use `mate_keyring_acl_free()` to free the memory.

### mate_keyring_acl_free ()

    void                mate_keyring_acl_free              (GList *acl);

Free an access control list.

`acl` : | A list of MateKeyringAccessControl pointers.

### mate_keyring_item_ac_get_display_name ()

    char *              mate_keyring_item_ac_get_display_name
                                                            (MateKeyringAccessControl *ac);

Get the access control application's display name.

`ac` : | A MateKeyringAccessControl pointer.
Returns : | A newly allocated string containing the display name.

### mate_keyring_item_ac_set_display_name ()

    void                mate_keyring_item_ac_set_display_name
                                                            (MateKeyringAccessControl *ac,
                                                             const char *value);

Set the access control application's display name.

`ac` : | A MateKeyringAcccessControl pointer.
`value` : | The new application display name.

### mate_keyring_item_ac_get_path_name ()

    char *              mate_keyring_item_ac_get_path_name (MateKeyringAccessControl *ac);

Get the access control application's full path name.

`ac` : | A MateKeyringAccessControl pointer.
Returns : | A newly allocated string containing the display name.

### mate_keyring_item_ac_set_path_name ()

    void                mate_keyring_item_ac_set_path_name (MateKeyringAccessControl *ac,
                                                             const char *value);

Set the access control application's full path name.

`ac` : | A MateKeyringAccessControl pointer
`value` : | The new application full path.

### mate_keyring_item_ac_get_access_type ()

    MateKeyringAccessType  mate_keyring_item_ac_get_access_type
                                                            (MateKeyringAccessControl *ac);

Get the application access rights for the access control.

`ac` : | A MateKeyringAccessControl pointer.
Returns : | The access rights.

### mate_keyring_item_ac_set_access_type ()

    void                mate_keyring_item_ac_set_access_type
                                                            (MateKeyringAccessControl *ac,
                                                             const MateKeyringAccessType value);

Set the application access rights for the access control.

`ac` : | A MateKeyringAccessControl pointer.
`value` : | The new access rights.