diff --git a/docs/html/classmrchat__t.html b/docs/html/classmrchat__t.html index 10ca580b..893918e7 100644 --- a/docs/html/classmrchat__t.html +++ b/docs/html/classmrchat__t.html @@ -208,7 +208,7 @@ Public Member Functions

Get chat type.

Currently, there are two chat types:

Parameters
diff --git a/docs/html/classmrmailbox__t.html b/docs/html/classmrmailbox__t.html index 62408ba9..ee19f1f7 100644 --- a/docs/html/classmrmailbox__t.html +++ b/docs/html/classmrmailbox__t.html @@ -158,7 +158,7 @@ Public Member Functions  Get chat object by a chat ID. More...
  void mrmailbox_marknoticed_chat (mrmailbox_t *mailbox, uint32_t chat_id) - Mark all message in a chat as noticed. More...
+ Mark all messages in a chat as noticed. More...
  uint32_t mrmailbox_get_chat_id_by_contact_id (mrmailbox_t *mailbox, uint32_t contact_id)  Check, if there is a normal chat with a given contact. More...
@@ -206,7 +206,7 @@ Public Member Functions  Send an image to a chat. More...
  uint32_t mrmailbox_send_video_msg (mrmailbox_t *mailbox, uint32_t chat_id, const char *file, const char *filemime, int width, int height, int duration) - Send an video to a chat. More...
+ Send a video to a chat. More...
  uint32_t mrmailbox_send_voice_msg (mrmailbox_t *mailbox, uint32_t chat_id, const char *file, const char *filemime, int duration)  Send a voice message to a chat. More...
@@ -257,7 +257,7 @@ Public Member Functions  Get a single contact object. More...
  void mrmailbox_marknoticed_contact (mrmailbox_t *mailbox, uint32_t contact_id) - Mark all messages send by the given contact as noticed. More...
+ Mark all messages sent by the given contact as noticed. More...
  void mrmailbox_block_contact (mrmailbox_t *mailbox, uint32_t contact_id, int new_blocking)  Block or unblock a contact. More...
@@ -278,7 +278,7 @@ Public Member Functions  Forward messages to another chat. More...
  void mrmailbox_star_msgs (mrmailbox_t *mailbox, const uint32_t *msg_ids, int msg_cnt, int star) - Star/unstar messages by setting the last parameter to 0 (unstar) or 1(star). More...
+ Star/unstar messages by setting the last parameter to 0 (unstar) or 1 (star). More...
  void mrmailbox_delete_msgs (mrmailbox_t *mailbox, const uint32_t *msg_ids, int msg_cnt)  Delete messages. More...
@@ -955,8 +955,8 @@ Public Member Functions
-

Mark all message in a chat as noticed.

-

Noticed messages are no longer fresh and do not count as being unseen. IMAP/MDNs is not done for noticed messages. See also mrmailbox_marknoticed_contact() and mrmailbox_markseen_msgs()

+

Mark all messages in a chat as noticed.

+

Noticed messages are no longer fresh and do not count as being unseen. IMAP/MDNs is not done for noticed messages. See also mrmailbox_marknoticed_contact() and mrmailbox_markseen_msgs()

Parameters
@@ -1670,7 +1670,7 @@ Public Member Functions
mailboxThe mailbox object as returned from mrmailbox_new().
-

Send an video to a chat.

+

Send a video to a chat.

Sends the event MR_EVENT_MSGS_CHANGED on succcess. However, this does not imply, the message really reached the recipient - sending may be delayed eg. due to network problems. However, from your view, you're done with the message. Sooner or later it will find its way.

See also mrmailbox_send_image_msg().

Parameters
@@ -1907,7 +1907,6 @@ Public Member Functions

Sends the name and the email address of another contact to a chat. The contact this may or may not be a member of the chat.

Typically used to share a contact to another member or to a group of members.

Internally, the function just creates an appropriate text message and sends it using mrmailbox_send_text_msg().

-

Future implementations may also send the key of the user though gossip; currently, this is not done.

NB: The "vcard" in the function name is just an abbreviation of "visiting card" and is not related to the VCARD data format.

Parameters
@@ -1946,7 +1945,7 @@ Public Member Functions

Create a new group chat.

-

After creation, the group has one member with the ID MR_CONTACT_ID_SELF and is in unpromoted state. This means, you can add or remove members, change the name, the group image and so on without messages being send to all group members.

+

After creation, the group has one member with the ID MR_CONTACT_ID_SELF and is in unpromoted state. This means, you can add or remove members, change the name, the group image and so on without messages being sent to all group members.

This changes as soon as the first message is sent to the group members and the group becomes promoted. After that, all changes are synced with all group members by sending status message.

To check, if a chat is still unpromoted, you mrchat_is_unpromoted()

