Top |
FolksAntiLinkableFolksAntiLinkable — Interface for FolksPersona subclasses from backends which support storage of, anti-linking data. |
Anti-links are stored as a set of "uid"s with each FolksPersona (A), specifying that A must not be linked into an FolksIndividual with any of the personas in its anti-links set.
void folks_anti_linkable_change_anti_links (FolksAntiLinkable *self
,GeeSet *anti_links
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Change the FolksPersona's set of anti-links.
It's preferred to call this rather than setting "anti-links" directly, as this method gives error notification and will only return once the anti-links have been written to the relevant backing store (or the operation's failed).
It should be noted that folks_individual_aggregator_link_personas()
and folks_individual_aggregator_unlink_individual()
will modify the anti-links sets of the personas they touch, in order to remove and add anti-links, respectively. It is expected that these FolksIndividualAggregator methods will be used to modify anti-links indirectly, rather than calling folks_anti_linkable_change_anti_links()
directly.
FolksPropertyError will be returned in error
if setting the anti-links failed
See also: folks_anti_linkable_change_anti_links_finish()
self |
the FolksAntiLinkable instance |
|
anti_links |
. the new set of anti-links from this persona . |
[in] |
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[closure] |
Since 0.7.3
void folks_anti_linkable_change_anti_links_finish (FolksAntiLinkable *self
,GAsyncResult *_res_
,GError **error
);
Change the FolksPersona's set of anti-links.
It's preferred to call this rather than setting "anti-links" directly, as this method gives error notification and will only return once the anti-links have been written to the relevant backing store (or the operation's failed).
It should be noted that folks_individual_aggregator_link_personas()
and folks_individual_aggregator_unlink_individual()
will modify the anti-links sets of the personas they touch, in order to remove and add anti-links, respectively. It is expected that these FolksIndividualAggregator methods will be used to modify anti-links indirectly, rather than calling folks_anti_linkable_change_anti_links()
directly.
FolksPropertyError will be returned in error
if setting the anti-links failed
See also: folks_anti_linkable_change_anti_links()
self |
the FolksAntiLinkable instance |
|
_res_ |
||
error |
location to store the error occuring, or |
[error-domains FolksPropertyError] |
Since 0.7.3
gboolean folks_anti_linkable_has_anti_link_with_persona (FolksAntiLinkable *self
,FolksPersona *other_persona
);
Check for an anti-link with another persona.
This will return true
if other_persona
's UID is listed in this persona's anti-links set. Note that this check is not symmetric.
self |
the FolksAntiLinkable instance |
|
other_persona |
. the persona to check is anti-linked . |
[in] |
Since 0.7.3
void folks_anti_linkable_add_anti_links (FolksAntiLinkable *self
,GeeSet *other_personas
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Add anti-links to other personas.
The UIDs of all personas in other_personas
will be added to this persona's anti-links set and the changes propagated to backends.
Any attempt to anti-link a persona with itself is not an error, but is ignored.
This method is safe to call multiple times concurrently (e.g. begin one asynchronous call, then begin another before the first has finished).
FolksPropertyError will be returned in error
if setting the anti-links failed
See also: folks_anti_linkable_add_anti_links_finish()
self |
the FolksAntiLinkable instance |
|
other_personas |
. the personas to anti-link to this one . |
[in] |
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[closure] |
Since 0.7.3
void folks_anti_linkable_add_anti_links_finish (FolksAntiLinkable *self
,GAsyncResult *_res_
,GError **error
);
Add anti-links to other personas.
The UIDs of all personas in other_personas
will be added to this persona's anti-links set and the changes propagated to backends.
Any attempt to anti-link a persona with itself is not an error, but is ignored.
This method is safe to call multiple times concurrently (e.g. begin one asynchronous call, then begin another before the first has finished).
FolksPropertyError will be returned in error
if setting the anti-links failed
See also: folks_anti_linkable_add_anti_links()
self |
the FolksAntiLinkable instance |
|
_res_ |
||
error |
location to store the error occuring, or |
[error-domains FolksPropertyError] |
Since 0.7.3
void folks_anti_linkable_remove_anti_links (FolksAntiLinkable *self
,GeeSet *other_personas
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Remove anti-links to other personas.
The UIDs of all personas in other_personas
will be removed from this persona's anti-links set and the changes propagated to backends.
If the global anti-link is set, this will not have any effect until the global anti-link is removed.
This method is safe to call multiple times concurrently (e.g. begin one asynchronous call, then begin another before the first has finished).
FolksPropertyError will be returned in error
if setting the anti-links failed
See also: folks_anti_linkable_remove_anti_links_finish()
self |
the FolksAntiLinkable instance |
|
other_personas |
. the personas to remove anti-links from this one . |
[in] |
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[closure] |
Since 0.7.3
void folks_anti_linkable_remove_anti_links_finish (FolksAntiLinkable *self
,GAsyncResult *_res_
,GError **error
);
Remove anti-links to other personas.
The UIDs of all personas in other_personas
will be removed from this persona's anti-links set and the changes propagated to backends.
If the global anti-link is set, this will not have any effect until the global anti-link is removed.
This method is safe to call multiple times concurrently (e.g. begin one asynchronous call, then begin another before the first has finished).
FolksPropertyError will be returned in error
if setting the anti-links failed
See also: folks_anti_linkable_remove_anti_links()
self |
the FolksAntiLinkable instance |
|
_res_ |
||
error |
location to store the error occuring, or |
[error-domains FolksPropertyError] |
Since 0.7.3
void folks_anti_linkable_add_global_anti_link (FolksAntiLinkable *self
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Prevent persona from being linked with any other personas
This function will add a wildcard *
to the set of anti-links, which will prevent the persona from being linked with any other personas.
To make the persona linkable again you need to remove the global anti-link
This method is safe to call multiple times concurrently (e.g. begin one asynchronous call, then begin another before the first has finished).
FolksPropertyError will be returned in error
if setting the anti-links failed
See also: folks_anti_linkable_add_global_anti_link_finish()
self |
the FolksAntiLinkable instance |
|
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[closure] |
Since 0.9.7
void folks_anti_linkable_add_global_anti_link_finish (FolksAntiLinkable *self
,GAsyncResult *_res_
,GError **error
);
Prevent persona from being linked with any other personas
This function will add a wildcard *
to the set of anti-links, which will prevent the persona from being linked with any other personas.
To make the persona linkable again you need to remove the global anti-link
This method is safe to call multiple times concurrently (e.g. begin one asynchronous call, then begin another before the first has finished).
FolksPropertyError will be returned in error
if setting the anti-links failed
See also: folks_anti_linkable_add_global_anti_link()
self |
the FolksAntiLinkable instance |
|
_res_ |
||
error |
location to store the error occuring, or |
[error-domains FolksPropertyError] |
Since 0.9.7
void folks_anti_linkable_remove_global_anti_link (FolksAntiLinkable *self
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Allow persona to be linked with other personas
This function removes the wildcard *
from the set of anti-links, allowing the persona to be linked again.
This method is safe to call multiple times concurrently (e.g. begin one asynchronous call, then begin another before the first has finished).
FolksPropertyError will be returned in error
if setting the anti-links failed
See also: folks_anti_linkable_remove_global_anti_link_finish()
self |
the FolksAntiLinkable instance |
|
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[closure] |
Since 0.9.7
void folks_anti_linkable_remove_global_anti_link_finish (FolksAntiLinkable *self
,GAsyncResult *_res_
,GError **error
);
Allow persona to be linked with other personas
This function removes the wildcard *
from the set of anti-links, allowing the persona to be linked again.
This method is safe to call multiple times concurrently (e.g. begin one asynchronous call, then begin another before the first has finished).
FolksPropertyError will be returned in error
if setting the anti-links failed
See also: folks_anti_linkable_remove_global_anti_link()
self |
the FolksAntiLinkable instance |
|
_res_ |
||
error |
location to store the error occuring, or |
[error-domains FolksPropertyError] |
Since 0.9.7
gboolean
folks_anti_linkable_has_global_anti_link
(FolksAntiLinkable *self
);
Check if the persona has a global anti link.
If the persona has global anti link this means that the persona can not be linked with any other persona.
Since 0.9.7
GeeSet *
folks_anti_linkable_get_anti_links (FolksAntiLinkable *self
);
Get and return the current value of the "anti-links" property.
UIDs of anti-linked FolksPersonas.
The FolksPersonas identified by their UIDs in this set are guaranteed to not be linked to this FolksPersona, even if their linkable properties match.
No UIDs may be null
. Well-formed but non-existent UIDs (i.e. UIDs which can be successfully parsed, but which don't currently correspond to a FolksPersona instance) are permitted, as personas may appear and disappear over time.
The special UID *
is used as a wildcard to mark the persona as globally anti-linked. See folks_anti_linkable_has_global_anti_link()
.
It is expected, but not guaranteed, that anti-links made between personas will be reciprocal. That is, if persona A lists persona B's UID in its "anti-links" set, persona B will typically also list persona A in its anti-links set.
Since 0.7.3
void folks_anti_linkable_set_anti_links (FolksAntiLinkable *self
,GeeSet *value
);
Set the value of the "anti-links" property to value
.
UIDs of anti-linked FolksPersonas.
The FolksPersonas identified by their UIDs in this set are guaranteed to not be linked to this FolksPersona, even if their linkable properties match.
No UIDs may be null
. Well-formed but non-existent UIDs (i.e. UIDs which can be successfully parsed, but which don't currently correspond to a FolksPersona instance) are permitted, as personas may appear and disappear over time.
The special UID *
is used as a wildcard to mark the persona as globally anti-linked. See folks_anti_linkable_has_global_anti_link()
.
It is expected, but not guaranteed, that anti-links made between personas will be reciprocal. That is, if persona A lists persona B's UID in its "anti-links" set, persona B will typically also list persona A in its anti-links set.
self |
the FolksAntiLinkable instance to modify |
|
value |
the new value of the "anti-links" property |
Since 0.7.3
typedef struct _FolksAntiLinkable FolksAntiLinkable;
Interface for FolksPersona subclasses from backends which support storage of, anti-linking data.
Anti-links are stored as a set of "uid"s with each FolksPersona (A), specifying that A must not be linked into an FolksIndividual with any of the personas in its anti-links set.
Since 0.7.3
struct FolksAntiLinkableIface { GTypeInterface parent_iface; void (*change_anti_links) (FolksAntiLinkable* self, GeeSet* anti_links, GAsyncReadyCallback _callback_, gpointer _user_data_); void (*change_anti_links_finish) (FolksAntiLinkable* self, GAsyncResult* _res_, GError** error); GeeSet* (*get_anti_links) (FolksAntiLinkable* self); void (*set_anti_links) (FolksAntiLinkable* self, GeeSet* value); };
Interface for creating FolksAntiLinkable implementations.
GTypeInterface |
the parent interface structure |
|
virtual method called by |
||
asynchronous finish function for |
||
getter method for the abstract property "anti-links" |
||
setter method for the abstract property "anti-links" |
“anti-links”
property “anti-links” GeeSet *
UIDs of anti-linked FolksPersonas.
The FolksPersonas identified by their UIDs in this set are guaranteed to not be linked to this FolksPersona, even if their linkable properties match.
No UIDs may be null
. Well-formed but non-existent UIDs (i.e. UIDs which can be successfully parsed, but which don't currently correspond to a FolksPersona instance) are permitted, as personas may appear and disappear over time.
The special UID *
is used as a wildcard to mark the persona as globally anti-linked. See folks_anti_linkable_has_global_anti_link()
.
It is expected, but not guaranteed, that anti-links made between personas will be reciprocal. That is, if persona A lists persona B's UID in its "anti-links" set, persona B will typically also list persona A in its anti-links set.
Flags: Read / Write
Since 0.7.3