Top |
TpStaticHandleRepoTpStaticHandleRepo — handle repository implementation with a fixed, static set of handle names |
A static handle repository has a fixed, static set of allowed names; these handles can never be destroyed, and no more can be created, so no reference counting is performed.
The “handle-type” property must be set at construction time.
Most connection managers will use this for handles of type
TP_HANDLE_TYPE_LIST
.
TpHandleRepoIface * tp_static_handle_repo_new (TpHandleType handle_type
,const gchar **handle_names
);
handle_type |
The type of handle to store in the new repository |
|
handle_names |
Same as “handle-names” |
typedef struct _TpStaticHandleRepo TpStaticHandleRepo;
A static handle repository contains a fixed set of handles.
As well as setting the “handle-type” property, code which creates a static handle repository must set the “handle-names” construction property to a strv of valid handle names. All of these are preallocated; no more may be created, and attempts to do so will fail.
Handles in this repository are 1 more than the index in the string vector of the handle's name, so the first name in the vector has handle 1 and so on. Connection managers which use a static repository may assume this to be true, and use an enumeration starting at 1, in the same order as the string vector, to avoid having to look up handles internally.
This is intended for handles of type TP_HANDLE_TYPE_LIST
,
for which the connection manager should only accept a static list of
supported handle names.
All structure fields are private.