Interface

TalkatuMessage

Description [src]

interface Talkatu.Message : GObject.Object

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

Prerequisite

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

Implementations

Instance methods

talkatu_message_add_attachment

Adds attachment to message.

talkatu_message_clear_attachments

Removes all attachments from message.

talkatu_message_foreach_attachment

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

talkatu_message_get_attachment

Retrieves the TalkatuAttachment identified by id from message.

talkatu_message_get_author

Gets the author of message.

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.

talkatu_message_get_content_type

Gets the content-type of message.

talkatu_message_get_contents

Gets the contents of message.

talkatu_message_get_edited

Gets whether message has been edited by its author.

talkatu_message_get_id

Gets the identifier of the message.

talkatu_message_get_timestamp

Gets the timestamp for when this message was created.

talkatu_message_remove_attachment

Removes the TalkatuAttachment identified by id if it exists.

talkatu_message_set_author

Sets the author of message to author.

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.

talkatu_message_set_content_type

Sets the content type of message to content_type.

talkatu_message_set_contents

Sets the contents of message to contents.

talkatu_message_set_edited

Sets whether message has been edited or not.

talkatu_message_set_id

Sets the identifier of message.

talkatu_message_set_timestamp

Sets the creation timestamp for message to timestamp.

Properties

Talkatu.Message:author
No description available.

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

Talkatu.Message:content-type
No description available.

Talkatu.Message:contents
No description available.

Talkatu.Message:edited
No description available.

Talkatu.Message:id
No description available.

Talkatu.Message:timestamp
No description available.

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
  )
 No description available.
remove_attachment
gboolean (* remove_attachment) (
    TalkatuMessage* message,
    guint64 id
  )
 No description available.
get_attachment
TalkatuAttachment* (* get_attachment) (
    TalkatuMessage* message,
    guint64 id
  )
 No description available.
foreach_attachment
void (* foreach_attachment) (
    TalkatuMessage* message,
    TalkatuAttachmentForeachFunc func,
    gpointer data
  )
 No description available.
clear_attachments
void (* clear_attachments) (
    TalkatuMessage* message
  )
 No description available.

Virtual methods

Talkatu.Message.add_attachment

Adds attachment to message.

Talkatu.Message.clear_attachments

Removes all attachments from message.

Talkatu.Message.foreach_attachment

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

Talkatu.Message.get_attachment

Retrieves the TalkatuAttachment identified by id from message.

Talkatu.Message.remove_attachment

Removes the TalkatuAttachment identified by id if it exists.