![]() |
![]() |
![]() |
![]() |
char * | content-type | Read / Write / Construct Only |
guint64 | id | Read / Write / Construct |
char * | local-uri | Read / Write / Construct |
char * | remote-uri | Read / Write / Construct |
guint64 | size | Read / Write / Construct |
#define | TALKATU_TYPE_ATTACHMENT |
struct | TalkatuAttachmentInterface |
TalkatuAttachment |
void (*TalkatuAttachmentForeachFunc) (TalkatuAttachment *attachment
,gpointer data
);
TalkatuAttachmentForeachFunc is a callback function called against each TalkatuAttachment in a collection.
guint64
talkatu_attachment_get_id (TalkatuAttachment *attachment
);
Gets the ID associated with attachment
.
guint64 *
talkatu_attachment_get_hash_key (TalkatuAttachment *attachment
);
Gets the hash key of attachment
. This should only be used when
trying to address a TalkatuAttachment in a GHashTable that is using
g_int64_hash()
as the key function.
void talkatu_attachment_set_id (TalkatuAttachment *attachment
,guint64 id
);
Sets the ID of attachment
to id
.
gchar *
talkatu_attachment_get_content_type (TalkatuAttachment *attachment
);
Returns the content type of the attachment.
gchar *
talkatu_attachment_get_local_uri (TalkatuAttachment *attachment
);
Gets the local URI if any for attachment
.
void talkatu_attachment_set_local_uri (TalkatuAttachment *attachment
,const gchar *local_uri
);
Sets the local URI of attachment
.
gchar *
talkatu_attachment_get_remote_uri (TalkatuAttachment *attachment
);
Gets the remote URI if any for attachment
.
void talkatu_attachment_set_remote_uri (TalkatuAttachment *attachment
,const gchar *remote_uri
);
Sets the remote URI of attachment
.
guint64
talkatu_attachment_get_size (TalkatuAttachment *attachment
);
Gets the size of attachment
.
void talkatu_attachment_set_size (TalkatuAttachment *attachment
,guint64 size
);
Sets the size of attachment
to size
.
gchar *
talkatu_attachment_get_filename (TalkatuAttachment *attachment
);
Gets the base filename for attachment
. Remote URI will be checked before
local URI, but the basename of one of those is what will be returned.
GIcon *
talkatu_attachment_get_preview (TalkatuAttachment *attachment
);
Create a GIcon as a preview for attachment
.
#define TALKATU_TYPE_ATTACHMENT (talkatu_attachment_get_type())
The standard _get_type macro for TalkatuAttachment.
struct TalkatuAttachmentInterface { guint64 *(*get_hash_key)(TalkatuAttachment *attachment); };
TalkatuAttachmentInterface defines the methods and behaviors that make up a TalkatuAttachment. This was made an interface so clients can represent their data however they want but still provide a common interface for Talkatu to work with.
“content-type”
property“content-type” char *
The content type of the attachment.
Owner: TalkatuAttachment
Flags: Read / Write / Construct Only
Default value: "application/octet-stream"
“id”
property“id” guint64
The identifier of the attachment.
Owner: TalkatuAttachment
Flags: Read / Write / Construct
Default value: 0
“local-uri”
property“local-uri” char *
The local URI of the attachment.
Owner: TalkatuAttachment
Flags: Read / Write / Construct
Default value: NULL
“remote-uri”
property“remote-uri” char *
The remote URI of the attachment.
Owner: TalkatuAttachment
Flags: Read / Write / Construct
Default value: NULL
“size”
property“size” guint64
The file size of the attachment in bytes.
Owner: TalkatuAttachment
Flags: Read / Write / Construct
Default value: 0