-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathtd_c_client.h
41 lines (31 loc) · 1.02 KB
/
td_c_client.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// Copyright Aliaksei Levin ([email protected]), Arseny Smirnov ([email protected]) 2014-2025
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "td/telegram/td_tdc_api.h"
struct TdVectorInt *TdCreateObjectVectorInt(int size, int *data);
struct TdVectorLong *TdCreateObjectVectorLong(int size, long long *data);
struct TdVectorObject *TdCreateObjectVectorObject(int size, struct TdObject **data);
struct TdBytes TdCreateObjectBytes(unsigned char *data, int len);
struct TdRequest {
long long request_id;
struct TdFunction *function;
};
struct TdResponse {
long long request_id;
int client_id;
struct TdObject *object;
};
int TdCClientCreateId();
void TdCClientSend(int client_id, struct TdRequest request);
struct TdResponse TdCClientReceive(double timeout);
struct TdObject *TdCClientExecute(struct TdFunction *function);
#ifdef __cplusplus
}
#endif