Parameters
@@ -2417,8 +2416,8 @@ Public Member Functions
-

Mark all messages send by the given contact as noticed.

-

See also mrmailbox_marknoticed_chat() and mrmailbox_markseen_msgs()

+

Mark all messages sent by the given contact as noticed.

+

See also mrmailbox_marknoticed_chat() and mrmailbox_markseen_msgs()

Parameters
@@ -2536,7 +2535,7 @@ Public Member Functions

Delete a contact.

-

The contact is deleted from the local device. It may happen that this is not possible as the contact is in used. In this case, the contact can be blocked.

+

The contact is deleted from the local device. It may happen that this is not possible as the contact is in use. In this case, the contact can be blocked.

May result in a MR_EVENT_CONTACTS_CHANGED event.

Parameters
mailboxThe mailbox object as created by mrmmailbox_new()
@@ -2709,7 +2708,7 @@ Public Member Functions
-

Star/unstar messages by setting the last parameter to 0 (unstar) or 1(star).

+

Star/unstar messages by setting the last parameter to 0 (unstar) or 1 (star).

Starred messages are collected in a virtual chat that can be shown using mrmailbox_get_chat_msgs() using the chat_id MR_CHAT_ID_STARRED.

Parameters
@@ -2799,7 +2798,7 @@ Public Member Functions

Mark a message as seen, updates the IMAP state and sends MDNs.

-

if the message is not in a real chat (eg. a contact request), the message is only marked as NOTICED and no IMAP/MDNs is done. See also mrmailbox_marknoticed_chat() and mrmailbox_marknoticed_contact()

+

if the message is not in a real chat (eg. a contact request), the message is only marked as NOTICED and no IMAP/MDNs is done. See also mrmailbox_marknoticed_chat() and mrmailbox_marknoticed_contact()

Parameters
diff --git a/docs/html/classmrmsg__t.html b/docs/html/classmrmsg__t.html index 4e96c176..a3638e40 100644 --- a/docs/html/classmrmsg__t.html +++ b/docs/html/classmrmsg__t.html @@ -327,7 +327,7 @@ Public Member Functions

Get the state of a message.

Incoming message states:

  • MR_STATE_IN_FRESH (10) - Incoming fresh message. Fresh messages are not noticed nor seen and are typically shown in notifications. Use mrmailbox_get_fresh_msgs() to get all fresh messages.
  • -
  • MR_STATE_IN_NOTICED (13) - Incoming noticed message. Eg. chat opened but message not yet read - noticed messages are not counted as unread but did not marked as read nor resulted in MDNs. Use mrmailbox_marknoticed_chat() or mrmailbox_marknoticed_contact() to mark messages as being noticed.
  • +
  • MR_STATE_IN_NOTICED (13) - Incoming noticed message. Eg. chat opened but message not yet read - noticed messages are not counted as unread but did not marked as read nor resulted in MDNs. Use mrmailbox_marknoticed_chat() or mrmailbox_marknoticed_contact() to mark messages as being noticed.
  • MR_STATE_IN_SEEN (16) - Incoming message, really seen by the user. Marked as read on IMAP and MDN may be send. Use mrmailbox_markseen_msgs() to mark messages as being seen.

