Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
e57b7064
Commit
e57b7064
authored
Aug 22, 2014
by
vvaltman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed licenses. libtgl is now distributed under LGPL 2.1+
parent
5064b17d
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
535 additions
and
249 deletions
+535
-249
auto-static.c
auto-static.c
+20
-0
auto.h
auto.h
+19
-0
binlog.c
binlog.c
+13
-12
binlog.h
binlog.h
+13
-12
generate.c
generate.c
+23
-0
generate.h
generate.h
+23
-0
interface.c
interface.c
+5
-5
interface.h
interface.h
+5
-5
loop.c
loop.c
+5
-5
loop.h
loop.h
+5
-5
lua-tg.c
lua-tg.c
+19
-0
lua-tg.h
lua-tg.h
+18
-0
main.c
main.c
+8
-5
mtproto-client.c
mtproto-client.c
+29
-23
mtproto-client.h
mtproto-client.h
+14
-13
mtproto-common.c
mtproto-common.c
+13
-12
mtproto-common.h
mtproto-common.h
+13
-12
net.c
net.c
+13
-12
net.h
net.h
+13
-12
no-preview.h
no-preview.h
+13
-12
queries.c
queries.c
+14
-13
queries.h
queries.h
+13
-12
structures.c
structures.c
+17
-13
structures.h
structures.h
+13
-12
telegram.h
telegram.h
+5
-6
tgl-fetch.h
tgl-fetch.h
+19
-0
tgl-inner.h
tgl-inner.h
+20
-0
tgl-layout.h
tgl-layout.h
+19
-0
tgl.c
tgl.c
+23
-2
tgl.h
tgl.h
+22
-1
tl-parser.c
tl-parser.c
+7
-7
tl-parser.h
tl-parser.h
+7
-7
tlc.c
tlc.c
+7
-7
tools.c
tools.c
+13
-12
tree.h
tree.h
+13
-12
updates.c
updates.c
+19
-0
updates.h
updates.h
+20
-0
No files found.
auto-static.c
View file @
e57b7064
/*
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
)
{
int
skip_double
(
void
)
{
if
(
in_ptr
+
2
<=
in_end
)
{
if
(
in_ptr
+
2
<=
in_end
)
{
in_ptr
+=
2
;
in_ptr
+=
2
;
...
...
auto.h
View file @
e57b7064
/*
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__
#ifndef __AUTO_H__
#define __AUTO_H__
#define __AUTO_H__
...
...
binlog.c
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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
#ifdef HAVE_CONFIG_H
...
...
binlog.h
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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__
#ifndef __BINLOG_H__
#define __BINLOG_H__
#define __BINLOG_H__
...
...
generate.c
View file @
e57b7064
/*
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 <stdio.h>
#include <signal.h>
#include <signal.h>
#include <execinfo.h>
#include <execinfo.h>
...
...
generate.h
View file @
e57b7064
/*
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__
#ifndef __GENERATE_H__
#define __GENERATE_H__
#define __GENERATE_H__
...
...
interface.c
View file @
e57b7064
/*
/*
This file is part of telegram-cli
ent
.
This file is part of telegram-cli.
Telegram-cli
ent
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
Telegram-cli
ent
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
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this telegram-cli
ent
. 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
#ifdef HAVE_CONFIG_H
...
...
interface.h
View file @
e57b7064
/*
/*
This file is part of telegram-cli
ent
.
This file is part of telegram-cli.
Telegram-cli
ent
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
Telegram-cli
ent
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
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this telegram-cli
ent
. 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__
#ifndef __INTERFACE_H__
#define __INTERFACE_H__
#define __INTERFACE_H__
...
...
loop.c
View file @
e57b7064
/*
/*
This file is part of telegram-cli
ent
.
This file is part of telegram-cli.
Telegram-cli
ent
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
Telegram-cli
ent
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
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this telegram-cli
ent
. 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
#ifdef HAVE_CONFIG_H
...
...
loop.h
View file @
e57b7064
/*
/*
This file is part of telegram-cli
ent
.
This file is part of telegram-cli.
Telegram-cli
ent
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
Telegram-cli
ent
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
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this telegram-cli
ent
. 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__
#ifndef __LOOP_H__
#define __LOOP_H__
#define __LOOP_H__
...
...
lua-tg.c
View file @
e57b7064
/*
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
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
#endif
#endif
...
...
lua-tg.h
View file @
e57b7064
/*
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__
#ifndef __LUA_TG_H__
#define __LUA_TG_H__
#define __LUA_TG_H__
...
...
main.c
View file @
e57b7064
/*
/*
This file is part of telegram-cli
ent
.
This file is part of telegram-cli.
Telegram-cli
ent
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
Telegram-cli
ent
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
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this telegram-cli
ent
. 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
#ifdef HAVE_CONFIG_H
...
@@ -519,6 +519,9 @@ int main (int argc, char **argv) {
...
@@ -519,6 +519,9 @@ int main (int argc, char **argv) {
running_for_first_time
();
running_for_first_time
();
parse_config
();
parse_config
();
tgl_set_rsa_key
(
"/etc/ "
PROG_NAME
"/server.pub"
);
tgl_set_rsa_key
(
"tg-server.pub"
);
get_terminal_attributes
();
get_terminal_attributes
();
...
...
mtproto-client.c
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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 Nikolay Durov, Andrey Lopatin 2012-2013
Copyright Vitaly Valtman 2013
Vitaly Valtman 2013-2014
*/
*/
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
...
@@ -45,7 +46,7 @@
...
@@ -45,7 +46,7 @@
#include <netinet/tcp.h>
#include <netinet/tcp.h>
#include <poll.h>
#include <poll.h>
#include "telegram.h"
//
#include "telegram.h"
#include "include.h"
#include "include.h"
#include "queries.h"
#include "queries.h"
//#include "loop.h"
//#include "loop.h"
...
@@ -1086,21 +1087,26 @@ static int rpc_close (struct connection *c) {
...
@@ -1086,21 +1087,26 @@ static int rpc_close (struct connection *c) {
#define RANDSEED_PASSWORD_FILENAME NULL
#define RANDSEED_PASSWORD_FILENAME NULL
#define RANDSEED_PASSWORD_LENGTH 0
#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
);
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
)
{
if
(
rsa_load_public_key
(
key
)
<
0
)
{
perror
(
"rsa_load_public_key"
);
vlogprintf
(
E_WARNING
,
"Can not load key %s
\n
"
,
key
);
exit
(
1
);
}
else
{
}
ok
=
1
;
}
else
{
break
;
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
);
}
}
}
}
if
(
!
ok
)
{
vlogprintf
(
E_ERROR
,
"No pubic keys found
\n
"
);
exit
(
1
);
}
pk_fingerprint
=
tgl_do_compute_rsa_key_fingerprint
(
pubKey
);
pk_fingerprint
=
tgl_do_compute_rsa_key_fingerprint
(
pubKey
);
}
}
...
...
mtproto-client.h
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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 Nikolay Durov, Andrey Lopatin 2012-2013
Copyright Vitaly Valtman 2013
Vitaly Valtman 2013-2014
*/
*/
#ifndef __MTPROTO_CLIENT_H__
#ifndef __MTPROTO_CLIENT_H__
#define __MTPROTO_CLIENT_H__
#define __MTPROTO_CLIENT_H__
...
@@ -51,6 +52,6 @@ int tglmp_check_DH_params (BIGNUM *p, int g);
...
@@ -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
);
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
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
);
void
tgl_dc_authorize
(
struct
tgl_dc
*
DC
);
#endif
#endif
mtproto-common.c
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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 Nikolay Durov, Andrey Lopatin 2012-2013
Copyright Vitaly Valtman 2013
Vitaly Valtman 2013-2014
*/
*/
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
...
...
mtproto-common.h
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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 Nikolay Durov, Andrey Lopatin 2012-2013
Copyright Vitaly Valtman 2013
Vitaly Valtman 2013-2014
*/
*/
#ifndef __MTPROTO_COMMON_H__
#ifndef __MTPROTO_COMMON_H__
#define __MTPROTO_COMMON_H__
#define __MTPROTO_COMMON_H__
...
...
net.c
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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
#ifdef HAVE_CONFIG_H
...
...
net.h
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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__
#ifndef __NET_H__
#define __NET_H__
#define __NET_H__
...
...
no-preview.h
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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
// Just sample jpg file 90x90
...
...
queries.c
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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
#ifdef HAVE_CONFIG_H
...
@@ -37,7 +38,7 @@
...
@@ -37,7 +38,7 @@
#include "queries.h"
#include "queries.h"
#include "tree.h"
#include "tree.h"
#include "mtproto-common.h"
#include "mtproto-common.h"
#include "telegram.h"
//
#include "telegram.h"
#include "loop.h"
#include "loop.h"
#include "structures.h"
#include "structures.h"
//#include "interface.h"
//#include "interface.h"
...
...
queries.h
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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"
//#include "net.h"
#ifndef __QUERIES_H__
#ifndef __QUERIES_H__
...
...
structures.c
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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
#ifdef HAVE_CONFIG_H
...
@@ -25,7 +26,7 @@
...
@@ -25,7 +26,7 @@
#include <string.h>
#include <string.h>
#include "structures.h"
#include "structures.h"
#include "mtproto-common.h"
#include "mtproto-common.h"
#include "telegram.h"
//
#include "telegram.h"
#include "tree.h"
#include "tree.h"
#include "loop.h"
#include "loop.h"
#include <openssl/aes.h>
#include <openssl/aes.h>
...
@@ -38,6 +39,9 @@
...
@@ -38,6 +39,9 @@
#define sha1 SHA1
#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
);
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))
#define peer_cmp(a,b) (tgl_cmp_peer_id (a->id, b->id))
...
...
structures.h
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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__
#ifndef __STRUCTURES_H__
#define __STRUCTURES_H__
#define __STRUCTURES_H__
...
...
telegram.h
View file @
e57b7064
/*
/*
This file is part of telegram-cli
ent
.
This file is part of telegram-cli.
Telegram-cli
ent
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
Telegram-cli
ent
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
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this telegram-cli
ent
. 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
#ifndef PROG_NAME
#define PROG_NAME "telegram-cli"
#define PROG_NAME "telegram-cli"
...
...
tgl-fetch.h
View file @
e57b7064
/*
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__
#ifndef __TGL_FETCH_H__
#define __TGL_FETCH_H__
#define __TGL_FETCH_H__
...
...
tgl-inner.h
View file @
e57b7064
/*
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__
#ifndef __TGL_INNER_H__
#define __TGL_INNER_H__
#define __TGL_INNER_H__
...
...
tgl-layout.h
View file @
e57b7064
/*
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__
#ifndef __TGL_LAYOUT_H__
#define __TGL_LAYOUT_H__
#define __TGL_LAYOUT_H__
...
...
tgl.c
View file @
e57b7064
/*
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
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
#endif
#endif
...
@@ -36,7 +56,8 @@ void tgl_set_callback (struct tgl_update_callback *cb) {
...
@@ -36,7 +56,8 @@ void tgl_set_callback (struct tgl_update_callback *cb) {
}
}
void
tgl_set_rsa_key
(
const
char
*
key
)
{
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
)
{
void
tgl_init
(
void
)
{
...
@@ -48,7 +69,7 @@ void tgl_init (void) {
...
@@ -48,7 +69,7 @@ void tgl_init (void) {
if
(
!
tgl_state
.
callback
.
create_print_name
)
{
if
(
!
tgl_state
.
callback
.
create_print_name
)
{
tgl_state
.
callback
.
create_print_name
=
tgls_default_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
)
{
int
tgl_authorized_dc
(
struct
tgl_dc
*
DC
)
{
...
...
tgl.h
View file @
e57b7064
/*
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__
#ifndef __TGL_H__
#define __TGL_H__
#define __TGL_H__
...
@@ -95,6 +114,7 @@ struct tgl_net_methods {
...
@@ -95,6 +114,7 @@ struct tgl_net_methods {
#define TGL_LOCK_DIFF 1
#define TGL_LOCK_DIFF 1
#define TGL_MAX_RSA_KEYS_NUM 10
// Do not modify this structure, unless you know what you do
// Do not modify this structure, unless you know what you do
struct
tgl_state
{
struct
tgl_state
{
int
our_id
;
// ID of logged in user
int
our_id
;
// ID of logged in user
...
@@ -130,7 +150,8 @@ struct tgl_state {
...
@@ -130,7 +150,8 @@ struct tgl_state {
struct
tgl_net_methods
*
net_methods
;
struct
tgl_net_methods
*
net_methods
;
struct
event_base
*
ev_base
;
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
bignum_ctx
*
BN_ctx
;
struct
tgl_allocator
allocator
;
struct
tgl_allocator
allocator
;
...
...
tl-parser.c
View file @
e57b7064
/*
/*
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
(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
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
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
Copyright Vitaly Valtman 2014
that compiling, linking, and/or using OpenSSL is allowed.
You are free to remove this exemption from derived works.
It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)
Copyright 2012-2013 Vkontakte Ltd
Copyright 2012-2013 Vkontakte Ltd
2012-2013 Vitaliy Valtman
2012-2013 Vitaliy Valtman
*/
*/
#define _FILE_OFFSET_BITS 64
#define _FILE_OFFSET_BITS 64
...
...
tl-parser.h
View file @
e57b7064
/*
/*
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
(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
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
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
Copyright Vitaly Valtman 2014
that compiling, linking, and/or using OpenSSL is allowed.
You are free to remove this exemption from derived works.
It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)
Copyright 2012-2013 Vkontakte Ltd
Copyright 2012-2013 Vkontakte Ltd
2012-2013 Vitaliy Valtman
2012-2013 Vitaliy Valtman
*/
*/
#ifndef __TL_PARSER_NEW_H__
#ifndef __TL_PARSER_NEW_H__
...
...
tlc.c
View file @
e57b7064
/*
/*
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
(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
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
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
Copyright Vitaly Valtman 2014
that compiling, linking, and/or using OpenSSL is allowed.
You are free to remove this exemption from derived works.
It is derivative work of VK/KittenPHP-DB-Engine (https://github.com/vk-com/kphp-kdb/)
Copyright 2012-2013 Vkontakte Ltd
Copyright 2012-2013 Vkontakte Ltd
2012-2013 Vitaliy Valtman
2012-2013 Vitaliy Valtman
*/
*/
#include <stdio.h>
#include <stdio.h>
...
...
tools.c
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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
#ifdef HAVE_CONFIG_H
...
...
tree.h
View file @
e57b7064
/*
/*
This file is part of t
elegram-client.
This file is part of t
gl-library
T
elegram-client is free software: you can redistribute it and/or modify
T
his library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by
modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 2 of the License, o
r
License as published by the Free Software Foundation; eithe
r
(at your option) any later version.
version 2.1 of the License, or
(at your option) any later version.
T
elegram-client
is distributed in the hope that it will be useful,
T
his library
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
GNU
General Public License for more details.
Lesser
General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public
along with this telegram-client. If not, see <http://www.gnu.org/licenses/>.
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__
#ifndef __TREE_H__
#define __TREE_H__
#define __TREE_H__
...
...
updates.c
View file @
e57b7064
/*
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 "tgl.h"
#include "updates.h"
#include "updates.h"
#include "mtproto-common.h"
#include "mtproto-common.h"
...
...
updates.h
View file @
e57b7064
/*
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__
#ifndef __UPDATES_H__
#define __UPDATES_H__
#define __UPDATES_H__
struct
connection
;
struct
connection
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment