## TpHandle

TpHandle — type representing handles

## Synopsis

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

    typedef             TpHandle;
    #define             TP_TYPE_HANDLE
    #define             TP_UNKNOWN_HANDLE_TYPE
    gboolean            tp_handle_type_is_valid             (TpHandleType type,
                                                             GError **error);
    const gchar *       tp_handle_type_to_string            (TpHandleType type);

## Description

The TpHandle type represents a Telepathy handle.

## Details

### TpHandle

    typedef guint TpHandle;

Type representing Telepathy handles within telepathy-glib.

This is guint despite the wire protocol having 32-bit integers, because dbus-glib expects GArrays of guint and so on. If the dbus-glib ABI changes in future, telepathy-glib is likely to have a matching ABI change.

### TP_TYPE_HANDLE

    #define TP_TYPE_HANDLE G_TYPE_UINT

The GType of a TpHandle, currently G_TYPE_UINT.

This won't change unless in an ABI-incompatible version of telepathy-glib.

### TP_UNKNOWN_HANDLE_TYPE

    #define TP_UNKNOWN_HANDLE_TYPE ((TpHandleType) -1)

An invalid handle type (-1 cast to TpHandleType) used to represent an unknown handle type.

Since 0.7.0

### tp_handle_type_is_valid ()

    gboolean            tp_handle_type_is_valid             (TpHandleType type,
                                                             GError **error);

If the given handle type is valid, return `TRUE`. If not, set `error` and return `FALSE`.

`type` : | A handle type, valid or not, to be checked
`error` : | Set if the handle type is invalid
Returns : | `TRUE` if the handle type is valid.

### tp_handle_type_to_string ()

    const gchar *       tp_handle_type_to_string            (TpHandleType type);

`type` : | A handle type, which need not be valid
Returns : | a human-readable string describing the handle type, e.g. "contact". For invalid handle types, returns "(no handle)" for 0 or "(invalid handle type)" for others.

## See Also

TpHandleRepoIface