diff --git a/docs/html/functions.html b/docs/html/functions.html index b0409f76..2b164596 100644 --- a/docs/html/functions.html +++ b/docs/html/functions.html @@ -429,6 +429,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • mrmsg_get_file() : mrmsg_t
  • +
  • mrmsg_get_filemime() +: mrmsg_t +
  • mrmsg_get_filename() : mrmsg_t
  • @@ -453,6 +456,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • mrmsg_get_type() : mrmsg_t
  • +
  • mrmsg_is_forwarded() +: mrmsg_t +
  • mrmsg_is_increation() : mrmsg_t
  • diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html index 51201162..f88f5d8d 100644 --- a/docs/html/functions_func.html +++ b/docs/html/functions_func.html @@ -343,6 +343,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • mrmsg_get_file() : mrmsg_t
  • +
  • mrmsg_get_filemime() +: mrmsg_t +
  • mrmsg_get_filename() : mrmsg_t
  • @@ -367,6 +370,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • mrmsg_get_type() : mrmsg_t
  • +
  • mrmsg_is_forwarded() +: mrmsg_t +
  • mrmsg_is_increation() : mrmsg_t
  • diff --git a/docs/html/mrmsg_8h_source.html b/docs/html/mrmsg_8h_source.html index c746c778..d5c78141 100644 --- a/docs/html/mrmsg_8h_source.html +++ b/docs/html/mrmsg_8h_source.html @@ -89,38 +89,40 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    mrmsg.h
    -
    1 /*******************************************************************************
    2  *
    3  * Delta Chat Core
    4  * Copyright (C) 2017 Björn Petersen
    5  * Contact: r10s@b44t.com, http://b44t.com
    6  *
    7  * This program is free software: you can redistribute it and/or modify it under
    8  * the terms of the GNU General Public License as published by the Free Software
    9  * Foundation, either version 3 of the License, or (at your option) any later
    10  * version.
    11  *
    12  * This program is distributed in the hope that it will be useful, but WITHOUT
    13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    14  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    15  * details.
    16  *
    17  * You should have received a copy of the GNU General Public License along with
    18  * this program. If not, see http://www.gnu.org/licenses/ .
    19  *
    20  ******************************************************************************/
    21 
    22 
    23 #ifndef __MRMSG_H__
    24 #define __MRMSG_H__
    25 #ifdef __cplusplus
    26 extern "C" {
    27 #endif
    28 
    29 
    30 typedef struct mrmailbox_t mrmailbox_t;
    31 typedef struct mrparam_t mrparam_t;
    32 typedef struct sqlite3_stmt sqlite3_stmt;
    33 
    34 
    40 typedef struct mrmsg_t
    41 {
    52  uint32_t m_id;
    53  #define MR_MSG_ID_MARKER1 1
    54  #define MR_MSG_ID_DAYMARKER 9
    55  #define MR_MSG_ID_LAST_SPECIAL 9
    56 
    57 
    62  uint32_t m_from_id;
    63 
    64 
    69  uint32_t m_to_id;
    70 
    71 
    76  uint32_t m_chat_id;
    77 
    78 
    82  time_t m_timestamp;
    83 
    84 
    88  int m_type;
    89  #define MR_MSG_UNDEFINED 0
    90  #define MR_MSG_TEXT 10
    91  #define MR_MSG_IMAGE 20 /* m_param may contain MRP_FILE, MRP_WIDTH, MRP_HEIGHT */
    92  #define MR_MSG_GIF 21 /* - " - */
    93  #define MR_MSG_AUDIO 40 /* m_param may contain MRP_FILE, MRP_DURATION */
    94  #define MR_MSG_VOICE 41 /* - " - */
    95  #define MR_MSG_VIDEO 50 /* m_param may contain MRP_FILE, MRP_WIDTH, MRP_HEIGHT, MRP_DURATION */
    96  #define MR_MSG_FILE 60 /* m_param may contain MRP_FILE */
    97 
    98 
    102  int m_state;
    103  #define MR_STATE_UNDEFINED 0
    104  #define MR_STATE_IN_FRESH 10
    105  #define MR_STATE_IN_NOTICED 13
    106  #define MR_STATE_IN_SEEN 16
    107  #define MR_STATE_OUT_PENDING 20
    108  #define MR_STATE_OUT_ERROR 24
    109  #define MR_STATE_OUT_DELIVERED 26
    110  #define MR_STATE_OUT_MDN_RCVD 28
    111 
    116  char* m_text;
    117 
    119  int m_starred;
    124  mrmailbox_t* m_mailbox;
    125  char* m_rfc724_mid;
    126  char* m_server_folder;
    127  uint32_t m_server_uid;
    128 } mrmsg_t;
    129 
    130 
    131 mrmsg_t* mrmsg_new ();
    132 void mrmsg_unref (mrmsg_t*);
    133 void mrmsg_empty (mrmsg_t*);
    134 
    135 void mrmsg_set_type (mrmsg_t*, int type);
    136 void mrmsg_set_text (mrmsg_t*, const char* text);
    137 void mrmsg_set_file (mrmsg_t*, const char* file);
    138 
    139 int mrmsg_get_type (mrmsg_t*);
    140 int mrmsg_get_state (mrmsg_t*);
    141 char* mrmsg_get_text (mrmsg_t*);
    142 char* mrmsg_get_file (mrmsg_t*);
    143 char* mrmsg_get_filename (mrmsg_t*);
    147 char* mrmsg_get_summarytext (mrmsg_t*, int approx_characters);
    150 
    152 
    153 
    154 /* library-private */
    155 #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 "
    156 int mrmsg_set_from_stmt__ (mrmsg_t*, sqlite3_stmt* row, int row_offset); /* row order is MR_MSG_FIELDS */
    157 int mrmsg_load_from_db__ (mrmsg_t*, mrmailbox_t*, uint32_t id);
    158 int mrmsg_is_increation__ (const mrmsg_t*);
    159 char* mrmsg_get_summarytext_by_raw (int type, const char* text, mrparam_t*, int approx_bytes); /* the returned value must be free()'d */
    160 void mrmsg_save_param_to_disk__ (mrmsg_t*);
    161 void mrmsg_guess_msgtype_from_suffix (const char* pathNfilename, int* ret_msgtype, char** ret_mime);
    162 void mrmsg_get_authorNtitle_from_filename (const char* pathNfilename, char** ret_author, char** ret_title);
    163 
    164 #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)
    165 #define MR_MSG_MAKE_FILENAME_SEARCHABLE(a) ((a)==MR_MSG_AUDIO || (a)==MR_MSG_FILE || (a)==MR_MSG_VIDEO ) /* add filename.ext (without path) to m_text? this is needed for the fulltext search. The extension is useful to get all PDF, all MP3 etc. */
    166 #define MR_MSG_MAKE_SUFFIX_SEARCHABLE(a) ((a)==MR_MSG_IMAGE || (a)==MR_MSG_GIF || (a)==MR_MSG_VOICE)
    167 
    168 #define APPROX_SUBJECT_CHARS 32 /* as we do not cut inside words, this results in about 32-42 characters.
    169  Do not use too long subjects - we add a tag after the subject which gets truncated by the clients otherwise.
    170  It should also be very clear, the subject is _not_ the whole message.
    171  The value is also used for CC:-summaries */
    172 
    173 
    174 #ifdef __cplusplus
    175 } /* /extern "C" */
    176 #endif
    177 #endif /* __MRMSG_H__ */
    int m_is_msgrmsg
    Set to 1 if the message was sent by another messenger.
    Definition: mrmsg.h:120
    +
    1 /*******************************************************************************
    2  *
    3  * Delta Chat Core
    4  * Copyright (C) 2017 Björn Petersen
    5  * Contact: r10s@b44t.com, http://b44t.com
    6  *
    7  * This program is free software: you can redistribute it and/or modify it under
    8  * the terms of the GNU General Public License as published by the Free Software
    9  * Foundation, either version 3 of the License, or (at your option) any later
    10  * version.
    11  *
    12  * This program is distributed in the hope that it will be useful, but WITHOUT
    13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    14  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    15  * details.
    16  *
    17  * You should have received a copy of the GNU General Public License along with
    18  * this program. If not, see http://www.gnu.org/licenses/ .
    19  *
    20  ******************************************************************************/
    21 
    22 
    23 #ifndef __MRMSG_H__
    24 #define __MRMSG_H__
    25 #ifdef __cplusplus
    26 extern "C" {
    27 #endif
    28 
    29 
    30 typedef struct mrmailbox_t mrmailbox_t;
    31 typedef struct mrparam_t mrparam_t;
    32 typedef struct sqlite3_stmt sqlite3_stmt;
    33 
    34 
    40 typedef struct mrmsg_t
    41 {
    52  uint32_t m_id;
    53  #define MR_MSG_ID_MARKER1 1
    54  #define MR_MSG_ID_DAYMARKER 9
    55  #define MR_MSG_ID_LAST_SPECIAL 9
    56 
    57 
    62  uint32_t m_from_id;
    63 
    64 
    69  uint32_t m_to_id;
    70 
    71 
    76  uint32_t m_chat_id;
    77 
    78 
    82  time_t m_timestamp;
    83 
    84 
    88  int m_type;
    89  #define MR_MSG_UNDEFINED 0
    90  #define MR_MSG_TEXT 10
    91  #define MR_MSG_IMAGE 20 /* m_param may contain MRP_FILE, MRP_WIDTH, MRP_HEIGHT */
    92  #define MR_MSG_GIF 21 /* - " - */
    93  #define MR_MSG_AUDIO 40 /* m_param may contain MRP_FILE, MRP_DURATION */
    94  #define MR_MSG_VOICE 41 /* - " - */
    95  #define MR_MSG_VIDEO 50 /* m_param may contain MRP_FILE, MRP_WIDTH, MRP_HEIGHT, MRP_DURATION */
    96  #define MR_MSG_FILE 60 /* m_param may contain MRP_FILE */
    97 
    98 
    102  int m_state;
    103  #define MR_STATE_UNDEFINED 0
    104  #define MR_STATE_IN_FRESH 10
    105  #define MR_STATE_IN_NOTICED 13
    106  #define MR_STATE_IN_SEEN 16
    107  #define MR_STATE_OUT_PENDING 20
    108  #define MR_STATE_OUT_ERROR 24
    109  #define MR_STATE_OUT_DELIVERED 26
    110  #define MR_STATE_OUT_MDN_RCVD 28
    111 
    116  char* m_text;
    117 
    119  int m_starred;
    124  mrmailbox_t* m_mailbox;
    125  char* m_rfc724_mid;
    126  char* m_server_folder;
    127  uint32_t m_server_uid;
    128 } mrmsg_t;
    129 
    130 
    131 mrmsg_t* mrmsg_new ();
    132 void mrmsg_unref (mrmsg_t*);
    133 void mrmsg_empty (mrmsg_t*);
    134 
    135 void mrmsg_set_type (mrmsg_t*, int type);
    136 void mrmsg_set_text (mrmsg_t*, const char* text);
    137 void mrmsg_set_file (mrmsg_t*, const char* file);
    138 
    139 int mrmsg_get_type (mrmsg_t*);
    140 int mrmsg_get_state (mrmsg_t*);
    141 char* mrmsg_get_text (mrmsg_t*);
    142 char* mrmsg_get_file (mrmsg_t*);
    143 char* mrmsg_get_filename (mrmsg_t*);
    144 char* mrmsg_get_filemime (mrmsg_t*);
    148 char* mrmsg_get_summarytext (mrmsg_t*, int approx_characters);
    152 
    154 
    155 
    156 /* library-private */
    157 #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 "
    158 int mrmsg_set_from_stmt__ (mrmsg_t*, sqlite3_stmt* row, int row_offset); /* row order is MR_MSG_FIELDS */
    159 int mrmsg_load_from_db__ (mrmsg_t*, mrmailbox_t*, uint32_t id);
    160 int mrmsg_is_increation__ (const mrmsg_t*);
    161 char* mrmsg_get_summarytext_by_raw (int type, const char* text, mrparam_t*, int approx_bytes); /* the returned value must be free()'d */
    162 void mrmsg_save_param_to_disk__ (mrmsg_t*);
    163 void mrmsg_guess_msgtype_from_suffix (const char* pathNfilename, int* ret_msgtype, char** ret_mime);
    164 void mrmsg_get_authorNtitle_from_filename (const char* pathNfilename, char** ret_author, char** ret_title);
    165 
    166 #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)
    167 #define MR_MSG_MAKE_FILENAME_SEARCHABLE(a) ((a)==MR_MSG_AUDIO || (a)==MR_MSG_FILE || (a)==MR_MSG_VIDEO ) /* add filename.ext (without path) to m_text? this is needed for the fulltext search. The extension is useful to get all PDF, all MP3 etc. */
    168 #define MR_MSG_MAKE_SUFFIX_SEARCHABLE(a) ((a)==MR_MSG_IMAGE || (a)==MR_MSG_GIF || (a)==MR_MSG_VOICE)
    169 
    170 #define APPROX_SUBJECT_CHARS 32 /* as we do not cut inside words, this results in about 32-42 characters.
    171  Do not use too long subjects - we add a tag after the subject which gets truncated by the clients otherwise.
    172  It should also be very clear, the subject is _not_ the whole message.
    173  The value is also used for CC:-summaries */
    174 
    175 
    176 #ifdef __cplusplus
    177 } /* /extern "C" */
    178 #endif
    179 #endif /* __MRMSG_H__ */
    int m_is_msgrmsg
    Set to 1 if the message was sent by another messenger.
    Definition: mrmsg.h:120
    An object representing a single mailbox.
    Definition: mrmailbox.h:184
    -
    int mrmsg_is_systemcmd(mrmsg_t *msg)
    Check if the message is a system command.
    Definition: mrmsg.c:489
    +
    int mrmsg_is_systemcmd(mrmsg_t *msg)
    Check if the message is a system command.
    Definition: mrmsg.c:561
    int mrmsg_get_type(mrmsg_t *msg)
    Get the type of the message.
    Definition: mrmsg.c:202
    int m_type
    Message type.
    Definition: mrmsg.h:88
    -
    char * mrmsg_get_summarytext(mrmsg_t *msg, int approx_characters)
    Get a message summary as a single line of text.
    Definition: mrmsg.c:461
    +
    char * mrmsg_get_summarytext(mrmsg_t *msg, int approx_characters)
    Get a message summary as a single line of text.
    Definition: mrmsg.c:506
    uint32_t m_chat_id
    Chat ID the message belongs to.
    Definition: mrmsg.h:76
    int mrmsg_get_state(mrmsg_t *msg)
    Get the state of a message.
    Definition: mrmsg.c:238
    mrmsg_t * mrmsg_new()
    Create new message object.
    Definition: mrmsg.c:41
    An object representing text with some attributes.
    Definition: mrpoortext.h:35
    -
    mrpoortext_t * mrmsg_get_summary(mrmsg_t *msg, mrchat_t *chat)
    Get a summary for a message.
    Definition: mrmsg.c:419
    +
    mrpoortext_t * mrmsg_get_summary(mrmsg_t *msg, mrchat_t *chat)
    Get a summary for a message.
    Definition: mrmsg.c:464
    void mrmsg_set_file(mrmsg_t *msg, const char *file)
    Set the file belonging to a message.
    Definition: mrmsg.c:177
    -
    mrpoortext_t * mrmsg_get_mediainfo(mrmsg_t *msg)
    Get real author and title.
    Definition: mrmsg.c:337
    +
    mrpoortext_t * mrmsg_get_mediainfo(mrmsg_t *msg)
    Get real author and title.
    Definition: mrmsg.c:382
    An object representing a single message in memory.
    Definition: mrmsg.h:40
    uint32_t m_to_id
    Contact ID of the recipient.
    Definition: mrmsg.h:69
    uint32_t m_from_id
    Contact ID of the sender.
    Definition: mrmsg.h:62
    -
    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:274
    +
    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:279
    int m_starred
    Starred-state of the message.
    Definition: mrmsg.h:119
    void mrmsg_set_text(mrmsg_t *msg, const char *text)
    Set the text of a message object.
    Definition: mrmsg.c:153
    An object for handling key=value parameter lists.
    Definition: mrparam.h:44
    -
    int mrmsg_is_increation(mrmsg_t *msg)
    Check if a message is still in creation.
    Definition: mrmsg.c:729
    +
    int mrmsg_is_increation(mrmsg_t *msg)
    Check if a message is still in creation.
    Definition: mrmsg.c:801
    mrparam_t * m_param
    Additional paramter for the message.
    Definition: mrmsg.h:118
    char * m_text
    Message text.
    Definition: mrmsg.h:116
    void mrmsg_unref(mrmsg_t *msg)
    Free an mrmsg_t object created eg.
    Definition: mrmsg.c:68
    void mrmsg_set_type(mrmsg_t *msg, int type)
    Set the type of a message.
    Definition: mrmsg.c:126
    uint32_t m_id
    Message ID.
    Definition: mrmsg.h:52
    int m_state
    Message state.
    Definition: mrmsg.h:102
    -
    int mrmsg_get_showpadlock(mrmsg_t *msg)
    Check if a padlock should be shown beside the message.
    Definition: mrmsg.c:391
    -
    void mrmsg_save_param_to_disk(mrmsg_t *msg)
    Add additional, persistent information to a message record.
    Definition: mrmsg.c:772
    -
    char * mrmsg_get_filename(mrmsg_t *msg)
    Get base file name without path.
    Definition: mrmsg.c:301
    +
    char * mrmsg_get_filemime(mrmsg_t *msg)
    Get mime type of the file.
    Definition: mrmsg.c:338
    +
    int mrmsg_get_showpadlock(mrmsg_t *msg)
    Check if a padlock should be shown beside the message.
    Definition: mrmsg.c:436
    +
    void mrmsg_save_param_to_disk(mrmsg_t *msg)
    Add additional, persistent information to a message record.
    Definition: mrmsg.c:844
    +
    char * mrmsg_get_filename(mrmsg_t *msg)
    Get base file name without path.
    Definition: mrmsg.c:306
    void mrmsg_empty(mrmsg_t *msg)
    Empty a message object.
    Definition: mrmsg.c:89
    -
    char * mrmsg_get_text(mrmsg_t *msg)
    Get the text of the message.
    Definition: mrmsg.c:256
    +
    char * mrmsg_get_text(mrmsg_t *msg)
    Get the text of the message.
    Definition: mrmsg.c:258
    +
    int mrmsg_is_forwarded(mrmsg_t *msg)
    Check if the message is a forwarded message.
    Definition: mrmsg.c:534
    time_t m_timestamp
    Unix time the message was sended or received.
    Definition: mrmsg.h:82
    An object representing a single chat in memory.
    Definition: mrchat.h:39
    diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js index e2d9eebd..37f8243c 100644 --- a/docs/html/search/all_1.js +++ b/docs/html/search/all_1.js @@ -132,6 +132,7 @@ var searchData= ['mrmailboxcb_5ft',['mrmailboxcb_t',['../structmrmailbox__t.html#a957f0bbae60f389bac40acf42b68b134',1,'mrmailbox_t']]], ['mrmsg_5fempty',['mrmsg_empty',['../structmrmsg__t.html#a57d94b55fc918b27874b9194d6c35388',1,'mrmsg_t']]], ['mrmsg_5fget_5ffile',['mrmsg_get_file',['../structmrmsg__t.html#a2544769c77af5447546fcf5fc95c64f7',1,'mrmsg_t']]], + ['mrmsg_5fget_5ffilemime',['mrmsg_get_filemime',['../structmrmsg__t.html#a4afcbb38dd1f37fb5f7b2c6d1f4e9042',1,'mrmsg_t']]], ['mrmsg_5fget_5ffilename',['mrmsg_get_filename',['../structmrmsg__t.html#ad0dcfc0a1e33d9a88b7381e368d7895a',1,'mrmsg_t']]], ['mrmsg_5fget_5fmediainfo',['mrmsg_get_mediainfo',['../structmrmsg__t.html#ad87b7df007489b3a47c3fde79978a58a',1,'mrmsg_t']]], ['mrmsg_5fget_5fshowpadlock',['mrmsg_get_showpadlock',['../structmrmsg__t.html#a7f1bd3d845bbc5face7636aed8f8afd4',1,'mrmsg_t']]], @@ -140,6 +141,7 @@ var searchData= ['mrmsg_5fget_5fsummarytext',['mrmsg_get_summarytext',['../structmrmsg__t.html#a8c8c1f342f01439ae40c5cf37532387e',1,'mrmsg_t']]], ['mrmsg_5fget_5ftext',['mrmsg_get_text',['../structmrmsg__t.html#ae549e58d9ae2f73ad76bd27636b43982',1,'mrmsg_t']]], ['mrmsg_5fget_5ftype',['mrmsg_get_type',['../structmrmsg__t.html#a705454903b36ded8c3cd43a2044de60a',1,'mrmsg_t']]], + ['mrmsg_5fis_5fforwarded',['mrmsg_is_forwarded',['../structmrmsg__t.html#a3256ed8c6a55a6c1a30e0fce33b85421',1,'mrmsg_t']]], ['mrmsg_5fis_5fincreation',['mrmsg_is_increation',['../structmrmsg__t.html#a32d23bac4bf35ed5f8c2cfbb93d636f5',1,'mrmsg_t']]], ['mrmsg_5fis_5fsystemcmd',['mrmsg_is_systemcmd',['../structmrmsg__t.html#a752209192e3a022d087fe6c647fb3ad9',1,'mrmsg_t']]], ['mrmsg_5fnew',['mrmsg_new',['../structmrmsg__t.html#a80f470eb34af414ff28e7d3b3c715b48',1,'mrmsg_t']]], diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js index 3def00f0..37ae8a32 100644 --- a/docs/html/search/functions_0.js +++ b/docs/html/search/functions_0.js @@ -82,6 +82,7 @@ var searchData= ['mrmailbox_5funref',['mrmailbox_unref',['../structmrmailbox__t.html#a825cec4a85da05335674eae221d51374',1,'mrmailbox_t']]], ['mrmsg_5fempty',['mrmsg_empty',['../structmrmsg__t.html#a57d94b55fc918b27874b9194d6c35388',1,'mrmsg_t']]], ['mrmsg_5fget_5ffile',['mrmsg_get_file',['../structmrmsg__t.html#a2544769c77af5447546fcf5fc95c64f7',1,'mrmsg_t']]], + ['mrmsg_5fget_5ffilemime',['mrmsg_get_filemime',['../structmrmsg__t.html#a4afcbb38dd1f37fb5f7b2c6d1f4e9042',1,'mrmsg_t']]], ['mrmsg_5fget_5ffilename',['mrmsg_get_filename',['../structmrmsg__t.html#ad0dcfc0a1e33d9a88b7381e368d7895a',1,'mrmsg_t']]], ['mrmsg_5fget_5fmediainfo',['mrmsg_get_mediainfo',['../structmrmsg__t.html#ad87b7df007489b3a47c3fde79978a58a',1,'mrmsg_t']]], ['mrmsg_5fget_5fshowpadlock',['mrmsg_get_showpadlock',['../structmrmsg__t.html#a7f1bd3d845bbc5face7636aed8f8afd4',1,'mrmsg_t']]], @@ -90,6 +91,7 @@ var searchData= ['mrmsg_5fget_5fsummarytext',['mrmsg_get_summarytext',['../structmrmsg__t.html#a8c8c1f342f01439ae40c5cf37532387e',1,'mrmsg_t']]], ['mrmsg_5fget_5ftext',['mrmsg_get_text',['../structmrmsg__t.html#ae549e58d9ae2f73ad76bd27636b43982',1,'mrmsg_t']]], ['mrmsg_5fget_5ftype',['mrmsg_get_type',['../structmrmsg__t.html#a705454903b36ded8c3cd43a2044de60a',1,'mrmsg_t']]], + ['mrmsg_5fis_5fforwarded',['mrmsg_is_forwarded',['../structmrmsg__t.html#a3256ed8c6a55a6c1a30e0fce33b85421',1,'mrmsg_t']]], ['mrmsg_5fis_5fincreation',['mrmsg_is_increation',['../structmrmsg__t.html#a32d23bac4bf35ed5f8c2cfbb93d636f5',1,'mrmsg_t']]], ['mrmsg_5fis_5fsystemcmd',['mrmsg_is_systemcmd',['../structmrmsg__t.html#a752209192e3a022d087fe6c647fb3ad9',1,'mrmsg_t']]], ['mrmsg_5fnew',['mrmsg_new',['../structmrmsg__t.html#a80f470eb34af414ff28e7d3b3c715b48',1,'mrmsg_t']]], diff --git a/docs/html/structmrmsg__t-members.html b/docs/html/structmrmsg__t-members.html index afa83d9e..8fc33ba5 100644 --- a/docs/html/structmrmsg__t-members.html +++ b/docs/html/structmrmsg__t-members.html @@ -101,14 +101,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); m_typemrmsg_t mrmsg_empty(mrmsg_t *msg)mrmsg_t mrmsg_get_file(mrmsg_t *msg)mrmsg_t - mrmsg_get_filename(mrmsg_t *msg)mrmsg_t - mrmsg_get_mediainfo(mrmsg_t *msg)mrmsg_t - mrmsg_get_showpadlock(mrmsg_t *msg)mrmsg_t - mrmsg_get_state(mrmsg_t *msg)mrmsg_t - mrmsg_get_summary(mrmsg_t *msg, mrchat_t *chat)mrmsg_t - mrmsg_get_summarytext(mrmsg_t *msg, int approx_characters)mrmsg_t - mrmsg_get_text(mrmsg_t *msg)mrmsg_t - mrmsg_get_type(mrmsg_t *msg)mrmsg_t + mrmsg_get_filemime(mrmsg_t *msg)mrmsg_t + mrmsg_get_filename(mrmsg_t *msg)mrmsg_t + mrmsg_get_mediainfo(mrmsg_t *msg)mrmsg_t + mrmsg_get_showpadlock(mrmsg_t *msg)mrmsg_t + mrmsg_get_state(mrmsg_t *msg)mrmsg_t + mrmsg_get_summary(mrmsg_t *msg, mrchat_t *chat)mrmsg_t + mrmsg_get_summarytext(mrmsg_t *msg, int approx_characters)mrmsg_t + mrmsg_get_text(mrmsg_t *msg)mrmsg_t + mrmsg_get_type(mrmsg_t *msg)mrmsg_t + mrmsg_is_forwarded(mrmsg_t *msg)mrmsg_t mrmsg_is_increation(mrmsg_t *msg)mrmsg_t mrmsg_is_systemcmd(mrmsg_t *msg)mrmsg_t mrmsg_new()mrmsg_t diff --git a/docs/html/structmrmsg__t.html b/docs/html/structmrmsg__t.html index 6cc71cbf..d759bae3 100644 --- a/docs/html/structmrmsg__t.html +++ b/docs/html/structmrmsg__t.html @@ -130,6 +130,9 @@ Public Member Functions char * mrmsg_get_filename (mrmsg_t *msg)  Get base file name without path. More...
      +char * mrmsg_get_filemime (mrmsg_t *msg) + Get mime type of the file. More...
    mrpoortext_tmrmsg_get_mediainfo (mrmsg_t *msg)  Get real author and title. More...
      @@ -142,6 +145,9 @@ Public Member Functions char * mrmsg_get_summarytext (mrmsg_t *msg, int approx_characters)  Get a message summary as a single line of text. More...
      +int mrmsg_is_forwarded (mrmsg_t *msg) + Check if the message is a forwarded message. More...
    +  int mrmsg_is_systemcmd (mrmsg_t *msg)  Check if the message is a system command. More...
      @@ -450,13 +456,14 @@ Public Attributes

    Get the text of the message.

    +

    If there is no text associalted with the message, an empty string is returned. NULL is never returned.

    Parameters
    msgThe message object.
    -
    Returns
    Message text. The result must be free()'d.
    +
    Returns
    Message text. The result must be free()'d. Never returns NULL.
    @@ -475,6 +482,7 @@ Public Attributes

    Find out full path, file name and extension of the file associated with a message.

    +

    Typically files are associated with images, videos, audios, documents. Plain text messages do not have a file.

    Parameters
    @@ -503,12 +511,38 @@ Public Attributes

    The base file name includes the extension; the path is not returned. To get the full path, use mrmsg_get_file().

    Parameters
    msgThe message object.
    - +
    msgthe message object
    msgThe message object.
    Returns
    base file name plus extension without part. If there is no file associated with the message, an empty string is returned. The returned value must be free()'d.
    +
    + + +
    +
    + + + + + + + + +
    char * mrmsg_get_filemime (mrmsg_tmsg)
    +
    + +

    Get mime type of the file.

    +

    If there is not file, an empty string is returned. If there is no associated mime type with the file, the function guesses on; if in doubt, application/octet-stream is returned. NULL is never returned.

    +
    Parameters
    + + +
    msgThe message object.
    +
    +
    +
    Returns
    String containing the mime type. Must be free()'d after usage. NULL is never returned.
    +
    @@ -532,7 +566,7 @@ Public Attributes
    Parameters
    - +
    msgthe message object
    msgThe message object.
    @@ -637,6 +671,34 @@ Public Attributes
    Returns
    A summary for the given messages. The returned string must be free()'d.
    + + + +
    +
    + + + + + + + + +
    int mrmsg_is_forwarded (mrmsg_tmsg)
    +
    + +

    Check if the message is a forwarded message.

    +

    Forwarded messages may not be created by the contact given as "from".

    +

    Typically, the UI shows a little text for a symbol above forwarded messages.

    +

    For privacy reasons, we do not provide the name or the email address of the original author (in a typical GUI, you select the messages text and click on "forwared"; you won't expect other data to be send to the new recipient, esp. as the new recipient may not be in any relationship to the original author)

    +
    Parameters
    + + +
    msgThe message object.
    +
    +
    +
    Returns
    1=message is a forwarded message, 0=message not forwarded.
    +