TpStaticHandleRepo: telepathy-glib API Reference Manual

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

## Functions

TpHandleRepoIface * | tp_static_handle_repo_new ()

## Properties

GStrv | handle-names | Read / Write / Construct Only

## Types and Values

| TpStaticHandleRepo
| TpStaticHandleRepoClass

## Object Hierarchy

        GObject
        ╰── TpStaticHandleRepo

## Implemented Interfaces

TpStaticHandleRepo implements TpHandleRepoIface.

## Includes

    #include <telepathy-glib/telepathy-glib.h>

## 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_LIST`.

## Functions

### tp_static_handle_repo_new ()

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

#### Parameters

handle_type | The type of handle to store in the new repository |
handle_names | Same as “handle-names” |

#### Returns

a new static handle repository

## Types and Values

### 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_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

The static set of handle names supported by this repo.

Owner: TpStaticHandleRepo

Flags: Read / Write / Construct Only

## See Also

TpHandleRepoIface, TpDynamicHandleRepo