Repository cleanup and housekeeping

This commit is contained in:
mjentsch 2015-03-12 01:47:57 +01:00
parent 1b7dd971d8
commit b67c4115ff
27 changed files with 48 additions and 27 deletions

View file

@ -6,7 +6,7 @@ Telegram-purple is a Libpurple plugin that adds support for the Telegram messeng
Build
-----
Below, you will find instructions of how to build the libpurple protocol plugin. If you just want to use the plugin in Adium, [download precompiled packages here.](https://github.com/majn/telegram-purple/releases)
Below, you will find instructions on how to build the libpurple protocol plugin. If you just want to use the plugin in Adium, [download precompiled packages here.](https://github.com/majn/telegram-purple/releases)
#### 1. Clone
@ -14,6 +14,7 @@ This repository has submodules, so you need to clone recursively
git clone --recursive https://github.com/majn/telegram-purple
cd telegram-purple
#### 2. Fetch all dependencies
@ -40,6 +41,16 @@ This repository has submodules, so you need to clone recursively
sudo make install
Pulling Updates
---------------
This repository contains submodules and just a simple pull won't be enough to update all submodule files. Pull new changes with:
git pull
git submodule update --recursive
Usage
-----

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#include <stdio.h>
#include <stdarg.h>

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#include <stdarg.h>

View file

@ -12,6 +12,8 @@
* 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
*
* Copyright Matthias Jentsch 2014-2015
*/
#import <Cocoa/Cocoa.h>

View file

@ -12,6 +12,8 @@
* 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
*
* Copyright Matthias Jentsch 2014-2015
*/
#import "AdiumTelegramAccount.h"

View file

@ -12,6 +12,8 @@
* 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
*
* Copyright Matthias Jentsch 2014-2015
*/
#import <Adium/AIPlugin.h>

View file

@ -12,6 +12,8 @@
* 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
*
* Copyright Matthias Jentsch 2014-2015
*/
#ifdef HAVE_CONFIG_H

View file

@ -12,6 +12,8 @@
* 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
*
* Copyright Matthias Jentsch 2014-2015
*/
#import <Foundation/Foundation.h>

View file

@ -12,6 +12,8 @@
* 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
*
* Copyright Matthias Jentsch 2014-2015
*/
#import "TelegramService.h"

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014
Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015
*/
#define _GNU_SOURCE
#include <stdlib.h>

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014
Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015
*/
#ifndef __TELEGRAM_BASE_H__
#define __TELEGRAM_BASE_H__

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014
Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015
*/
#ifdef HAVE_CONFIG_H
@ -539,8 +539,7 @@ static int tgprpl_send_im (PurpleConnection * gc, const char *who, const char *m
*/
tgl_peer_t *peer = find_peer_by_name (conn->TLS, who);
if (peer) {
if (tgl_get_peer_type(peer->id) == TGL_PEER_ENCR_CHAT && peer->encr_chat.state != sc_ok) {
if (tgl_get_peer_type (peer->id) == TGL_PEER_ENCR_CHAT && peer->encr_chat.state != sc_ok) {
warning ("secret chat not ready for sending messages or deleted");
return -1;
}
@ -838,8 +837,7 @@ static void tgprpl_init (PurplePlugin *plugin) {
_telegram_protocol = plugin;
}
static GList *tgprpl_actions(PurplePlugin * plugin, gpointer context) {
// return possible actions (See Libpurple doc)
static GList *tgprpl_actions (PurplePlugin * plugin, gpointer context) {
return (GList *)NULL;
}

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014
Copyright Matthias Jentsch, Vitaly Valtman, Christopher Althaus, Markus Endres 2014-2015
*/
#ifndef __TG_PURPLE_H__
#define __TG_PURPLE_H__

View file

@ -98,7 +98,8 @@ void p2tgl_got_chat_left (struct tgl_state *TLS, tgl_peer_id_t chat) {
serv_got_chat_left(tg_get_conn(TLS), tgl_get_peer_id(chat));
}
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) {
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) {
char *name = p2tgl_peer_strdup_id (who);
serv_got_chat_in (tg_get_conn(TLS), tgl_get_peer_id (chat), name, flags, message, when);

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#ifndef __telegram_adium__purple2tgl__
#define __telegram_adium__purple2tgl__

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#include "tgp-chat.h"

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#ifndef __telegram_adium__tgp_chat__

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#include "tgp-utils.h"
@ -100,7 +100,7 @@ static gboolean tgprpl_xfer_upload_progress (gpointer _data) {
purple_xfer_set_bytes_sent (X, conn->TLS->cur_downloaded_bytes);
purple_xfer_update_progress (X);
debug ("PURPLE_XFER_RECEIVER progress %d / %d", conn->TLS->cur_downloaded_bytes, conn->TLS->cur_downloading_bytes);
debug ("PURPLE_XFER_RECEIVE progress %d / %d", conn->TLS->cur_downloaded_bytes, conn->TLS->cur_downloading_bytes);
if (conn->TLS->cur_downloading_bytes == conn->TLS->cur_downloaded_bytes) {
data->timer = 0;
return FALSE;

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#ifndef __telegram_adium__tgp_ft__

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#include <assert.h>
@ -379,7 +379,6 @@ void tgp_msg_recv (struct tgl_state *TLS, struct tgl_message *M)
}
if (M->media.type == tgl_message_media_geo) {
C->done = FALSE;
}
if (M->media.type == tgl_message_media_photo_encr) {

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#ifndef __telegram_adium__tgp_msg__

View file

@ -15,7 +15,7 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright Vitaly Valtman 2013-2014
Copyright Vitaly Valtman 2013-2015
*/
#ifdef HAVE_CONFIG_H

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#include "tgp-structs.h"

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#ifndef __telegram_adium__tgp_data__

View file

@ -15,7 +15,7 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright Vitaly Valtman 2013-2014
Copyright Vitaly Valtman 2013-2015
*/
#include <tgl.h>
#include <stdlib.h>

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#include "tgp-utils.h"

View file

@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
Copyright Matthias Jentsch 2014
Copyright Matthias Jentsch 2014-2015
*/
#ifndef __telegram_adium__tgp_util__
#define __telegram_adium__tgp_util__