Interface

TalkatuMessage

since: 0.0

Description [src]

interface Talkatu.Message : GObject.Object

TalkatuMessage is an opaque data structure and can only be accessed using the following functions.

Available since: 0.0

Prerequisite

In order to implement Message, your type must inherit fromGObject.

Implementations

Instance methods

talkatu_message_add_attachment

Adds attachment to message.

since: 0.0

talkatu_message_clear_attachments

Removes all attachments from message.

since: 0.0

talkatu_message_foreach_attachment

Calls func for each TalkatuAttachment that’s attached to message.

since: 0.0

talkatu_message_get_attachment

Retrieves the TalkatuAttachment identified by id from message.

since: 0.0

talkatu_message_get_author

Gets the author of message.

since: 0.0

talkatu_message_get_author_name_color

Gets a GdkRGBA that the author’s name will be rendered with or NULL if no color is set.

since: 0.0

talkatu_message_get_content_type

Gets the content-type of message.

since: 0.0

talkatu_message_get_contents

Gets the contents of message.

since: 0.0

talkatu_message_get_edited

Gets whether message has been edited by its author.

since: 0.0

talkatu_message_get_id

Gets the identifier of the message.

since: 0.0

talkatu_message_get_timestamp

Gets the timestamp for when this message was created.

since: 0.0

talkatu_message_remove_attachment

Removes the TalkatuAttachment identified by id if it exists.

since: 0.0

talkatu_message_set_author

Sets the author of message to author.

since: 0.0

talkatu_message_set_author_name_color

Sets the color for the name of the author of message to color. Calling this with color set to NULL will unset a previously set color.

since: 0.0

talkatu_message_set_content_type

Sets the content type of message to content_type.

since: 0.0

talkatu_message_set_contents

Sets the contents of message to contents.

since: 0.0

talkatu_message_set_edited

Sets whether message has been edited or not.

since: 0.0

talkatu_message_set_id

Sets the identifier of message.

since: 0.0

talkatu_message_set_timestamp

Sets the creation timestamp for message to timestamp.

since: 0.0

Properties

Talkatu.Message:author
No description available.

since: 0.0

Talkatu.Message:author-name-color
No description available.

since: 0.0

Talkatu.Message:content-type
No description available.

since: 0.0

Talkatu.Message:contents
No description available.

since: 0.0

Talkatu.Message:edited
No description available.

since: 0.0

Talkatu.Message:id
No description available.

since: 0.0

Talkatu.Message:timestamp
No description available.

since: 0.0

Interface structure

struct TalkatuMessageInterface {
  gboolean (* add_attachment) (
    TalkatuMessage* message,
    TalkatuAttachment* attachment
  );
  gboolean (* remove_attachment) (
    TalkatuMessage* message,
    guint64 id
  );
  TalkatuAttachment* (* get_attachment) (
    TalkatuMessage* message,
    guint64 id
  );
  void (* foreach_attachment) (
    TalkatuMessage* message,
    TalkatuAttachmentForeachFunc func,
    gpointer data
  );
  void (* clear_attachments) (
    TalkatuMessage* message
  );
  
}

TalkatuMessage is an interface to be implemented that standardizes the way messages are handled. All of its properties should be overridden with a sensible value returned for them.

It also needs to implement a storage mechanism for attachments which are identified by a #guint64.

Interface members
add_attachment
gboolean (* add_attachment) (
    TalkatuMessage* message,
    TalkatuAttachment* attachment
  )
 

The add_attachment vfunc is called to add an attachment to the message.

remove_attachment
gboolean (* remove_attachment) (
    TalkatuMessage* message,
    guint64 id
  )
 

The remove_attachment vfunc is called to remove an attachment from the message.

get_attachment
TalkatuAttachment* (* get_attachment) (
    TalkatuMessage* message,
    guint64 id
  )
 

The get_attachment vfunc gets an attachment from the message.

foreach_attachment
void (* foreach_attachment) (
    TalkatuMessage* message,
    TalkatuAttachmentForeachFunc func,
    gpointer data
  )
 

The foreach_attachment vfunc is called to iterate over each attachment in the message and call the provided TalkatuForeachAttachmentFunc on them.

clear_attachments
void (* clear_attachments) (
    TalkatuMessage* message
  )
 

The clear_attachments vfunc is called to clear all attachments from the message.

Virtual methods

Talkatu.Message.add_attachment

Adds attachment to message.

since: 0.0

Talkatu.Message.clear_attachments

Removes all attachments from message.

since: 0.0

Talkatu.Message.foreach_attachment

Calls func for each TalkatuAttachment that’s attached to message.

since: 0.0

Talkatu.Message.get_attachment

Retrieves the TalkatuAttachment identified by id from message.

since: 0.0

Talkatu.Message.remove_attachment

Removes the TalkatuAttachment identified by id if it exists.

since: 0.0