31 typedef struct mrparam_t mrparam_t;
32 typedef struct sqlite3_stmt sqlite3_stmt;
48 #define MR_MSG_ID_MARKER1 1 49 #define MR_MSG_ID_DAYMARKER 9 50 #define MR_MSG_ID_LAST_SPECIAL 9 83 #define MR_MSG_UNDEFINED 0 84 #define MR_MSG_TEXT 10 85 #define MR_MSG_IMAGE 20 87 #define MR_MSG_AUDIO 40 88 #define MR_MSG_VOICE 41 89 #define MR_MSG_VIDEO 50 90 #define MR_MSG_FILE 60 93 #define MR_STATE_UNDEFINED 0 94 #define MR_STATE_IN_FRESH 10 95 #define MR_STATE_IN_NOTICED 13 96 #define MR_STATE_IN_SEEN 16 97 #define MR_STATE_OUT_PENDING 20 98 #define MR_STATE_OUT_ERROR 24 99 #define MR_STATE_OUT_DELIVERED 26 100 #define MR_STATE_OUT_MDN_RCVD 28 107 char* m_server_folder;
108 uint32_t m_server_uid;
147 #define MR_MSG_FIELDS " m.id,rfc724_mid,m.server_folder,m.server_uid,m.chat_id, m.from_id,m.to_id,m.timestamp, m.type,m.state,m.msgrmsg,m.txt, m.param,m.starred " 148 int mrmsg_set_from_stmt__ (
mrmsg_t*, sqlite3_stmt* row,
int row_offset);
150 int mrmsg_is_increation__ (
const mrmsg_t*);
151 char* mrmsg_get_summarytext_by_raw (
int type,
const char* text, mrparam_t*,
int approx_bytes);
152 void mrmsg_save_param_to_disk__ (
mrmsg_t*);
153 void mrmsg_guess_msgtype_from_suffix (
const char* pathNfilename,
int* ret_msgtype,
char** ret_mime);
154 void mrmsg_get_authorNtitle_from_filename (
const char* pathNfilename,
char** ret_author,
char** ret_title);
156 #define MR_MSG_NEEDS_ATTACHMENT(a) ((a)==MR_MSG_IMAGE || (a)==MR_MSG_GIF || (a)==MR_MSG_AUDIO || (a)==MR_MSG_VOICE || (a)==MR_MSG_VIDEO || (a)==MR_MSG_FILE) 157 #define MR_MSG_MAKE_FILENAME_SEARCHABLE(a) ((a)==MR_MSG_AUDIO || (a)==MR_MSG_FILE || (a)==MR_MSG_VIDEO ) 158 #define MR_MSG_MAKE_SUFFIX_SEARCHABLE(a) ((a)==MR_MSG_IMAGE || (a)==MR_MSG_GIF || (a)==MR_MSG_VOICE) 160 #define APPROX_SUBJECT_CHARS 32 char * mrmsg_get_setupcodebegin(mrmsg_t *msg)
Get the first characters of the setup code.
Definition: mrmsg.c:736
An object representing a single mailbox.
Definition: mrmailbox.h:194
int mrmsg_is_systemcmd(mrmsg_t *msg)
Check if the message is a system command.
Definition: mrmsg.c:684
int mrmsg_get_type(mrmsg_t *msg)
Get the type of the message.
Definition: mrmsg.c:127
char * mrmsg_get_summarytext(mrmsg_t *msg, int approx_characters)
Get a message summary as a single line of text.
Definition: mrmsg.c:584
uint64_t mrmsg_get_filebytes(mrmsg_t *msg)
Get the size of the file.
Definition: mrmsg.c:328
uint32_t m_chat_id
Chat ID the message belongs to.
Definition: mrmsg.h:71
int mrmsg_is_setupmessage(mrmsg_t *msg)
Check if the message is an Autocrypt Setup Message.
Definition: mrmsg.c:710
int mrmsg_get_state(mrmsg_t *msg)
Get the state of a message.
Definition: mrmsg.c:165
mrlot_t * mrmsg_get_mediainfo(mrmsg_t *msg)
Get real author and title.
Definition: mrmsg.c:370
An object representing a single message in memory.
Definition: mrmsg.h:40
void mrmsg_latefiling_mediasize(mrmsg_t *msg, int width, int height, int duration)
Late filing information to a message.
Definition: mrmsg.c:1036
int mrmsg_is_sent(mrmsg_t *msg)
Check if a message was sent successfully.
Definition: mrmsg.c:606
mrlot_t * mrmsg_get_summary(mrmsg_t *msg, mrchat_t *chat)
Get a summary for a message.
Definition: mrmsg.c:542
uint32_t m_to_id
Contact ID of the recipient.
Definition: mrmsg.h:64
An object containing a set of values.
Definition: mrlot.h:36
uint32_t m_from_id
Contact ID of the sender.
Definition: mrmsg.h:57
int mrmsg_get_duration(mrmsg_t *msg)
Get duration of audio or video.
Definition: mrmsg.c:478
int mrmsg_is_starred(mrmsg_t *msg)
Check if a message is starred.
Definition: mrmsg.c:629
char * mrmsg_get_file(mrmsg_t *msg)
Find out full path, file name and extension of the file associated with a message.
Definition: mrmsg.c:228
int mrmsg_is_increation(mrmsg_t *msg)
Check if a message is still in creation.
Definition: mrmsg.c:978
void mrmsg_unref(mrmsg_t *msg)
Free a message object.
Definition: mrmsg.c:69
uint32_t m_id
Message ID.
Definition: mrmsg.h:47
char * mrmsg_get_filemime(mrmsg_t *msg)
Get mime type of the file.
Definition: mrmsg.c:287
int mrmsg_get_width(mrmsg_t *msg)
Get width of image or video.
Definition: mrmsg.c:431
time_t mrmsg_get_timestamp(mrmsg_t *msg)
Get message time.
Definition: mrmsg.c:183
int mrmsg_get_showpadlock(mrmsg_t *msg)
Check if a padlock should be shown beside the message.
Definition: mrmsg.c:496
char * mrmsg_get_filename(mrmsg_t *msg)
Get base file name without path.
Definition: mrmsg.c:255
char * mrmsg_get_text(mrmsg_t *msg)
Get the text of the message.
Definition: mrmsg.c:203
int mrmsg_is_forwarded(mrmsg_t *msg)
Check if the message is a forwarded message.
Definition: mrmsg.c:657
int mrmsg_get_height(mrmsg_t *msg)
Get height of image or video.
Definition: mrmsg.c:456
An object representing a single chat in memory.
Definition: mrchat.h:39