Improve td_json_client documentation.
GitOrigin-RevId: a2d673c42de4a9fa4d882bcc20fe279084edcb28
This commit is contained in:
parent
c3fe3f97ec
commit
3119a17518
@ -17767,6 +17767,8 @@ void MessagesManager::send_update_chat_read_inbox(const Dialog *d, bool force, c
|
||||
<< source;
|
||||
on_dialog_updated(d->dialog_id, source);
|
||||
if (!force && (running_get_difference_ || running_get_channel_difference(d->dialog_id))) {
|
||||
LOG(INFO) << "Postpone updateChatReadInbox in " << d->dialog_id << "(" << get_dialog_title(d->dialog_id) << ") to "
|
||||
<< d->server_unread_count << " + " << d->local_unread_count << " from " << source;
|
||||
postponed_chat_read_inbox_updates_.insert(d->dialog_id);
|
||||
} else {
|
||||
postponed_chat_read_inbox_updates_.erase(d->dialog_id);
|
||||
|
@ -68,6 +68,8 @@ TDJSON_EXPORT void td_json_client_send(void *client, const char *request);
|
||||
/**
|
||||
* Receives incoming updates and request responses from the TDLib client. May be called from any thread, but
|
||||
* shouldn't be called simultaneously from two different threads.
|
||||
* Returned pointer will be deallocated by TDLib during next call to td_json_client_receive or td_json_client_execute
|
||||
* in the same thread, so it can't be used after that.
|
||||
* \param[in] client The client.
|
||||
* \param[in] timeout Maximum number of seconds allowed for this function to wait for new data.
|
||||
* \return JSON-serialized null-terminated incoming update or request response. May be NULL if the timeout expires.
|
||||
@ -77,6 +79,8 @@ TDJSON_EXPORT const char *td_json_client_receive(void *client, double timeout);
|
||||
/**
|
||||
* Synchronously executes TDLib request. May be called from any thread.
|
||||
* Only a few requests can be executed synchronously.
|
||||
* Returned pointer will be deallocated by TDLib during next call to td_json_client_receive or td_json_client_execute
|
||||
* in the same thread, so it can't be used after that.
|
||||
* \param[in] client The client.
|
||||
* \param[in] request JSON-serialized null-terminated request to TDLib.
|
||||
* \return JSON-serialized null-terminated request response. May be NULL if the request can't be parsed.
|
||||
|
Reference in New Issue
Block a user