2013-11-30 05:12:51 -05:00
|
|
|
/*
|
|
|
|
This file is part of telegram-client.
|
|
|
|
|
|
|
|
Telegram-client is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Telegram-client is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
Copyright Vitaly Valtman 2013
|
|
|
|
*/
|
2013-11-12 19:11:25 -05:00
|
|
|
#ifndef __BINLOG_H__
|
|
|
|
#define __BINLOG_H__
|
|
|
|
|
2013-11-21 14:35:49 -05:00
|
|
|
#include "structures.h"
|
|
|
|
|
2013-11-12 19:11:25 -05:00
|
|
|
void *alloc_log_event (int l);
|
|
|
|
void replay_log (void);
|
2013-11-14 19:08:24 -05:00
|
|
|
void add_log_event (const int *data, int l);
|
|
|
|
void write_binlog (void);
|
2013-11-21 14:35:49 -05:00
|
|
|
void bl_do_set_auth_key_id (int num, unsigned char *buf);
|
|
|
|
|
|
|
|
void bl_do_dc_option (int id, int l1, const char *name, int l2, const char *ip, int port);
|
|
|
|
|
|
|
|
void bl_do_set_our_id (int id);
|
2014-08-12 17:32:11 -04:00
|
|
|
void bl_do_user_add (int id, const char *f, int fl, const char *l, int ll, long long access_token, const char *p, int pl, int contact);
|
2013-11-21 14:35:49 -05:00
|
|
|
void bl_do_user_delete (struct user *U);
|
|
|
|
void bl_do_set_user_profile_photo (struct user *U, long long photo_id, struct file_location *big, struct file_location *small);
|
2014-08-12 17:32:11 -04:00
|
|
|
void bl_do_user_set_name (struct user *U, const char *f, int fl, const char *l, int ll);
|
|
|
|
void bl_do_user_set_access_hash (struct user *U, long long access_token);
|
|
|
|
void bl_do_user_set_phone (struct user *U, const char *p, int pl);
|
|
|
|
void bl_do_user_set_friend (struct user *U, int friend);
|
|
|
|
void bl_do_user_set_full_photo (struct user *U, const int *start, int len);
|
|
|
|
void bl_do_user_set_blocked (struct user *U, int blocked);
|
|
|
|
void bl_do_user_set_real_name (struct user *U, const char *f, int fl, const char *l, int ll);
|
2013-11-21 14:35:49 -05:00
|
|
|
|
|
|
|
void bl_do_encr_chat_delete (struct secret_chat *U);
|
|
|
|
void bl_do_encr_chat_requested (struct secret_chat *U, long long access_hash, int date, int admin_id, int user_id, unsigned char g_key[], unsigned char nonce[]);
|
2014-08-12 17:51:16 -04:00
|
|
|
void bl_do_encr_chat_set_access_hash (struct secret_chat *U, long long access_hash);
|
|
|
|
void bl_do_encr_chat_set_date (struct secret_chat *U, int date);
|
|
|
|
void bl_do_encr_chat_set_state (struct secret_chat *U, enum secret_chat_state state);
|
2013-11-21 14:35:49 -05:00
|
|
|
void bl_do_encr_chat_accepted (struct secret_chat *U, const unsigned char g_key[], const unsigned char nonce[], long long key_fingerprint);
|
2014-08-12 17:51:16 -04:00
|
|
|
void bl_do_encr_chat_set_key (struct secret_chat *E, unsigned char key[], long long key_fingerprint);
|
2013-11-21 14:35:49 -05:00
|
|
|
void bl_do_encr_chat_init (int id, int user_id, unsigned char random[], unsigned char g_a[]);
|
|
|
|
|
|
|
|
void bl_do_dc_signed (int id);
|
|
|
|
void bl_do_set_working_dc (int num);
|
|
|
|
void bl_do_set_dh_params (int root, unsigned char prime[], int version);
|
2013-11-21 16:40:31 -05:00
|
|
|
|
|
|
|
void bl_do_set_pts (int pts);
|
|
|
|
void bl_do_set_qts (int qts);
|
|
|
|
void bl_do_set_seq (int seq);
|
|
|
|
void bl_do_set_date (int date);
|
2013-11-22 18:26:35 -05:00
|
|
|
|
|
|
|
void bl_do_create_chat (struct chat *C, int y, const char *s, int l, int users_num, int date, int version, struct file_location *big, struct file_location *small);
|
|
|
|
void bl_do_chat_forbid (struct chat *C, int on);
|
2014-08-12 17:51:16 -04:00
|
|
|
void bl_do_chat_set_title (struct chat *C, const char *s, int l);
|
|
|
|
void bl_do_chat_set_photo (struct chat *C, struct file_location *big, struct file_location *small);
|
|
|
|
void bl_do_chat_set_date (struct chat *C, int date);
|
|
|
|
void bl_do_chat_set_set_in_chat (struct chat *C, int on);
|
|
|
|
void bl_do_chat_set_version (struct chat *C, int version, int user_num);
|
|
|
|
void bl_do_chat_set_admin (struct chat *C, int admin);
|
|
|
|
void bl_do_chat_set_participants (struct chat *C, int version, int user_num, struct chat_user *users);
|
|
|
|
void bl_do_chat_set_full_photo (struct chat *U, const int *start, int len);
|
2013-11-25 11:13:36 -05:00
|
|
|
void bl_do_chat_add_user (struct chat *C, int version, int user, int inviter, int date);
|
|
|
|
void bl_do_chat_del_user (struct chat *C, int version, int user);
|
2013-11-29 16:43:56 -05:00
|
|
|
|
|
|
|
void bl_do_create_message_text (int msg_id, int from_id, int to_type, int to_id, int date, int l, const char *s);
|
|
|
|
void bl_do_create_message_text_fwd (int msg_id, int from_id, int to_type, int to_id, int date, int fwd, int fwd_date, int l, const char *s);
|
|
|
|
void bl_do_create_message_service (int msg_id, int from_id, int to_type, int to_id, int date, const int *data, int len);
|
|
|
|
void bl_do_create_message_service_fwd (int msg_id, int from_id, int to_type, int to_id, int date, int fwd, int fwd_date, const int *data, int len);
|
|
|
|
void bl_do_create_message_media (int msg_id, int from_id, int to_type, int to_id, int date, int l, const char *s, const int *data, int len);
|
|
|
|
void bl_do_create_message_media_fwd (int msg_id, int from_id, int to_type, int to_id, int date, int fwd, int fwd_date, int l, const char *s, const int *data, int len);
|
|
|
|
void bl_do_create_message_media_encr (long long msg_id, int from_id, int to_type, int to_id, int date, int l, const char *s, const int *data, int len, const int *data2, int len2);
|
|
|
|
void bl_do_create_message_service_encr (long long msg_id, int from_id, int to_type, int to_id, int date, const int *data, int len);
|
|
|
|
void bl_do_send_message_text (long long msg_id, int from_id, int to_type, int to_id, int date, int l, const char *s);
|
2014-08-12 21:22:15 -04:00
|
|
|
void bl_do_send_message_action_encr (long long msg_id, int from_id, int to_type, int to_id, int date, int l, const int *s);
|
2013-11-29 16:43:56 -05:00
|
|
|
void bl_do_set_unread (struct message *M, int unread);
|
|
|
|
void bl_do_set_message_sent (struct message *M);
|
|
|
|
void bl_do_set_msg_id (struct message *M, int id);
|
2013-12-06 12:14:41 -05:00
|
|
|
void bl_do_delete_msg (struct message *M);
|
2013-11-12 19:11:25 -05:00
|
|
|
#endif
|