2014-11-16 20:41:03 +01:00
|
|
|
/*
|
|
|
|
This file is part of telegram-purple
|
2014-11-16 16:33:27 +01: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 2014-2015
|
2014-11-16 20:41:03 +01:00
|
|
|
*/
|
2014-11-16 16:33:27 +01:00
|
|
|
#ifndef __telegram_adium__purple2tgl__
|
|
|
|
#define __telegram_adium__purple2tgl__
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2015-10-11 14:17:24 +02:00
|
|
|
#include "telegram-purple.h"
|
2014-11-16 16:33:27 +01:00
|
|
|
|
2015-11-21 22:14:57 +01:00
|
|
|
PurpleAccount *tls_get_pa (struct tgl_state *TLS);
|
|
|
|
PurpleConnection *tls_get_conn (struct tgl_state *TLS);
|
|
|
|
connection_data *tls_get_data (struct tgl_state *TLS);
|
|
|
|
connection_data *gc_get_data (PurpleConnection *gc);
|
|
|
|
connection_data *pa_get_data (PurpleAccount *pa);
|
|
|
|
connection_data *pbn_get_data (PurpleBlistNode *node);
|
|
|
|
struct tgl_state *gc_get_tls (PurpleConnection *gc);
|
2014-11-16 16:33:27 +01:00
|
|
|
|
2014-12-24 02:44:10 +01:00
|
|
|
int p2tgl_status_is_present (PurpleStatus *status);
|
2014-11-16 16:33:27 +01:00
|
|
|
|
|
|
|
void p2tgl_got_chat_in (struct tgl_state *TLS, tgl_peer_id_t chat, tgl_peer_id_t who, const char *message, int flags, time_t when);
|
2015-01-28 18:51:07 +01:00
|
|
|
void p2tgl_got_im_combo (struct tgl_state *TLS, tgl_peer_id_t who, const char *msg, int flags, time_t when);
|
2014-11-16 16:33:27 +01:00
|
|
|
void p2tgl_prpl_got_user_status (struct tgl_state *TLS, tgl_peer_id_t user, struct tgl_user_status *status);
|
2015-09-06 17:33:30 +02:00
|
|
|
void p2tgl_conv_add_user (struct tgl_state *TLS, PurpleConversation *conv, int user, char *message, int flags, int new_arrival);
|
2015-01-28 18:51:07 +01:00
|
|
|
PurpleConversation *p2tgl_find_conversation_with_account (struct tgl_state *TLS, tgl_peer_id_t peer);
|
2015-01-21 23:49:42 +01:00
|
|
|
PurpleNotifyUserInfo *p2tgl_notify_peer_info_new (struct tgl_state *TLS, tgl_peer_t *P);
|
|
|
|
PurpleNotifyUserInfo *p2tgl_notify_user_info_new (struct tgl_user *U);
|
|
|
|
PurpleNotifyUserInfo *p2tgl_notify_encrypted_chat_info_new (struct tgl_state *TLS, struct tgl_secret_chat *secret, struct tgl_user *U);
|
|
|
|
int p2tgl_imgstore_add_with_id (const char* filename);
|
2015-10-11 14:17:24 +02:00
|
|
|
void p2tgl_buddy_icons_set_for_user (PurpleAccount *pa, tgl_peer_id_t id, const char* filename);
|
2015-10-20 12:38:40 +02:00
|
|
|
|
2015-11-16 09:12:18 +01:00
|
|
|
int p2tgl_imgstore_add_with_id_raw (const unsigned char *raw_rgba, unsigned width, unsigned height);
|
2015-10-08 17:28:48 +02:00
|
|
|
#ifdef HAVE_LIBWEBP
|
|
|
|
int p2tgl_imgstore_add_with_id_webp (const char *filename);
|
|
|
|
#endif
|
|
|
|
|
2014-11-16 16:33:27 +01:00
|
|
|
#endif
|