2014-11-16 20:41:03 +01:00
/*
This file is part of telegram - purple
2014-11-11 20:21:14 +03:00
2014-11-16 20:41:03 +01:00
This program 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 .
This program 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 program ; if not , write to the Free Software
Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02111 - 1301 USA
2015-03-12 01:47:57 +01:00
Copyright Matthias Jentsch , Vitaly Valtman , Christopher Althaus , Markus Endres 2014 - 2015
2014-11-16 20:41:03 +01:00
*/
2014-11-11 20:21:14 +03:00
# ifndef __TG_PURPLE_H__
# define __TG_PURPLE_H__
2014-11-17 16:27:01 +03:00
# include <tgl.h>
2014-11-11 20:21:14 +03:00
# define PLUGIN_ID "prpl-telegram"
2014-11-16 16:33:27 +01:00
# define TG_AUTHOR "Matthias Jentsch <mtthsjntsch@gmail.com>, Vitaly Valtman, Christopher Althaus <althaus.christopher@gmail.com>, Markus Endres <endresma45241@th-nuernberg.de>. Based on libtgl by Vitaly Valtman."
# define TG_DESCRIPTION "Telegram protocol."
2015-05-31 16:01:09 +02:00
# define TG_BUILD "12"
2014-11-11 20:21:14 +03:00
# include <notify.h>
# include <plugin.h>
# include <version.h>
# include <account.h>
# include <connection.h>
2014-11-17 18:24:09 +03:00
# define TGP_APP_HASH "99428c722d0ed59b9cd844e4577cb4bb"
# define TGP_APP_ID 16154
2014-11-11 20:21:14 +03:00
2015-03-10 16:11:06 +01:00
# define TGP_MAX_MSG_SIZE 4096
2015-03-14 18:00:37 +01:00
# define TGP_DEFAULT_MAX_MSG_SPLIT_COUNT 4
2015-05-30 15:52:17 +02:00
# define TGP_KEY_PASSWORD_TWO_FACTOR "password-two-factor"
2015-03-14 18:00:37 +01:00
# define TGP_DEFAULT_ACCEPT_SECRET_CHATS "ask"
# define TGP_KEY_ACCEPT_SECRET_CHATS "accept-secret-chats"
2015-03-13 16:57:08 +01:00
# define TGP_DEFAULT_INACTIVE_DAYS_OFFLINE 7
2015-03-14 18:00:37 +01:00
# define TGP_KEY_INACTIVE_DAYS_OFFLINE "inactive-days-offline"
2015-03-13 00:13:27 +01:00
# define TGP_DEFAULT_HISTORY_RETRIEVAL_THRESHOLD 14
2015-03-14 18:00:37 +01:00
# define TGP_KEY_HISTORY_RETRIEVAL_THRESHOLD "history-retrieve-days"
2015-03-13 00:13:27 +01:00
2015-03-14 18:00:37 +01:00
# define TGP_KEY_HISTORY_SYNC_ALL "history-sync-all"
# define TGP_DEFAULT_HISTORY_SYNC_ALL FALSE
2015-03-13 16:57:08 +01:00
2015-05-30 15:52:17 +02:00
# define TGP_DEFAULT_DISPLAY_READ_NOTIFICATIONS FALSE
# define TGP_KEY_DISPLAY_READ_NOTIFICATIONS "display-read-notifications"
# define TGP_DEFAULT_SEND_READ_NOTIFICATIONS TRUE
# define TGP_KEY_SEND_READ_NOTIFICATIONS "send-read-notifications"
2015-05-29 18:25:55 +02:00
2014-11-16 20:39:10 +01:00
void on_chat_get_info ( struct tgl_state * TLS , void * extra , int success , struct tgl_chat * C ) ;
void on_ready ( struct tgl_state * TLS ) ;
2014-11-13 00:45:51 +01:00
extern const char * pk_path ;
2014-11-16 16:33:27 +01:00
extern const char * config_dir ;
2014-11-16 21:55:36 +01:00
extern PurplePlugin * _telegram_protocol ;
2014-11-13 00:45:51 +01:00
2014-11-11 20:21:14 +03:00
# endif