Commit graph

539 commits

Author SHA1 Message Date
mjentsch
d94dc52df0 Remove remaining global variables 2014-09-01 21:43:22 +02:00
mjentsch
2e50ec47b7 Merge user-status 2014-08-23 17:36:52 +02:00
mjentsch
6706ac14cb Merge branch 'States' 2014-08-23 16:42:14 +02:00
Christopher Althaus
6441c6be4b Fixed telegram notification client bug 2014-08-23 16:40:30 +02:00
Christopher Althaus
fa9d45bd20 User State/Typing implemented
Send Messages activated
2014-08-23 16:23:37 +02:00
mjentsch
386abe2ab9 Merge branch 'refactor-telegram-cli' 2014-08-23 13:03:55 +02:00
mjentsch
5a425be62f Remove unused code and build files 2014-08-23 12:57:38 +02:00
mjentsch
832cf949f0 Fix message allocation 2014-08-23 11:18:42 +02:00
mjentsch
eec5ea50aa Remove globals containing account and connection from the purple plugin to enable multiple connections 2014-08-23 02:56:47 +02:00
mjentsch
dddbe451c1 fix a bug in the configuration writer
creates new configuration files readable and writable
2014-08-23 02:55:13 +02:00
mjentsch
7ee334ec37 Fix user registration 2014-08-23 02:52:04 +02:00
mjentsch
32039628a6 Remove unneeded commented code 2014-08-23 02:44:57 +02:00
mjentsch
d062ec44d0 Switch to ready-state when the data center is already registered 2014-08-23 02:41:26 +02:00
mjentsch
a4e5449d5a Move telegram callbacks and settings into configuration struct 2014-08-23 02:40:10 +02:00
mjentsch
f09b4c1c87 Move config function to avoid predeclaration 2014-08-22 19:02:11 +02:00
mjentsch
c81ce16e80 Fix coding style and add missing docstrings 2014-08-22 18:57:14 +02:00
mjentsch
8ff9734077 Handle the SWITCH_DC RPCError by changing the data center and creating a new mtproto_connection 2014-08-22 18:54:25 +02:00
mjentsch
5d8d170927 Use allocation utilities from utilites.h and initiate telegram with zeroes 2014-08-22 18:44:23 +02:00
mjentsch
c144484fd5 Add memory management for mtproto_connections
Mark connections for destruction on close and free all allocated memory only once all incoming queries are read, since those queries will still access data on the current mtproto_connection and cause segmentation faults.
2014-08-22 18:41:35 +02:00
mjentsch
1e6598c11c Request proxy connections by callback
Require the user of telegram to provide a callback to create and cleanup proxy connections, to allow
the application to create new connections when needed.
2014-08-22 18:28:58 +02:00
mjentsch
1b1c5d132a Remove overlooked incrementation of queries_num 2014-08-22 17:45:40 +02:00
mjentsch
54091b26e3 Log all output of verbosity-level 1 to libpurple log 2014-08-22 17:39:05 +02:00
mjentsch
e4bb5bf5a6 Count pending queries using the elements in the query tree, instead of counting the incoming and outgoing messages
Since the server is able to send queries without any response, and is also able to send multiple responses to an arbitrary query, the current way to count pending queries is not accurate and will lead to errors. Instead, the amount of queries in the query tree will be determined to decide whether there are pending messages.
2014-08-22 17:21:46 +02:00
mjentsch
e667299d2f Add binlog to telegram struct 2014-08-22 17:14:08 +02:00
mjentsch
7720beab6e Remove global configuration flags 2014-08-22 17:13:25 +02:00
mjentsch
32799a9086 Move binlog globals into a structure 2014-08-22 17:05:29 +02:00
mjentsch
331d631659 Ignore gdb files 2014-08-22 16:43:45 +02:00
mjentsch
188f890df5 Ignore app-hash 2014-08-08 08:46:39 +02:00
mjentsch
1170ae5710 Implement state machine for dc discovery and login. 2014-08-08 08:45:58 +02:00
mjentsch
f1a2738783 remove redundant functions from binlog 2014-08-08 08:44:56 +02:00
mjentsch
9e5b4ca5ec Refactor - Intermediate Commit 3 2014-08-06 19:45:46 +02:00
mjentsch
8a2c043db4 Refactor - Intermediate Commit 2 2014-07-29 15:36:59 +02:00
mjentsch
ed7aa7de5b Refactor Intermediate State 1 2014-07-29 15:36:59 +02:00
mjentsch
67c5a5e712 Ignore ycm-autocompletion files 2014-07-29 15:31:37 +02:00
Matthias Jentsch
9b7f273579 README.md edited online with Bitbucket 2014-07-26 09:11:47 +00:00
mjentsch
7fad1403ec Fetch chats and refactor libtelegram api 2014-07-11 19:57:32 +02:00
mjentsch
f78adc8b96 Support sending messages 2014-07-11 02:19:05 +02:00
mjentsch
43a5a80c48 Set up stub for telegram library 2014-07-11 01:13:01 +02:00
mjentsch
44e9163b66 Remove useless comments 2014-07-11 01:06:37 +02:00
mjentsch
6a439a5d55 Move everything into one Makefile
Avoid having to execute two different make commands to properly build the plugin, when there are changes in the telegram-cli files.
2014-07-08 21:17:50 +02:00
mjentsch
2099d9fbc3 Rename printname to alias 2014-06-27 09:37:35 +02:00
mjentsch
f28d89c9c6 Replace tabs with 4 spaces 2014-06-27 09:35:47 +02:00
mjentsch
6325bd108d Listen to changed users and add new chats to the current sessions 2014-06-22 23:39:05 +02:00
mjentsch
0945a3ca11 Add event handler functionality to tg-cli 2014-06-22 23:38:06 +02:00
mjentsch
d712b7e17f Add possibillity to listen to created users, chats and groups with event handlers and add some ability to exchange output functions with own callbacks 2014-06-22 23:36:52 +02:00
mjentsch
dbf509d59e Log some terminal messages to libpurple log 2014-06-22 23:33:57 +02:00
mjentsch
75e1abe520 Remove useless functions 2014-06-21 01:51:26 +02:00
mjentsch
a005c015cd Implement phone number registration
When the current phone number is not registered with the telegram network, ask for first and last name and proceed with the regular sms-code authentication scheme.
2014-06-15 19:58:49 +02:00
mjentsch
62090b3ca0 Implement login and authentication mechanism and fix the logging mechanism
Use purple debugging functions by formatting the string beforehand and then passing the readily formatted string, instead of doing it with va_list. Log into the telegram network using the provided SMS code and hash or request a new one, in case one of those isn't provided. Store and load the state using the file config/auth, to be able to restore previous logins.
2014-06-15 13:38:38 +02:00
mjentsch
90f7b39e11 Fix log format arguments
Remove the misuse of va_list and emulate behavior of purple debugging functions in our own code, since a va_list cannot be passed to purple_debug_info,
2014-06-15 03:22:39 +02:00