Top |
GQuark | tp_text_mixin_class_get_offset_quark () |
GQuark | tp_text_mixin_get_offset_quark () |
void | tp_text_mixin_class_init () |
void | tp_text_mixin_init () |
void | tp_text_mixin_set_message_types () |
void | tp_text_mixin_finalize () |
gboolean | tp_text_mixin_receive_with_flags () |
gboolean | tp_text_mixin_receive () |
gboolean | tp_text_mixin_acknowledge_pending_messages () |
gboolean | tp_text_mixin_list_pending_messages () |
gboolean | tp_text_mixin_get_message_types () |
void | tp_text_mixin_clear () |
gboolean | tp_text_mixin_has_pending_messages () |
void | tp_text_mixin_set_rescued () |
void | tp_text_mixin_iface_init () |
This mixin can be added to a channel GObject class to implement the text channel type in a general way. It implements the pending message queue and GetMessageTypes, so the implementation should only need to implement Send.
To use the text mixin, include a TpTextMixinClass somewhere in your
class structure and a TpTextMixin somewhere in your instance structure,
and call tp_text_mixin_class_init()
from your class_init function,
tp_text_mixin_init()
from your init function or constructor, and
tp_text_mixin_finalize()
from your dispose or finalize function.
To use the text mixin as the implementation of
TpSvcChannelTypeText, in the function you pass to G_IMPLEMENT_INTERFACE,
you should first call tp_text_mixin_iface_init()
, then call
tp_svc_channel_type_text_implement_send()
to register your implementation
of the Send method.
GQuark
tp_text_mixin_class_get_offset_quark (void
);
tp_text_mixin_class_get_offset_quark
is deprecated and should not be used in newly-written code.
Use TpMessageMixin instead.
GQuark
tp_text_mixin_get_offset_quark (void
);
tp_text_mixin_get_offset_quark
is deprecated and should not be used in newly-written code.
Use TpMessageMixin instead.
void tp_text_mixin_class_init (GObjectClass *obj_cls
,glong offset
);
tp_text_mixin_class_init
is deprecated and should not be used in newly-written code.
Use TpMessageMixin instead.
Initialize the text mixin. Should be called from the implementation's class_init function like so:
1 2 |
tp_text_mixin_class_init ((GObjectClass *) klass, G_STRUCT_OFFSET (SomeObjectClass, text_mixin)); |
void tp_text_mixin_init (GObject *obj
,glong offset
,TpHandleRepoIface *contacts_repo
);
tp_text_mixin_init
is deprecated and should not be used in newly-written code.
Use tp_message_mixin_init()
instead.
Initialize the text mixin. Should be called from the implementation's instance init function like so:
1 2 3 |
tp_text_mixin_init ((GObject *) self, G_STRUCT_OFFSET (SomeObject, text_mixin), self->contact_repo); |
obj |
An instance of the implementation that uses this mixin |
|
offset |
The byte offset of the TpTextMixin within the object structure |
|
contacts_repo |
The connection's |
void tp_text_mixin_set_message_types (GObject *obj
,...
);
tp_text_mixin_set_message_types
is deprecated and should not be used in newly-written code.
Use TpMessageMixin instead.
Set the supported message types.
obj |
An object with this mixin |
|
... |
guints representing members of TpChannelTextMessageType, terminated by G_MAXUINT |
void
tp_text_mixin_finalize (GObject *obj
);
tp_text_mixin_finalize
is deprecated and should not be used in newly-written code.
Use tp_message_mixin_finalize()
instead.
Free resources held by the text mixin.
gboolean tp_text_mixin_receive_with_flags (GObject *obj
,TpChannelTextMessageType type
,TpHandle sender
,time_t timestamp
,const char *text
,TpChannelTextMessageFlags flags
);
tp_text_mixin_receive_with_flags
is deprecated and should not be used in newly-written code.
Use tp_message_mixin_take_received()
instead.
Add a message to the pending queue and emit Received.
gboolean tp_text_mixin_receive (GObject *obj
,TpChannelTextMessageType type
,TpHandle sender
,time_t timestamp
,const char *text
);
tp_text_mixin_receive
is deprecated and should not be used in newly-written code.
Use tp_message_mixin_take_received()
instead.
Add a message to the pending queue and emit Received. Exactly equivalent
to tp_text_mixin_receive_with_flags()
with flags
== 0.
gboolean tp_text_mixin_acknowledge_pending_messages (GObject *obj
,const GArray *ids
,GError **error
);
tp_text_mixin_acknowledge_pending_messages
is deprecated and should not be used in newly-written code.
Use TpMessageMixin instead.
Implements D-Bus method AcknowledgePendingMessages on interface org.freedesktop.Telepathy.Channel.Type.Text
gboolean tp_text_mixin_list_pending_messages (GObject *obj
,gboolean clear
,GPtrArray **ret
,GError **error
);
tp_text_mixin_list_pending_messages
is deprecated and should not be used in newly-written code.
Use TpMessageMixin instead.
Implements D-Bus method ListPendingMessages on interface org.freedesktop.Telepathy.Channel.Type.Text
obj |
An object with this mixin |
|
clear |
If |
|
ret |
Used to return a pointer to a new GPtrArray of D-Bus structures |
|
error |
Used to return a pointer to a GError detailing any error that occurred, D-Bus will throw the error only if this function returns false. |
gboolean tp_text_mixin_get_message_types (GObject *obj
,GArray **ret
,GError **error
);
tp_text_mixin_get_message_types
is deprecated and should not be used in newly-written code.
Use TpMessageMixin instead.
Return a newly allocated GArray of guint, representing message types
taken from TpChannelTextMessageType, through ret
.
void
tp_text_mixin_clear (GObject *obj
);
tp_text_mixin_clear
is deprecated and should not be used in newly-written code.
Use tp_message_mixin_clear()
instead.
Clear the pending message queue, deleting all messages.
gboolean tp_text_mixin_has_pending_messages (GObject *obj
,TpHandle *first_sender
);
tp_text_mixin_has_pending_messages
is deprecated and should not be used in newly-written code.
Use tp_message_mixin_has_pending_messages()
instead.
Return whether the channel obj
has unacknowledged messages. If so, and
first_sender
is not NULL
, the handle of the sender of the first message
is placed in it, without incrementing the handle's reference count.
void
tp_text_mixin_set_rescued (GObject *obj
);
tp_text_mixin_set_rescued
is deprecated and should not be used in newly-written code.
Use tp_message_mixin_set_rescued()
instead.
Mark all pending messages as having been "rescued" from a channel that previously closed.
void tp_text_mixin_iface_init (gpointer g_iface
,gpointer iface_data
);
tp_text_mixin_iface_init
is deprecated and should not be used in newly-written code.
Use tp_message_mixin_text_iface_init()
instead.
Fill in this mixin's AcknowledgePendingMessages, GetMessageTypes and
ListPendingMessages implementations in the given interface vtable.
In addition to calling this function during interface initialization, the
implementor is expected to call tp_svc_channel_type_text_implement_send()
,
providing a Send implementation.
struct TpTextMixin { };
TpTextMixin
is deprecated and should not be used in newly-written code.
Structure to be included in the instance structure of objects that
use this mixin. Initialize it with tp_text_mixin_init()
.
There are no public fields.
struct TpTextMixinClass { };
TpTextMixinClass
is deprecated and should not be used in newly-written code.
Structure to be included in the class structure of objects that
use this mixin. Initialize it with tp_text_mixin_class_init()
.
There are no public fields.