Fixed licenses. libtgl is now distributed under LGPL 2.1+
This commit is contained in:
parent
5064b17d69
commit
e57b7064bb
@ -1,3 +1,23 @@
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 2014
|
||||
*/
|
||||
|
||||
int skip_double (void) {
|
||||
if (in_ptr + 2 <= in_end) {
|
||||
in_ptr += 2;
|
||||
|
19
auto.h
19
auto.h
@ -1,3 +1,22 @@
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 2014
|
||||
*/
|
||||
#ifndef __AUTO_H__
|
||||
#define __AUTO_H__
|
||||
|
||||
|
25
binlog.c
25
binlog.c
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
25
binlog.h
25
binlog.h
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
#ifndef __BINLOG_H__
|
||||
#define __BINLOG_H__
|
||||
|
23
generate.c
23
generate.c
@ -1,3 +1,26 @@
|
||||
/*
|
||||
This file is part of tgl-libary/generate
|
||||
|
||||
Tgl-library/generate 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.
|
||||
|
||||
Tgl-library/generate 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 tgl-library/generate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright Vitaly Valtman 2014
|
||||
|
||||
It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)
|
||||
Copyright 2012-2013 Vkontakte Ltd
|
||||
2012-2013 Vitaliy Valtman
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <execinfo.h>
|
||||
|
23
generate.h
23
generate.h
@ -1,3 +1,26 @@
|
||||
/*
|
||||
This file is part of tgl-libary/generate
|
||||
|
||||
Tgl-library/generate 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.
|
||||
|
||||
Tgl-library/generate 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 tgl-library/generate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright Vitaly Valtman 2014
|
||||
|
||||
It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)
|
||||
Copyright 2012-2013 Vkontakte Ltd
|
||||
2012-2013 Vitaliy Valtman
|
||||
*/
|
||||
|
||||
#ifndef __GENERATE_H__
|
||||
#define __GENERATE_H__
|
||||
|
||||
|
10
interface.c
10
interface.c
@ -1,20 +1,20 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
This file is part of telegram-cli.
|
||||
|
||||
Telegram-client is free software: you can redistribute it and/or modify
|
||||
Telegram-cli 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.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
Telegram-cli 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 telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this telegram-cli. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright Vitaly Valtman 2013
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
10
interface.h
10
interface.h
@ -1,20 +1,20 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
This file is part of telegram-cli.
|
||||
|
||||
Telegram-client is free software: you can redistribute it and/or modify
|
||||
Telegram-cli 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.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
Telegram-cli 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 telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this telegram-cli. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright Vitaly Valtman 2013
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
#ifndef __INTERFACE_H__
|
||||
#define __INTERFACE_H__
|
||||
|
10
loop.c
10
loop.c
@ -1,20 +1,20 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
This file is part of telegram-cli.
|
||||
|
||||
Telegram-client is free software: you can redistribute it and/or modify
|
||||
Telegram-cli 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.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
Telegram-cli 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 telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this telegram-cli. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright Vitaly Valtman 2013
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
10
loop.h
10
loop.h
@ -1,20 +1,20 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
This file is part of telegram-cli.
|
||||
|
||||
Telegram-client is free software: you can redistribute it and/or modify
|
||||
Telegram-cli 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.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
Telegram-cli 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 telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this telegram-cli. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright Vitaly Valtman 2013
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
#ifndef __LOOP_H__
|
||||
#define __LOOP_H__
|
||||
|
19
lua-tg.c
19
lua-tg.c
@ -1,3 +1,22 @@
|
||||
/*
|
||||
This file is part of telegram-cli.
|
||||
|
||||
Telegram-cli 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.
|
||||
|
||||
Telegram-cli 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 telegram-cli. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
18
lua-tg.h
18
lua-tg.h
@ -1,3 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-cli.
|
||||
|
||||
Telegram-cli 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.
|
||||
|
||||
Telegram-cli 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 telegram-cli. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
#ifndef __LUA_TG_H__
|
||||
#define __LUA_TG_H__
|
||||
|
||||
|
13
main.c
13
main.c
@ -1,20 +1,20 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
This file is part of telegram-cli.
|
||||
|
||||
Telegram-client is free software: you can redistribute it and/or modify
|
||||
Telegram-cli 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.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
Telegram-cli 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 telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this telegram-cli. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright Vitaly Valtman 2013
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -519,6 +519,9 @@ int main (int argc, char **argv) {
|
||||
running_for_first_time ();
|
||||
parse_config ();
|
||||
|
||||
tgl_set_rsa_key ("/etc/ " PROG_NAME "/server.pub");
|
||||
tgl_set_rsa_key ("tg-server.pub");
|
||||
|
||||
|
||||
get_terminal_attributes ();
|
||||
|
||||
|
@ -1,21 +1,22 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 Nikolay Durov, Andrey Lopatin 2012-2013
|
||||
Copyright Vitaly Valtman 2013
|
||||
Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -45,7 +46,7 @@
|
||||
#include <netinet/tcp.h>
|
||||
#include <poll.h>
|
||||
|
||||
#include "telegram.h"
|
||||
//#include "telegram.h"
|
||||
#include "include.h"
|
||||
#include "queries.h"
|
||||
//#include "loop.h"
|
||||
@ -1086,21 +1087,26 @@ static int rpc_close (struct connection *c) {
|
||||
|
||||
#define RANDSEED_PASSWORD_FILENAME NULL
|
||||
#define RANDSEED_PASSWORD_LENGTH 0
|
||||
void tglmp_on_start (const char *key) {
|
||||
void tglmp_on_start (void) {
|
||||
tgl_prng_seed (RANDSEED_PASSWORD_FILENAME, RANDSEED_PASSWORD_LENGTH);
|
||||
|
||||
if (key) {
|
||||
int i;
|
||||
int ok = 0;
|
||||
for (i = 0; i < tgl_state.rsa_key_num; i++) {
|
||||
char *key = tgl_state.rsa_key_list[i];
|
||||
if (rsa_load_public_key (key) < 0) {
|
||||
perror ("rsa_load_public_key");
|
||||
exit (1);
|
||||
}
|
||||
} else {
|
||||
if (rsa_load_public_key (TG_SERVER_PUBKEY_FILENAME) < 0
|
||||
&& rsa_load_public_key ("/etc/" PROG_NAME "/server.pub") < 0) {
|
||||
perror ("rsa_load_public_key");
|
||||
exit (1);
|
||||
vlogprintf (E_WARNING, "Can not load key %s\n", key);
|
||||
} else {
|
||||
ok = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ok) {
|
||||
vlogprintf (E_ERROR, "No pubic keys found\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
pk_fingerprint = tgl_do_compute_rsa_key_fingerprint (pubKey);
|
||||
}
|
||||
|
||||
|
@ -1,21 +1,22 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 Nikolay Durov, Andrey Lopatin 2012-2013
|
||||
Copyright Vitaly Valtman 2013
|
||||
Vitaly Valtman 2013-2014
|
||||
*/
|
||||
#ifndef __MTPROTO_CLIENT_H__
|
||||
#define __MTPROTO_CLIENT_H__
|
||||
@ -51,6 +52,6 @@ int tglmp_check_DH_params (BIGNUM *p, int g);
|
||||
struct tgl_dc *tglmp_alloc_dc (int id, char *ip, int port);
|
||||
|
||||
void tgln_insert_msg_id (struct tgl_session *S, long long id);
|
||||
void tglmp_on_start (const char *key);
|
||||
void tglmp_on_start (void);
|
||||
void tgl_dc_authorize (struct tgl_dc *DC);
|
||||
#endif
|
||||
|
@ -1,21 +1,22 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 Nikolay Durov, Andrey Lopatin 2012-2013
|
||||
Copyright Vitaly Valtman 2013
|
||||
Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -1,21 +1,22 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 Nikolay Durov, Andrey Lopatin 2012-2013
|
||||
Copyright Vitaly Valtman 2013
|
||||
Vitaly Valtman 2013-2014
|
||||
*/
|
||||
#ifndef __MTPROTO_COMMON_H__
|
||||
#define __MTPROTO_COMMON_H__
|
||||
|
25
net.c
25
net.c
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
25
net.h
25
net.h
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
#ifndef __NET_H__
|
||||
#define __NET_H__
|
||||
|
25
no-preview.h
25
no-preview.h
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
// Just sample jpg file 90x90
|
||||
|
27
queries.c
27
queries.c
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -37,7 +38,7 @@
|
||||
#include "queries.h"
|
||||
#include "tree.h"
|
||||
#include "mtproto-common.h"
|
||||
#include "telegram.h"
|
||||
//#include "telegram.h"
|
||||
#include "loop.h"
|
||||
#include "structures.h"
|
||||
//#include "interface.h"
|
||||
|
25
queries.h
25
queries.h
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
//#include "net.h"
|
||||
#ifndef __QUERIES_H__
|
||||
|
30
structures.c
30
structures.c
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -25,7 +26,7 @@
|
||||
#include <string.h>
|
||||
#include "structures.h"
|
||||
#include "mtproto-common.h"
|
||||
#include "telegram.h"
|
||||
//#include "telegram.h"
|
||||
#include "tree.h"
|
||||
#include "loop.h"
|
||||
#include <openssl/aes.h>
|
||||
@ -38,6 +39,9 @@
|
||||
|
||||
#define sha1 SHA1
|
||||
|
||||
#ifndef TGL_MAX_PEER_NUM
|
||||
# define TGL_MAX_PEER_NUM 100000
|
||||
#endif
|
||||
|
||||
static int id_cmp (struct tgl_message *M1, struct tgl_message *M2);
|
||||
#define peer_cmp(a,b) (tgl_cmp_peer_id (a->id, b->id))
|
||||
|
25
structures.h
25
structures.h
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
#ifndef __STRUCTURES_H__
|
||||
#define __STRUCTURES_H__
|
||||
|
11
telegram.h
11
telegram.h
@ -1,22 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
This file is part of telegram-cli.
|
||||
|
||||
Telegram-client is free software: you can redistribute it and/or modify
|
||||
Telegram-cli 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.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
Telegram-cli 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 telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this telegram-cli. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright Vitaly Valtman 2013
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
#define TGL_MAX_PEER_NUM 100000
|
||||
|
||||
#ifndef PROG_NAME
|
||||
#define PROG_NAME "telegram-cli"
|
||||
|
19
tgl-fetch.h
19
tgl-fetch.h
@ -1,3 +1,22 @@
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 2014
|
||||
*/
|
||||
#ifndef __TGL_FETCH_H__
|
||||
#define __TGL_FETCH_H__
|
||||
|
||||
|
20
tgl-inner.h
20
tgl-inner.h
@ -1,3 +1,23 @@
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 2014
|
||||
*/
|
||||
|
||||
#ifndef __TGL_INNER_H__
|
||||
#define __TGL_INNER_H__
|
||||
|
||||
|
19
tgl-layout.h
19
tgl-layout.h
@ -1,3 +1,22 @@
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 2014
|
||||
*/
|
||||
#ifndef __TGL_LAYOUT_H__
|
||||
#define __TGL_LAYOUT_H__
|
||||
|
||||
|
25
tgl.c
25
tgl.c
@ -1,3 +1,23 @@
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
@ -36,7 +56,8 @@ void tgl_set_callback (struct tgl_update_callback *cb) {
|
||||
}
|
||||
|
||||
void tgl_set_rsa_key (const char *key) {
|
||||
tgl_state.rsa_key = tstrdup (key);
|
||||
assert (tgl_state.rsa_key_num < TGL_MAX_RSA_KEYS_NUM);
|
||||
tgl_state.rsa_key_list[tgl_state.rsa_key_num ++] = tstrdup (key);
|
||||
}
|
||||
|
||||
void tgl_init (void) {
|
||||
@ -48,7 +69,7 @@ void tgl_init (void) {
|
||||
if (!tgl_state.callback.create_print_name) {
|
||||
tgl_state.callback.create_print_name = tgls_default_create_print_name;
|
||||
}
|
||||
tglmp_on_start (tgl_state.rsa_key);
|
||||
tglmp_on_start ();
|
||||
}
|
||||
|
||||
int tgl_authorized_dc (struct tgl_dc *DC) {
|
||||
|
23
tgl.h
23
tgl.h
@ -1,3 +1,22 @@
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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 2014
|
||||
*/
|
||||
#ifndef __TGL_H__
|
||||
#define __TGL_H__
|
||||
|
||||
@ -95,6 +114,7 @@ struct tgl_net_methods {
|
||||
|
||||
#define TGL_LOCK_DIFF 1
|
||||
|
||||
#define TGL_MAX_RSA_KEYS_NUM 10
|
||||
// Do not modify this structure, unless you know what you do
|
||||
struct tgl_state {
|
||||
int our_id; // ID of logged in user
|
||||
@ -130,7 +150,8 @@ struct tgl_state {
|
||||
struct tgl_net_methods *net_methods;
|
||||
struct event_base *ev_base;
|
||||
|
||||
char *rsa_key;
|
||||
char *rsa_key_list[TGL_MAX_RSA_KEYS_NUM];
|
||||
int rsa_key_num;
|
||||
struct bignum_ctx *BN_ctx;
|
||||
|
||||
struct tgl_allocator allocator;
|
||||
|
14
tl-parser.c
14
tl-parser.c
@ -1,25 +1,25 @@
|
||||
/*
|
||||
This file is part of VK/KittenPHP-DB-Engine.
|
||||
This file is part of tgl-libary/tlc
|
||||
|
||||
VK/KittenPHP-DB-Engine is free software: you can redistribute it and/or modify
|
||||
Tgl-library/tlc 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.
|
||||
|
||||
VK/KittenPHP-DB-Engine is distributed in the hope that it will be useful,
|
||||
Tgl-library/tlc 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 VK/KittenPHP-DB-Engine. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this tgl-library/tlc. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This program is released under the GPL with the additional exemption
|
||||
that compiling, linking, and/or using OpenSSL is allowed.
|
||||
You are free to remove this exemption from derived works.
|
||||
Copyright Vitaly Valtman 2014
|
||||
|
||||
It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)
|
||||
Copyright 2012-2013 Vkontakte Ltd
|
||||
2012-2013 Vitaliy Valtman
|
||||
|
||||
*/
|
||||
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
14
tl-parser.h
14
tl-parser.h
@ -1,25 +1,25 @@
|
||||
/*
|
||||
This file is part of VK/KittenPHP-DB-Engine.
|
||||
This file is part of tgl-libary/tlc
|
||||
|
||||
VK/KittenPHP-DB-Engine is free software: you can redistribute it and/or modify
|
||||
Tgl-library/tlc 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.
|
||||
|
||||
VK/KittenPHP-DB-Engine is distributed in the hope that it will be useful,
|
||||
Tgl-library/tlc 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 VK/KittenPHP-DB-Engine. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this tgl-library/tlc. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This program is released under the GPL with the additional exemption
|
||||
that compiling, linking, and/or using OpenSSL is allowed.
|
||||
You are free to remove this exemption from derived works.
|
||||
Copyright Vitaly Valtman 2014
|
||||
|
||||
It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)
|
||||
Copyright 2012-2013 Vkontakte Ltd
|
||||
2012-2013 Vitaliy Valtman
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __TL_PARSER_NEW_H__
|
||||
|
14
tlc.c
14
tlc.c
@ -1,25 +1,25 @@
|
||||
/*
|
||||
This file is part of VK/KittenPHP-DB-Engine.
|
||||
This file is part of tgl-libary/tlc
|
||||
|
||||
VK/KittenPHP-DB-Engine is free software: you can redistribute it and/or modify
|
||||
Tgl-library/tlc 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.
|
||||
|
||||
VK/KittenPHP-DB-Engine is distributed in the hope that it will be useful,
|
||||
Tgl-library/tlc 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 VK/KittenPHP-DB-Engine. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this tgl-library/tlc. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This program is released under the GPL with the additional exemption
|
||||
that compiling, linking, and/or using OpenSSL is allowed.
|
||||
You are free to remove this exemption from derived works.
|
||||
Copyright Vitaly Valtman 2014
|
||||
|
||||
It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)
|
||||
Copyright 2012-2013 Vkontakte Ltd
|
||||
2012-2013 Vitaliy Valtman
|
||||
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
25
tools.c
25
tools.c
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
25
tree.h
25
tree.h
@ -1,20 +1,21 @@
|
||||
/*
|
||||
This file is part of telegram-client.
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
Telegram-client 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 library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
Telegram-client is distributed in the hope that it will be useful,
|
||||
This library 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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
Copyright Vitaly Valtman 2013-2014
|
||||
*/
|
||||
#ifndef __TREE_H__
|
||||
#define __TREE_H__
|
||||
|
19
updates.c
19
updates.c
@ -1,3 +1,22 @@
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
*/
|
||||
#include "tgl.h"
|
||||
#include "updates.h"
|
||||
#include "mtproto-common.h"
|
||||
|
20
updates.h
20
updates.h
@ -1,3 +1,23 @@
|
||||
/*
|
||||
This file is part of tgl-library
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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
|
||||
*/
|
||||
|
||||
#ifndef __UPDATES_H__
|
||||
#define __UPDATES_H__
|
||||
struct connection;
|
||||
|
Loading…
Reference in New Issue
Block a user