Uh oh!
There was an error while loading. Please reload this page.
forked from ModernTechnologyPlayers01/tg
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpython-tg.h
More file actions
Latest commit
89 lines (80 loc) · 4.03 KB
/
Copy pathpython-tg.h
File metadata and controls
89 lines (80 loc) · 4.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
This file is part of telegram-cli.
Telegram-cli 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-cli 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-cli. If not, see <http://www.gnu.org/licenses/>.
Copyright Vitaly Valtman 2013-2015
Copyright Vincent Castellano 2015
*/
#ifndef__PYTHON_TG_H__
#define__PYTHON_TG_H__
#include<Python.h>
#include<string.h>
#include<tgl/tgl.h>
// Python functions
voidpy_init (constchar*file);
voidpy_new_msg (structtgl_message*M);
voidpy_our_id (intid);
voidpy_secret_chat_update (structtgl_secret_chat*U, unsignedflags);
voidpy_user_update (structtgl_user*U, unsignedflags);
voidpy_chat_update (structtgl_chat*C, unsignedflags);
voidpy_binlog_end (void);
voidpy_diff_end (void);
voidpy_do_all (void);
// Binding functions
PyObject*py_contact_list(PyObject*self, PyObject*args);
PyObject*py_dialog_list(PyObject*self, PyObject*args);
PyObject*py_rename_chat(PyObject*self, PyObject*args);
PyObject*py_send_msg(PyObject*self, PyObject*args);
PyObject*py_send_typing(PyObject*self, PyObject*args);
PyObject*py_send_typing_abort(PyObject*self, PyObject*args);
PyObject*py_send_photo(PyObject*self, PyObject*args);
PyObject*py_send_video(PyObject*self, PyObject*args);
PyObject*py_send_audio(PyObject*self, PyObject*args);
PyObject*py_send_document(PyObject*self, PyObject*args);
PyObject*py_send_file(PyObject*self, PyObject*args);
PyObject*py_send_text(PyObject*self, PyObject*args);
PyObject*py_chat_set_photo(PyObject*self, PyObject*args);
PyObject*py_load_photo(PyObject*self, PyObject*args);
PyObject*py_load_video(PyObject*self, PyObject*args);
PyObject*py_load_video_thumb(PyObject*self, PyObject*args);
PyObject*py_load_audio(PyObject*self, PyObject*args);
PyObject*py_load_document(PyObject*self, PyObject*args);
PyObject*py_load_document_thumb(PyObject*self, PyObject*args);
PyObject*py_fwd(PyObject*self, PyObject*args);
PyObject*py_fwd_media(PyObject*self, PyObject*args);
PyObject*py_chat_info(PyObject*self, PyObject*args);
PyObject*py_user_info(PyObject*self, PyObject*args);
PyObject*py_history(PyObject*self, PyObject*args);
PyObject*py_chat_add_user(PyObject*self, PyObject*args);
PyObject*py_chat_del_user(PyObject*self, PyObject*args);
PyObject*py_add_contact(PyObject*self, PyObject*args);
PyObject*py_del_contact(PyObject*self, PyObject*args);
PyObject*py_rename_contact(PyObject*self, PyObject*args);
PyObject*py_search(PyObject*self, PyObject*args);
PyObject*py_global_search(PyObject*self, PyObject*args);
PyObject*py_mark_read(PyObject*self, PyObject*args);
PyObject*py_set_profile_photo(PyObject*self, PyObject*args);
PyObject*py_set_profile_name(PyObject*self, PyObject*args);
PyObject*py_create_secret_chat(PyObject*self, PyObject*args);
PyObject*py_create_group_chat(PyObject*self, PyObject*args);
PyObject*py_delete_msg(PyObject*self, PyObject*args);
PyObject*py_restore_msg(PyObject*self, PyObject*args);
PyObject*py_accept_secret_chat(PyObject*self, PyObject*args);
PyObject*py_send_contact(PyObject*self, PyObject*args);
PyObject*py_status_online(PyObject*self, PyObject*args);
PyObject*py_status_offline(PyObject*self, PyObject*args);
PyObject*py_send_location(PyObject*self, PyObject*args);
PyObject*py_extf(PyObject*self, PyObject*args);
// Util Functions
voidpy_add_string_field (PyObject*dict, char*name, constchar*value);
voidpy_add_string_field_arr (PyObject*list, intnum, constchar*value);
voidpy_add_num_field (PyObject*dict, constchar*name, doublevalue);
#endif