TpStaticHandleRepo

TpStaticHandleRepo — handle repository implementation with a fixed, static set of handle names

Synopsis


#include <telepathy-glib/handle-repo-static.h>

TpHandleRepoIface*  tp_static_handle_repo_new           (TpHandleType handle_type,
                                                         const gchar **handle_names);
                    TpStaticHandleRepo;
                    TpStaticHandleRepoClass;

Object Hierarchy

  GObject
   +----TpStaticHandleRepo

Implemented Interfaces

TpStaticHandleRepo implements TpHandleRepoIface.

Properties

  "handle-names"             GStrv*                : Read / Write / Construct Only

Description

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_CONTACT_LIST.

Details

tp_static_handle_repo_new ()

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"
Returns : a new static handle repository

TpStaticHandleRepo

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_CONTACT_LIST, for which the connection manager should only accept a static list of supported handle names.

All structure fields are private.


TpStaticHandleRepoClass

typedef struct _TpStaticHandleRepoClass TpStaticHandleRepoClass;

The class of a TpStaticHandleRepo. All fields are private.

Property Details

The "handle-names" property

  "handle-names"             GStrv*                : Read / Write / Construct Only

The static set of handle names supported by this repo.

See Also

TpHandleRepoIface, TpDynamicHandleRepo