AvatarCache
Object Hierarchy:
Description:
public class AvatarCache : Object
A singleton persistent cache object for avatars used across backends in folks. Avatars may be added to the cache, and referred to by a
persistent URI from that point onwards.
Since:
0.6.0
Namespace: Folks
Package: folks
Content:
Static methods:
Methods:
- public async
LoadableIcon
? load_avatar (string
id) throws Error
Fetch an avatar from the cache by its globally unique ID.
- public async
string
store_avatar (string
id, LoadableIcon
avatar) throws Error
Store an avatar in the cache, assigning the given globally unique ID
to it, which can later be used to load and remove the avatar from the cache. For example, this ID could be the UID of a persona. The
URI of the cached avatar file will be returned.
- public async void remove_avatar (
string
id) throws Error
Remove an avatar from the cache, if it exists in the cache. If the
avatar exists in the cache but there is a problem in removing it, a GLib.Error
will be thrown.
- public
string
build_uri_for_avatar (string
id)
Build the URI of an avatar file in the cache from a globally unique
ID. This will always succeed, even if the avatar doesn't exist in the cache.