forked from JaskaranSM/megasdkgo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuncheader.h
43 lines (38 loc) · 799 Bytes
/
funcheader.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
42
43
#ifndef FUNCHEADER_H
#define FUNCHEADER_H
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
struct DownloadInfo
{
const char *name;
int64_t completedLength;
int64_t totalLength;
int64_t speed;
int state;
const char *gid;
int errorCode;
const char* errorString;
};
struct AddDownloadResp
{
const char *gid;
const char *errorString;
int errorCode;
};
struct LoginResp
{
int errorCode;
const char* errorString;
};
int initmega(const char* API_KEY);
struct LoginResp* login(const char* email, const char* password);
struct AddDownloadResp* addDownload(const char* link,const char* dir);
int cancelDownload(const char* gid);
struct DownloadInfo* getDownloadByGid(const char* gid);
#ifdef __cplusplus
}
#endif
#endif