Channel
Object Hierarchy:
Description:
[ CCode ( type_id = "tp_channel_get_type ()" ) ]
[ Version ( since = "0.7.1" ) ]
public class Channel : Proxy
[ Version ( since = "0.7.1" ) ]
public class Channel : Proxy
A proxy object for a Telepathy channel.
A proxy object for a Telepathy channel. There are no interesting public struct fields.
(Changed in 0.7.12: the layout of the structure is visible, allowing subclassing.)
All known sub-classes:
Namespace: TelepathyGLib
Package: telepathy-glib
Content:
Properties:
- public bool channel_ready { get; }
Initially
false
; changes totrue
when prepare_async has finished preparingTP_CHANNEL_FEATURE_CORE
, and if the channel is a group,TP_CHANNEL_FEATURE_GROUP
. - public Connection connection { get; construct; }
The Connection to which this Channel belongs.
- public uint group_flags { get; }
If the
TP_CHANNEL_FEATURE_GROUP
feature has been prepared successfully, ChannelGroupFlags indicating the capabilities and behaviour of that group. - public Contact group_self_contact { owned get; }
If this channel is a group and
TP_CHANNEL_FEATURE_CONTACTS
has been prepared, and the user is a member of the group, the Contact representing them in this group. - public uint group_self_handle { get; }
If this channel is a group and
TP_CHANNEL_FEATURE_GROUP
has been prepared, and the user is a member of the group, the Handle representing them in this group. - public string identifier { get; }
This channel's associated identifier, or the empty string if it has handle type NONE.
- public Contact initiator_contact { get; }
The Contact of the initiator of this channel, or
null
if there is no particular initiator. - public uint initiator_handle { get; }
- public string initiator_identifier { owned get; }
If initiator_handle is 0, this will always be "".
- public bool password_needed { get; }
If
true
, provide_password_async has to be called to be able to join the channel. - public bool requested { get; }
true
if this channel was created in response to a local request, such as a call to create_channel_async. - public Contact target_contact { get; }
Static methods:
- public static Quark get_feature_quark_chat_states ()
- public static Quark get_feature_quark_contacts ()
- public static Quark get_feature_quark_core ()
- public static Quark get_feature_quark_group ()
- public static Quark get_feature_quark_password ()
- public static void init_known_interfaces ()
Ensure that the known interfaces for TpChannel have been set up.
Creation methods:
- public Channel (Connection conn, string object_path, string optional_channel_type, HandleType optional_handle_type, Handle optional_handle) throws Error
- public Channel.from_properties (Connection conn, string object_path, HashTable<string,Value?> immutable_properties) throws Error
Methods:
- public unowned Connection borrow_connection ()
Returns the connection for this channel.
- public unowned HashTable<string,Value?> borrow_immutable_properties ()
Returns the immutable D-Bus properties of this channel, the same as
TpChannel:channel-properties
s. - public async bool close_async () throws Error
Close channel this.
- public async bool destroy_async () throws Error
Destroy channel this.
- public Variant dup_immutable_properties ()
Returns the immutable D-Bus properties of this channel, in a variant of type VARDICT where the keys are strings, D-Bus interface name + ".
- public unowned string get_channel_type ()
Get the D-Bus interface name representing this channel's type, if it has been discovered.
- public Quark get_channel_type_id ()
Get the D-Bus interface name representing this channel's type, as a GQuark, if it has been discovered.
- public ChannelChatState get_chat_state (Handle contact)
Return the chat state for the given contact.
- public unowned Connection get_connection ()
Returns the connection for this channel.
- public Handle get_handle (out HandleType handle_type)
Get the handle representing the contact, chatroom, etc.
- public unowned string get_identifier ()
This channel's associated identifier, or the empty string if no identifier or unknown.
- public unowned Contact get_initiator_contact ()
- public bool get_requested ()
Return the requested property
- public unowned Contact get_target_contact ()
- public GenericArray<unowned Contact> group_dup_local_pending_contacts ()
If this is a group and the
TP_CHANNEL_FEATURE_CONTACTS
feature has been prepared, return a GenericArray containing its local-pending members. - public GenericArray<unowned Contact> group_dup_members_contacts ()
If this is a group and the
TP_CHANNEL_FEATURE_CONTACTS
feature has been prepared, return a GenericArray containing its members. - public GenericArray<unowned Contact> group_dup_remote_pending_contacts ()
If this is a group and the
TP_CHANNEL_FEATURE_CONTACTS
feature has been prepared, return a GenericArray containing its remote-pending members. - public unowned Contact group_get_contact_owner (Contact contact)
Synopsis (see below for further explanation):
- public ChannelGroupFlags group_get_flags ()
Return the group_flags property (see the description of that property for notes on validity).
- public Handle group_get_handle_owner (Handle handle)
Synopsis (see below for further explanation):
- public unowned Intset group_get_local_pending ()
If this is a group and the
TP_CHANNEL_FEATURE_GROUP
feature has been prepared, return a Intset containing its local-pending members. - public bool group_get_local_pending_contact_info (Contact local_pending, out unowned Contact actor, out ChannelGroupChangeReason reason, out unowned string message)
If
local_pending
is actually a local-pending contact, write additional information intoactor
,reason
andmessage
and returntrue
. - public bool group_get_local_pending_info (Handle local_pending, out Handle actor, out ChannelGroupChangeReason reason, out unowned string message)
If
local_pending
is actually the handle of a local-pending contact, write additional information intoactor
,reason
andmessage
and returntrue
. - public unowned Intset group_get_members ()
If this is a group and the
TP_CHANNEL_FEATURE_GROUP
feature has been prepared, return a Intset containing its members. - public unowned Intset group_get_remote_pending ()
If this is a group and the
TP_CHANNEL_FEATURE_GROUP
feature has been prepared, return a Intset containing its remote-pending members. - public unowned Contact group_get_self_contact ()
- public Handle group_get_self_handle ()
Return the group_self_handle property (see the description of that property for notes on validity).
- public async bool join_async (string message) throws Error
Join channel this with
message
as join message. - public async bool leave_async (ChannelGroupChangeReason reason, string message) throws Error
Leave channel this with
reason
as reason andmessage
as leave message. - public async bool provide_password_async (string password) throws Error
Provide
password
so that this can be joined.
Signals:
- public signal void chat_state_changed (uint contact, uint state)
Emitted when a contact's chat state changes after prepare_async has finished preparing the feature
TP_CHANNEL_FEATURE_CHAT_STATES
. - public signal void group_contacts_changed (GenericArray<Contact> added, GenericArray<Contact> removed, GenericArray<Contact> local_pending, GenericArray<Contact> remote_pending, Contact actor, HashTable<string,Value?> details)
Emitted when the group members change in a Group channel.
- public signal void group_flags_changed (uint added, uint removed)
Emitted when the group_flags property changes while the channel is ready.
- public signal void group_members_changed_detailed (Array<uint> added, Array<uint> removed, Array<uint> local_pending, Array<uint> remote_pending, HashTable<string,Value?> details)
Emitted when the group members change in a Group channel that is ready.
Inherited Members:
All known members inherited from class TelepathyGLib.Proxy
All known members inherited from class GLib.Object