## FolksPersonaStore FolksPersonaStore — A store for FolksPersonas. |

## Types and Values

#define | FOLKS_TYPE_PERSONA_STORE
struct | FolksPersonaStore
struct | FolksPersonaStoreClass
enum | FolksPersonaStoreTrust
enum | FolksPersonaDetail
enum | FolksPersonaStoreError

## Description

After creating a PersonaStore instance, you must connect to the "personas-changed" signal, then call ``folks_persona_store_prepare()``, otherwise a race condition may occur between emission of "personas-changed" and your code connecting to it.

## Functions

## Types and Values

### FOLKS_TYPE_PERSONA_STORE

    #define FOLKS_TYPE_PERSONA_STORE (folks_persona_store_get_type ())

The type for FolksPersonaStore.

### struct FolksPersonaStore

    struct FolksPersonaStore {
    	GObject parent_instance;
    	FolksPersonaStorePrivate * priv;
    };

A store for FolksPersonas.

After creating a PersonaStore instance, you must connect to the "personas-changed" signal, then call ``folks_persona_store_prepare()``, otherwise a race condition may occur between emission of "personas-changed" and your code connecting to it.

### struct FolksPersonaStoreClass

    struct FolksPersonaStoreClass {
    	GObjectClass parent_class;
    	void (*prepare) (FolksPersonaStore* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
    	void (*prepare_finish) (FolksPersonaStore* self, GAsyncResult* _res_, GError** error);
    	void (*flush) (FolksPersonaStore* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
    	void (*flush_finish) (FolksPersonaStore* self, GAsyncResult* _res_);
    	void (*add_persona_from_details) (FolksPersonaStore* self, GHashTable* details, GAsyncReadyCallback _callback_, gpointer _user_data_);
    	FolksPersona* (*add_persona_from_details_finish) (FolksPersonaStore* self, GAsyncResult* _res_, GError** error);
    	void (*remove_persona) (FolksPersonaStore* self, FolksPersona* persona, GAsyncReadyCallback _callback_, gpointer _user_data_);
    	void (*remove_persona_finish) (FolksPersonaStore* self, GAsyncResult* _res_, GError** error);
    	const gchar* (*get_type_id) (FolksPersonaStore* self);
    	GeeMap* (*get_personas) (FolksPersonaStore* self);
    	FolksMaybeBool (*get_can_add_personas) (FolksPersonaStore* self);
    	FolksMaybeBool (*get_can_alias_personas) (FolksPersonaStore* self);
    	FolksMaybeBool (*get_can_group_personas) (FolksPersonaStore* self);
    	FolksMaybeBool (*get_can_remove_personas) (FolksPersonaStore* self);
    	gboolean (*get_is_prepared) (FolksPersonaStore* self);
    	gboolean (*get_is_quiescent) (FolksPersonaStore* self);
    	gchar** (*get_always_writeable_properties) (FolksPersonaStore* self, gint* result_length1);
    };

The class structure for `FOLKS_TYPE_PERSONA_STORE`. All the fields in this structure are private and should never be accessed directly.

#### Members

`prepare` () | virtual method called by ``folks_persona_store_prepare()`` |
`prepare_finish` () | asynchronous finish function for `prepare`, called by ``folks_persona_store_prepare()`` |
`flush` () | virtual method called by ``folks_persona_store_flush()`` |
`flush_finish` () | asynchronous finish function for `flush`, called by ``folks_persona_store_flush()`` |
`add_persona_from_details` () | virtual method called by ``folks_persona_store_add_persona_from_details()`` |
`add_persona_from_details_finish` () | asynchronous finish function for `add_persona_from_details`, called by ``folks_persona_store_add_persona_from_details()`` |
`remove_persona` () | virtual method called by ``folks_persona_store_remove_persona()`` |
`remove_persona_finish` () | asynchronous finish function for `remove_persona`, called by ``folks_persona_store_remove_persona()`` |
`get_type_id` () | getter method for the abstract property "type-id" |
`get_personas` () | getter method for the abstract property "personas" |
`get_can_add_personas` () | getter method for the abstract property "can-add-personas" |
`get_can_alias_personas` () | getter method for the abstract property "can-alias-personas" |
`get_can_group_personas` () | getter method for the abstract property "can-group-personas" |
`get_can_remove_personas` () | getter method for the abstract property "can-remove-personas" |
`get_is_prepared` () | getter method for the abstract property "is-prepared" |
`get_is_quiescent` () | getter method for the abstract property "is-quiescent" |
`get_always_writeable_properties` () | getter method for the abstract property "always-writeable-properties" |

### enum FolksPersonaStoreTrust

Trust level for a FolksPersonaStore's FolksPersonas for linking purposes.

Trust levels are set internally by the backends, and must not be modified by clients.

#### Members

FOLKS_PERSONA_STORE_TRUST_NONE | The FolksPersonas aren't trusted at all, and cannot be linked. This should be used for FolksPersonaStores where even the FolksPersona UID could be maliciously edited to corrupt FolksPersona links, or where the UID changes regularly. |
FOLKS_PERSONA_STORE_TRUST_PARTIAL | Only the "uid" property is trusted for linking. In practice, this means that FolksPersonas from this FolksPersonaStore will not contribute towards the linking process, but can be linked together by their UIDs using data from FolksPersonas from a fully-trusted FolksPersonaStore. |
FOLKS_PERSONA_STORE_TRUST_FULL | Every property in "linkable-properties" is trusted. This should only be used for user-controlled FolksPersonaStores, as if a remote store is compromised, malicious changes could be made to its data which corrupt the user's FolksPersona links. |

Since: 0.1.13

### enum FolksPersonaDetail

Definition of the available fields to be looked up with ``folks_persona_store_detail_key()``.

#### Members

FOLKS_PERSONA_DETAIL_INVALID | Invalid field for use in error returns. |
FOLKS_PERSONA_DETAIL_ALIAS | Field for "alias". |
FOLKS_PERSONA_DETAIL_AVATAR | Field for "avatar". |
FOLKS_PERSONA_DETAIL_BIRTHDAY | Field for "birthday". |
FOLKS_PERSONA_DETAIL_EMAIL_ADDRESSES | Field for "email-addresses". |
FOLKS_PERSONA_DETAIL_FULL_NAME | Field for "full-name". |
FOLKS_PERSONA_DETAIL_GENDER | Field for "gender". |
FOLKS_PERSONA_DETAIL_IM_ADDRESSES | Field for "im-addresses". |
FOLKS_PERSONA_DETAIL_IS_FAVOURITE | Field for "is-favourite". |
FOLKS_PERSONA_DETAIL_LOCAL_IDS | Field for "local-ids". |
FOLKS_PERSONA_DETAIL_LOCATION | Field for "location". |
FOLKS_PERSONA_DETAIL_NICKNAME | Field for "nickname". |
FOLKS_PERSONA_DETAIL_NOTES | Field for "notes". |
FOLKS_PERSONA_DETAIL_PHONE_NUMBERS | Field for "phone-numbers". |
FOLKS_PERSONA_DETAIL_POSTAL_ADDRESSES | Field for "postal-addresses". |
FOLKS_PERSONA_DETAIL_ROLES | Field for "roles". |
FOLKS_PERSONA_DETAIL_STRUCTURED_NAME | Field for "structured-name". |
FOLKS_PERSONA_DETAIL_URLS | Field for "urls". |
FOLKS_PERSONA_DETAIL_WEB_SERVICE_ADDRESSES | Field for "web-service-addresses". |
FOLKS_PERSONA_DETAIL_GROUPS | Field for "groups". |
FOLKS_PERSONA_DETAIL_IM_INTERACTION_COUNT | Field for "im-interaction-count". |
FOLKS_PERSONA_DETAIL_LAST_IM_INTERACTION_DATETIME | Field for "last-im-interaction-datetime". |
FOLKS_PERSONA_DETAIL_CALL_INTERACTION_COUNT | Field for "call-interaction-count". |
FOLKS_PERSONA_DETAIL_LAST_CALL_INTERACTION_DATETIME | Field for "last-call-interaction-datetime". |
FOLKS_PERSONA_DETAIL_ANTI_LINKS | Field for "anti-links". |
FOLKS_PERSONA_DETAIL_EXTENDED_INFO | Field for FolksExtendedFieldDetails. |

Since: 0.5.0

### enum FolksPersonaStoreError

Errors from FolksPersonaStores.

#### Members

FOLKS_PERSONA_STORE_ERROR_INVALID_ARGUMENT | An argument to the method was invalid. |
FOLKS_PERSONA_STORE_ERROR_CREATE_FAILED | Creation of a FolksPersona failed. |
FOLKS_PERSONA_STORE_ERROR_UNSUPPORTED_ON_USER | Such an operation may not be performed on a FolksPersona with "is-user" set to `true`. |
FOLKS_PERSONA_STORE_ERROR_STORE_OFFLINE | The FolksPersonaStore was offline (ie, this is a temporary failure). |
FOLKS_PERSONA_STORE_ERROR_READ_ONLY | The FolksPersonaStore doesn't support write operations. |
FOLKS_PERSONA_STORE_ERROR_PERMISSION_DENIED | The operation was denied due to not having sufficient permissions. |
FOLKS_PERSONA_STORE_ERROR_REMOVE_FAILED | Removal of a FolksPersona failed. This is a generic error which is used if no other error code (such as, e.g., `FOLKS_PERSONA_STORE_ERROR_PERMISSION_DENIED`) is applicable. |
FOLKS_PERSONA_STORE_ERROR_UNSUPPORTED_ON_NON_USER | Such an operation may only be performed on a FolksPersona with "is-user" set to `true`. |