## ephy-permission-manager

ephy-permission-manager —

## Synopsis

    #define     EPHY_PERMISSION_MANAGER_IFACE   (k)
    #define     EPHY_IS_PERMISSION_MANAGER_IFACE(k)
    #define     EPHY_TYPE_PERMISSION_INFO
    enum        EphyPermissionType;
    enum        EphyPermission;
    EphyPermissionInfo* ephy_permission_info_new
                                                (const char *host,
                                                 EphyPermissionType type,
                                                 EphyPermission permission);
    EphyPermissionInfo* ephy_permission_info_copy
                                                (const EphyPermissionInfo *info);
    void        ephy_permission_info_free       (EphyPermissionInfo *info);
    GType       ephy_permission_manager_get_type
                                                (void);
    void        ephy_permission_manager_add     (EphyPermissionManager *manager,
                                                 const char *host,
                                                 EphyPermissionType type,
                                                 EphyPermission permission);
    void        ephy_permission_manager_remove  (EphyPermissionManager *manager,
                                                 const char *host,
                                                 EphyPermissionType type);
    void        ephy_permission_manager_clear   (EphyPermissionManager *manager);
    EphyPermission ephy_permission_manager_test (EphyPermissionManager *manager,
                                                 const char *host,
                                                 EphyPermissionType type);
    GList*      ephy_permission_manager_list    (EphyPermissionManager *manager,
                                                 EphyPermissionType type);

## Description

## Details

### EPHY_PERMISSION_MANAGER_IFACE()

    #define     EPHY_PERMISSION_MANAGER_IFACE(k)

`k` : |

### EPHY_IS_PERMISSION_MANAGER_IFACE()

    #define     EPHY_IS_PERMISSION_MANAGER_IFACE(k)

`k` : |

### EPHY_TYPE_PERMISSION_INFO

    #define     EPHY_TYPE_PERMISSION_INFO

### enum EphyPermissionType

    typedef enum
    {
    	EPT_COOKIE,
    	EPT_IMAGE,
    	EPT_POPUP
    } EphyPermissionType;

### enum EphyPermission

    typedef enum
    {
    	EPHY_PERMISSION_ALLOWED,
    	EPHY_PERMISSION_DENIED,
    	EPHY_PERMISSION_DEFAULT
    } EphyPermission;

### ephy_permission_info_new ()

    EphyPermissionInfo* ephy_permission_info_new
                                                (const char *host,
                                                 EphyPermissionType type,
                                                 EphyPermission permission);

`host` : |
`type` : |
`permission` : |
Returns : |

### ephy_permission_info_copy ()

    EphyPermissionInfo* ephy_permission_info_copy
                                                (const EphyPermissionInfo *info);

`info` : |
Returns : |

### ephy_permission_info_free ()

    void        ephy_permission_info_free       (EphyPermissionInfo *info);

Frees `info`.

`info` : |

### ephy_permission_manager_get_type ()

    GType       ephy_permission_manager_get_type
                                                (void);

Returns : |

### ephy_permission_manager_add ()

    void        ephy_permission_manager_add     (EphyPermissionManager *manager,
                                                 const char *host,
                                                 EphyPermissionType type,
                                                 EphyPermission permission);

Adds the permission `allow` of type `type` for host `host` to the permissions database.

`manager` : |
`host` : |
`type` : |
`permission` : |

### ephy_permission_manager_remove ()

    void        ephy_permission_manager_remove  (EphyPermissionManager *manager,
                                                 const char *host,
                                                 EphyPermissionType type);

Removes the permission of type `type` for host `host` from the permissions database.

`manager` : |
`host` : |
`type` : |

### ephy_permission_manager_clear ()

    void        ephy_permission_manager_clear   (EphyPermissionManager *manager);

Clears the permissions database.

`manager` : |

### ephy_permission_manager_test ()

    EphyPermission ephy_permission_manager_test (EphyPermissionManager *manager,
                                                 const char *host,
                                                 EphyPermissionType type);

Gets the permission of `host` for type `type`. If there is no entry for this type for `host`, it will return EPHY_PERMISSION_DEFAULT.

`manager` : |
`host` : |
`type` : |
Returns : |

### ephy_permission_manager_list ()

    GList*      ephy_permission_manager_list    (EphyPermissionManager *manager,
                                                 EphyPermissionType type);

Lists all permission entries of type `type` in the permissions database, each as its own EphyPermissionInfo

`manager` : |
`type` : |
Returns : |