Outgoing message states:

    @@ -337,7 +337,7 @@ Public Member Functions
  • MR_STATE_OUT_MDN_RCVD (28) - Outgoing message read by the recipient (two checkmarks; this requires goodwill on the receiver's side) If a sent message changes to this state, you'll receive the event MR_EVENT_MSG_READ.

If you just want to check if a message is sent or not, please use mrmsg_is_sent() which regards all states accordingly.

-

The state of just created message objects is MR_STATE_UNDEFINED (0). The state is always set by the core-library, users of the library cannot set the state directly, but it is changed implicitly eg. when calling mrmailbox_marknoticed_chat() or mrmailbox_markseen_msgs().

+

The state of just created message objects is MR_STATE_UNDEFINED (0). The state is always set by the core-library, users of the library cannot set the state directly, but it is changed implicitly eg. when calling mrmailbox_marknoticed_chat() or mrmailbox_markseen_msgs().

Parameters
mailboxThe mailbox object.
@@ -768,7 +768,7 @@ Public Member Functions

Check if a message is starred.

Starred messages are "favorites" marked by the user with a "star" or something like that. Starred messages can typically be shown easily and are not deleted automatically.

-

To star one or more messages, use mrmailbox_star_msgs(), to get a list of starred messages, use mrmailbox_get_chat_msgs() using MR_CHAT_ID_STARRED as the chat_id.

+

To star one or more messages, use mrmailbox_star_msgs(), to get a list of starred messages, use mrmailbox_get_chat_msgs() using MR_CHAT_ID_STARRED as the chat_id.

Parameters
msgThe message object.
diff --git a/docs/html/mrapeerstate_8h_source.html b/docs/html/mrapeerstate_8h_source.html index c967a9a3..a7007474 100644 --- a/docs/html/mrapeerstate_8h_source.html +++ b/docs/html/mrapeerstate_8h_source.html @@ -89,7 +89,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
mrapeerstate.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 __MRAPEERSTATE_H__
24 #define __MRAPEERSTATE_H__
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
30 #include "mrkey.h"
31 
32 
33 typedef struct mraheader_t mraheader_t;
34 
35 
36 #define MRA_PE_NOPREFERENCE 0 /* prefer-encrypt states */
37 #define MRA_PE_MUTUAL 1
38 #define MRA_PE_GOSSIP 2
39 #define MRA_PE_RESET 20
40 
41 
45 typedef struct mrapeerstate_t
46 {
48  char* m_addr;
49  time_t m_last_seen;
50  time_t m_last_seen_autocrypt;
51  mrkey_t* m_public_key;
52  int m_prefer_encrypt;
53 
54  #define MRA_SAVE_LAST_SEEN 0x01
55  #define MRA_SAVE_ALL 0x02
56  int m_to_save;
57 } mrapeerstate_t;
58 
59 
60 mrapeerstate_t* mrapeerstate_new (); /* the returned pointer is ref'd and must be unref'd after usage */
61 void mrapeerstate_unref (mrapeerstate_t*);
62 
63 int mrapeerstate_init_from_header (mrapeerstate_t*, const mraheader_t*, time_t message_time);
64 int mrapeerstate_degrade_encryption(mrapeerstate_t*, time_t message_time);
65 int mrapeerstate_apply_header (mrapeerstate_t*, const mraheader_t*, time_t message_time); /*returns 1 on changes*/
66 
67 char* mrapeerstate_render_gossip_header(mrapeerstate_t*);
68 
69 int mrapeerstate_load_from_db__ (mrapeerstate_t*, mrsqlite3_t*, const char* addr);
70 int mrapeerstate_save_to_db__ (const mrapeerstate_t*, mrsqlite3_t*, int create);
71 
72 
73 #ifdef __cplusplus
74 } /* /extern "C" */
75 #endif
76 #endif /* __MRAPEERSTATE_H__ */
77 
+
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 __MRAPEERSTATE_H__
24 #define __MRAPEERSTATE_H__
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
30 #include "mrkey.h"
31 
32 
33 typedef struct mraheader_t mraheader_t;
34 
35 
36 #define MRA_PE_NOPREFERENCE 0 /* prefer-encrypt states */
37 #define MRA_PE_MUTUAL 1
38 #define MRA_PE_RESET 20
39 
40 
44 typedef struct mrapeerstate_t
45 {
47  char* m_addr;
48  time_t m_last_seen; /* may be 0 if the peer was created by gossipping */
49 
50  time_t m_last_seen_autocrypt;
51  mrkey_t* m_public_key; /* may be NULL, however, in the database, either public_key or gossip_key is set */
52  int m_prefer_encrypt;
53 
54  time_t m_gossip_timestamp;
55  mrkey_t* m_gossip_key; /* may be NULL */
56 
57  #define MRA_SAVE_TIMESTAMPS 0x01
58  #define MRA_SAVE_ALL 0x02
59  int m_to_save;
60 } mrapeerstate_t;
61 
62 
63 mrapeerstate_t* mrapeerstate_new (); /* the returned pointer is ref'd and must be unref'd after usage */
64 void mrapeerstate_unref (mrapeerstate_t*);
65 
66 int mrapeerstate_init_from_header (mrapeerstate_t*, const mraheader_t*, time_t message_time);
67 int mrapeerstate_init_from_gossip (mrapeerstate_t*, const mraheader_t*, time_t message_time);
68 
69 int mrapeerstate_degrade_encryption(mrapeerstate_t*, time_t message_time);
70 
71 void mrapeerstate_apply_header (mrapeerstate_t*, const mraheader_t*, time_t message_time);
72 void mrapeerstate_apply_gossip (mrapeerstate_t*, const mraheader_t*, time_t message_time);
73 
74 char* mrapeerstate_render_gossip_header(mrapeerstate_t*);
75 
76 mrkey_t* mrapeerstate_peek_key (mrapeerstate_t*);
77 
78 int mrapeerstate_load_from_db__ (mrapeerstate_t*, mrsqlite3_t*, const char* addr);
79 int mrapeerstate_save_to_db__ (const mrapeerstate_t*, mrsqlite3_t*, int create);
80 
81 
82 #ifdef __cplusplus
83 } /* /extern "C" */
84 #endif
85 #endif /* __MRAPEERSTATE_H__ */
86 
msgThe message object.