Commit 8dd17ec6 authored by vysheng's avatar vysheng

Some renaming

parent a37e5f43
This diff is collapsed.
...@@ -43,11 +43,11 @@ void bl_do_user_set_real_name (struct user *U, const char *f, int fl, const char ...@@ -43,11 +43,11 @@ void bl_do_user_set_real_name (struct user *U, const char *f, int fl, const char
void bl_do_encr_chat_delete (struct secret_chat *U); 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[]); 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[]);
void bl_do_set_encr_chat_access_hash (struct secret_chat *U, long long access_hash); void bl_do_encr_chat_set_access_hash (struct secret_chat *U, long long access_hash);
void bl_do_set_encr_chat_date (struct secret_chat *U, int date); void bl_do_encr_chat_set_date (struct secret_chat *U, int date);
void bl_do_set_encr_chat_state (struct secret_chat *U, enum secret_chat_state state); void bl_do_encr_chat_set_state (struct secret_chat *U, enum secret_chat_state state);
void bl_do_encr_chat_accepted (struct secret_chat *U, const unsigned char g_key[], const unsigned char nonce[], long long key_fingerprint); void bl_do_encr_chat_accepted (struct secret_chat *U, const unsigned char g_key[], const unsigned char nonce[], long long key_fingerprint);
void bl_do_set_encr_chat_key (struct secret_chat *E, unsigned char key[], long long key_fingerprint); void bl_do_encr_chat_set_key (struct secret_chat *E, unsigned char key[], long long key_fingerprint);
void bl_do_encr_chat_init (int id, int user_id, unsigned char random[], unsigned char g_a[]); 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_dc_signed (int id);
...@@ -61,14 +61,14 @@ void bl_do_set_date (int date); ...@@ -61,14 +61,14 @@ void bl_do_set_date (int date);
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_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); void bl_do_chat_forbid (struct chat *C, int on);
void bl_do_set_chat_title (struct chat *C, const char *s, int l); void bl_do_chat_set_title (struct chat *C, const char *s, int l);
void bl_do_set_chat_photo (struct chat *C, struct file_location *big, struct file_location *small); void bl_do_chat_set_photo (struct chat *C, struct file_location *big, struct file_location *small);
void bl_do_set_chat_date (struct chat *C, int date); void bl_do_chat_set_date (struct chat *C, int date);
void bl_do_set_chat_set_in_chat (struct chat *C, int on); void bl_do_chat_set_set_in_chat (struct chat *C, int on);
void bl_do_set_chat_version (struct chat *C, int version, int user_num); void bl_do_chat_set_version (struct chat *C, int version, int user_num);
void bl_do_set_chat_admin (struct chat *C, int admin); void bl_do_chat_set_admin (struct chat *C, int admin);
void bl_do_set_chat_participants (struct chat *C, int version, int user_num, struct chat_user *users); void bl_do_chat_set_participants (struct chat *C, int version, int user_num, struct chat_user *users);
void bl_do_set_chat_full_photo (struct chat *U, const int *start, int len); void bl_do_chat_set_full_photo (struct chat *U, const int *start, int len);
void bl_do_chat_add_user (struct chat *C, int version, int user, int inviter, int date); 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); void bl_do_chat_del_user (struct chat *C, int version, int user);
......
...@@ -30,24 +30,25 @@ binlog.userSetPhoto id:int photo:UserProfilePhoto = binlog.Update; ...@@ -30,24 +30,25 @@ binlog.userSetPhoto id:int photo:UserProfilePhoto = binlog.Update;
binlog.encrChatDelete id:int = binlog.Update; binlog.encrChatDelete id:int = binlog.Update;
binlog.encrChatRequested id:int hash:long date:int admin:int user:int key:64*[int] nonce:64*[int] = binlog.Update; binlog.encrChatRequested id:int hash:long date:int admin:int user:int key:64*[int] nonce:64*[int] = binlog.Update;
binlog.setEncrChatAccessHash id:int hash:long = binlog.Update;
binlog.setEncrChatDate id:int date:int = binlog.Update;
binlog.setEncrChatState id:int state:int = binlog.Update;
binlog.encrChatAccepted id:int key:64*[int] nonce:64*[int] fingerprint:long = binlog.Update; binlog.encrChatAccepted id:int key:64*[int] nonce:64*[int] fingerprint:long = binlog.Update;
binlog.setEncrChatKey id:int key:64*[int] fingerprint:long = binlog.Update;
binlog.encrChatInit id:int user:int key:64*[int] g_key:64*[int] = binlog.Update; binlog.encrChatInit id:int user:int key:64*[int] g_key:64*[int] = binlog.Update;
binlog.encrChatSetAccessHash id:int hash:long = binlog.Update;
binlog.encrChatSetDate id:int date:int = binlog.Update;
binlog.encrChatSetState id:int state:int = binlog.Update;
binlog.encrChatSetKey id:int key:64*[int] fingerprint:long = binlog.Update;
binlog.chatCreate id:int flags:int title:string user_num:int date:int version:int photo_big:%binlog.FileLocation photo_small:%binlog.FileLocation = binlog.Update; binlog.chatCreate id:int flags:int title:string user_num:int date:int version:int photo_big:%binlog.FileLocation photo_small:%binlog.FileLocation = binlog.Update;
binlog.chatChangeFlags id:int set_flags:int clear_flags:int = binlog.Update; binlog.chatChangeFlags id:int set_flags:int clear_flags:int = binlog.Update;
binlog.setChatTitle id:int title:string = binlog.Update; binlog.chatSetTitle id:int title:string = binlog.Update;
binlog.setChatPhoto id:int photo_big:%binlog.FileLocation photo_small:%binlog.FileLocation = binlog.Update; binlog.chatSetPhoto id:int photo_big:%binlog.FileLocation photo_small:%binlog.FileLocation = binlog.Update;
binlog.setChatDate id:int date:int = binlog.Update; binlog.chatSetDate id:int date:int = binlog.Update;
binlog.setChatVersion id:int version:int users_num:int = binlog.Update; binlog.chatSetVersion id:int version:int users_num:int = binlog.Update;
binlog.setChatAdmin id:int admin:int = binlog.Update; binlog.chatSetAdmin id:int admin:int = binlog.Update;
binlog.setChatParticipants id:int version:int participants:%(Vector %binlog.ChatParticipant) = binlog.Update; binlog.chatSetParticipants id:int version:int participants:%(Vector %binlog.ChatParticipant) = binlog.Update;
binlog.chatFullPhoto id:int photo:Photo = binlog.Update; binlog.chatSetFullPhoto id:int photo:Photo = binlog.Update;
binlog.addChatParticipant id:int version:int user:%binlog.ChatParticipant = binlog.Update; binlog.chatAddParticipant id:int version:int user:%binlog.ChatParticipant = binlog.Update;
binlog.delChatParticipant id:int version:int user:int = binlog.Update; binlog.chatDelParticipant id:int version:int user:int = binlog.Update;
binlog.createMessageText id:int from_id:int to_type:int to_id:int date:int text:string = binlog.Update; binlog.createMessageText id:int from_id:int to_type:int to_id:int date:int text:string = binlog.Update;
binlog.sendMessageText id:long from_id:int to_type:int to_id:int date:int text:string = binlog.Update; binlog.sendMessageText id:long from_id:int to_type:int to_id:int date:int text:string = binlog.Update;
......
...@@ -1119,7 +1119,7 @@ void work_update (struct connection *c UU, long long msg_id UU) { ...@@ -1119,7 +1119,7 @@ void work_update (struct connection *c UU, long long msg_id UU) {
peer_t *C = user_chat_get (chat_id); peer_t *C = user_chat_get (chat_id);
if (C && (C->flags & FLAG_CREATED)) { if (C && (C->flags & FLAG_CREATED)) {
if (x == CODE_chat_participants) { if (x == CODE_chat_participants) {
bl_do_set_chat_admin (&C->chat, fetch_int ()); bl_do_chat_set_admin (&C->chat, fetch_int ());
assert (fetch_int () == CODE_vector); assert (fetch_int () == CODE_vector);
n = fetch_int (); n = fetch_int ();
struct chat_user *users = talloc (12 * n); struct chat_user *users = talloc (12 * n);
...@@ -1131,7 +1131,7 @@ void work_update (struct connection *c UU, long long msg_id UU) { ...@@ -1131,7 +1131,7 @@ void work_update (struct connection *c UU, long long msg_id UU) {
users[i].date = fetch_int (); users[i].date = fetch_int ();
} }
int version = fetch_int (); int version = fetch_int ();
bl_do_set_chat_participants (&C->chat, version, n, users); bl_do_chat_set_participants (&C->chat, version, n, users);
} }
} else { } else {
if (x == CODE_chat_participants) { if (x == CODE_chat_participants) {
......
...@@ -2389,7 +2389,7 @@ void do_send_accept_encr_chat (struct secret_chat *E, unsigned char *random) { ...@@ -2389,7 +2389,7 @@ void do_send_accept_encr_chat (struct secret_chat *E, unsigned char *random) {
static unsigned char sha_buffer[20]; static unsigned char sha_buffer[20];
sha1 (kk, 256, sha_buffer); sha1 (kk, 256, sha_buffer);
bl_do_set_encr_chat_key (E, kk, *(long long *)(sha_buffer + 12)); bl_do_encr_chat_set_key (E, kk, *(long long *)(sha_buffer + 12));
clear_packet (); clear_packet ();
out_int (CODE_messages_accept_encryption); out_int (CODE_messages_accept_encryption);
......
...@@ -307,8 +307,8 @@ void fetch_encrypted_chat (struct secret_chat *U) { ...@@ -307,8 +307,8 @@ void fetch_encrypted_chat (struct secret_chat *U) {
bl_do_encr_chat_requested (U, access_hash, date, admin_id, user_id, (void *)g_key, (void *)nonce); bl_do_encr_chat_requested (U, access_hash, date, admin_id, user_id, (void *)g_key, (void *)nonce);
write_secret_chat_file (); write_secret_chat_file ();
} else { } else {
bl_do_set_encr_chat_access_hash (U, fetch_long ()); bl_do_encr_chat_set_access_hash (U, fetch_long ());
bl_do_set_encr_chat_date (U, fetch_int ()); bl_do_encr_chat_set_date (U, fetch_int ());
if (fetch_int () != U->admin_id) { if (fetch_int () != U->admin_id) {
logprintf ("Changed admin in secret chat. WTF?\n"); logprintf ("Changed admin in secret chat. WTF?\n");
return; return;
...@@ -318,7 +318,7 @@ void fetch_encrypted_chat (struct secret_chat *U) { ...@@ -318,7 +318,7 @@ void fetch_encrypted_chat (struct secret_chat *U) {
return; return;
} }
if (x == CODE_encrypted_chat_waiting) { if (x == CODE_encrypted_chat_waiting) {
bl_do_set_encr_chat_state (U, sc_waiting); bl_do_encr_chat_set_state (U, sc_waiting);
write_secret_chat_file (); write_secret_chat_file ();
return; // We needed only access hash from here return; // We needed only access hash from here
} }
...@@ -413,7 +413,7 @@ void fetch_chat (struct chat *C) { ...@@ -413,7 +413,7 @@ void fetch_chat (struct chat *C) {
} }
int l = prefetch_strlen (); int l = prefetch_strlen ();
char *s = fetch_str (l); char *s = fetch_str (l);
bl_do_set_chat_title (C, s, l); bl_do_chat_set_title (C, s, l);
struct file_location small; struct file_location small;
struct file_location big; struct file_location big;
...@@ -430,13 +430,13 @@ void fetch_chat (struct chat *C) { ...@@ -430,13 +430,13 @@ void fetch_chat (struct chat *C) {
fetch_file_location (&small); fetch_file_location (&small);
fetch_file_location (&big); fetch_file_location (&big);
} }
bl_do_set_chat_photo (C, &big, &small); bl_do_chat_set_photo (C, &big, &small);
int users_num = fetch_int (); int users_num = fetch_int ();
bl_do_set_chat_date (C, fetch_int ()); bl_do_chat_set_date (C, fetch_int ());
bl_do_set_chat_set_in_chat (C, fetch_bool ()); bl_do_chat_set_set_in_chat (C, fetch_bool ());
bl_do_set_chat_version (C, users_num, fetch_int ()); bl_do_chat_set_version (C, users_num, fetch_int ());
} else { } else {
bl_do_set_chat_date (C, fetch_int ()); bl_do_chat_set_date (C, fetch_int ());
} }
} }
} }
...@@ -486,13 +486,13 @@ void fetch_chat_full (struct chat *C) { ...@@ -486,13 +486,13 @@ void fetch_chat_full (struct chat *C) {
fetch_alloc_user (); fetch_alloc_user ();
} }
if (admin_id) { if (admin_id) {
bl_do_set_chat_admin (C, admin_id); bl_do_chat_set_admin (C, admin_id);
} }
if (version > 0) { if (version > 0) {
bl_do_set_chat_participants (C, version, users_num, users); bl_do_chat_set_participants (C, version, users_num, users);
tfree (users, sizeof (struct chat_user) * users_num); tfree (users, sizeof (struct chat_user) * users_num);
} }
bl_do_set_chat_full_photo (C, start, 4 * (end - start)); bl_do_chat_set_full_photo (C, start, 4 * (end - start));
} }
void fetch_photo_size (struct photo_size *S) { void fetch_photo_size (struct photo_size *S) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment