Fix includes and remove obsolete code

This commit is contained in:
mjentsch 2014-10-05 12:25:23 +02:00
parent feff8675db
commit 4b7b1e0010
6 changed files with 7 additions and 12 deletions

View file

@ -1,14 +1,12 @@
#
# Telegram Flags
#
VERSION=0.2.0
BUILD=1
srcdir=.
CFLAGS=-g
LDFLAGS=-L/usr/local/lib
CPPFLAGS=-I/usr/local/include
DEFS=-DTG_VERSION=\"${VERSION}\" -DTG_BUILD=\"${BUILD}\"
DEFS=
COMPILE_FLAGS=${CFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Wextra -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb
EXTRA_LIBS=-lcrypto -lz -lm
LOCAL_LDFLAGS=-rdynamic -ggdb ${EXTRA_LIBS}

View file

@ -988,7 +988,7 @@ void work_update (struct mtproto_connection *self, long long msg_id UU) {
char *f = fetch_str (self, l1);
int l2 = prefetch_strlen (self);
char *l = fetch_str (self, l2);
struct user *U = &UC->user;
struct tgl_user *U = &UC->user;
bl_do_set_user_real_name (self->bl, self, U, f, l1, l, l2);
//print_start ();
//push_color (COLOR_YELLOW);
@ -1012,7 +1012,7 @@ void work_update (struct mtproto_connection *self, long long msg_id UU) {
peer_t *UC = user_chat_get (bl, user_id);
fetch_date (self);
if (UC && (UC->flags & FLAG_CREATED)) {
struct user *U = &UC->user;
struct tgl_user *U = &UC->user;
unsigned y = fetch_int (self);
long long photo_id;
struct file_location big;

View file

@ -549,11 +549,7 @@ void on_new_user_status(struct telegram *tg, void *peer)
{
telegram_conn *conn = tg->extra;
peer_t *p = peer;
// purple_debug_info(PLUGIN_ID, "New User Status: %s\n", peer->user.status.online);
// TODO: this should probably be freed again somwhere
char *who = g_strdup_printf("%d", get_peer_id(p->user.id));
PurpleAccount *account = purple_connection_get_account(conn->gc);
if (p->user.status.online == 1)
purple_prpl_got_user_status(account, who, "available", "message", "", NULL);

View file

@ -48,6 +48,7 @@
#include "binlog.h"
#include "telegram.h"
#include "msglog.h"
#include "purple-plugin/telegram-purple.h"
#define sha1 SHA1

View file

@ -39,7 +39,7 @@ void event_peer_allocated(struct telegram *instance, void *peer)
/*
* Peer user fetched full
*/
void event_user_info_received_handler(struct telegram *instance, struct user *peer, int show_info)
void event_user_info_received_handler(struct telegram *instance, struct tgl_user *peer, int show_info)
{
if (instance->config->on_user_info_received_handler) {
instance->config->on_user_info_received_handler (instance, peer, show_info);

View file

@ -179,7 +179,7 @@ struct telegram_config {
* A callback function that is called when a peer user info was received. This is useful
* for populating the GUI with new user photos.
*/
void (*on_user_info_received_handler) (struct telegram *instance, struct user *peer, int showInfo);
void (*on_user_info_received_handler) (struct telegram *instance, struct tgl_user *peer, int showInfo);
/**
* A callback function that is called when a download is completed. This is useful
@ -404,7 +404,7 @@ void event_peer_allocated(struct telegram *instance, void *peer);
/*
* Load known users and chats on connect
*/
void event_user_info_received_handler(struct telegram *instance, struct user *peer, int showInfo);
void event_user_info_received_handler(struct telegram *instance, struct tgl_user *peer, int showInfo);
/*
* Load known users and chats on connect