TpRoomList

TpRoomList — proxy object for a room list channel

Functions

Properties

TpAccount * account Read / Write / Construct Only
gboolean listing Read
gchar * server Read / Write / Construct Only

Signals

void failed Run Last
void got-room Run Last

Types and Values

struct TpRoomList
struct TpRoomListClass

Object Hierarchy

    GObject
    ╰── TpRoomList

Implemented Interfaces

TpRoomList implements GAsyncInitable.

Includes

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

Description

TpRoomList provides convenient API to list rooms.

Functions

tp_room_list_new_async ()

void
tp_room_list_new_async (TpAccount *account,
                        const gchar *server,
                        GAsyncReadyCallback callback,
                        gpointer user_data);

Parameters

account

a TpAccount for the room listing

 

server

the DNS name of the server whose rooms should listed

 

callback

a GAsyncReadyCallback to call when the initialization is finished

 

user_data

data to pass to the callback function

 

Since 0.19.0


tp_room_list_new_finish ()

TpRoomList *
tp_room_list_new_finish (GAsyncResult *result,
                         GError **error);

Parameters

result

the GAsyncResult from the callback

 

error

a GError location to store an error, or NULL

 

Returns

a new TpRoomList object, or NULL in case of error.

[transfer full]

Since 0.19.0


tp_room_list_is_listing ()

gboolean
tp_room_list_is_listing (TpRoomList *self);

Return the “listing” property

Parameters

self

a TpRoomList

 

Returns

the value of “listing” property

Since 0.19.0


tp_room_list_get_server ()

const gchar *
tp_room_list_get_server (TpRoomList *self);

Return the “server” property

Parameters

self

a TpRoomList

 

Returns

the value of “server” property

Since 0.19.0


tp_room_list_get_account ()

TpAccount *
tp_room_list_get_account (TpRoomList *self);

Return the “account” property

Parameters

self

a TpRoomList

 

Returns

the value of “account” property.

[transfer none]

Since 0.19.0


tp_room_list_start ()

void
tp_room_list_start (TpRoomList *self);

Start listing rooms using self . Use the TpRoomList::got-rooms signal to get the rooms found. Errors will be reported using the TpRoomList::failed signal.

Parameters

self

a TpRoomList

 

Since 0.19.0

Types and Values

struct TpRoomList

struct TpRoomList;

Data structure representing a TpRoomList.

Since 0.19.0


struct TpRoomListClass

struct TpRoomListClass {
};

The class of a TpRoomList.

Since 0.19.0

Property Details

The “account” property

  “account”                  TpAccount *

The TpAccount to use for the room listing.

Flags: Read / Write / Construct Only

Since 0.19.0


The “listing” property

  “listing”                  gboolean

TRUE if the channel is currently listing rooms.

This property is meaningless until the TP_ROOM_LIST_FEATURE_LISTING feature has been prepared.

Flags: Read

Default value: FALSE

Since 0.19.0


The “server” property

  “server”                   gchar *

The DNS name of the server whose rooms are listed by this channel, or NULL.

Flags: Read / Write / Construct Only

Default value: NULL

Since 0.19.0

Signal Details

The “failed” signal

void
user_function (TpRoomList *self,
               GError     *error,
               gpointer    user_data)

Fired when something goes wrong while listing the channels; see error for details.

Parameters

self

a TpRoomList

 

error

a GError indicating the reason of the error

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since 0.19.0


The “got-room” signal

void
user_function (TpRoomList *self,
               TpRoomInfo *room,
               gpointer    user_data)

Fired each time a room is found during the listing process. User should take his own reference on room if he plans to continue using it once the signal callback has returned.

Parameters

self

a TpRoomList

 

room

a TpRoomInfo

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since 0.19.0