-
Notifications
You must be signed in to change notification settings - Fork 5
/
global.h
100 lines (94 loc) · 1.82 KB
/
global.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#pragma once
#include <QString>
const uint PROGRAMBUILDVER = 0xD0000060;
const QString PROGRAMVERSION = "0.6.0";
struct USERINFO
{
QString id;
QString name;
};
struct PLAYLISTINFO
{
QString id;
QString name;
QString coverImgUrl;
QString trackCount;
QString playCount;
QString bookCount;
QString description;
USERINFO creatorInfo;
};
struct ALBUMINFO
{
QString id;
QString name;
QString description;
std::vector<USERINFO> artists;
QString blurPicUrl;
};
struct LYRIC
{
bool isHaveLver = true;
bool isHaveTver = true;
bool isHaveRver = true;
QString lver;
QString tver;
QString rver;
int needDownload = 0;//0=不附加下载,1/2/3=附加下载l/t/r,4=附加下载全部
};
struct MVINFO
{
bool isAvailable = true;
QString title;
QString url;
};
struct SONGINFO
{
bool isLocalOnly;
bool isHaveLocal;
bool isFee;
QString localPath;
int32_t localCreateTimeSec;
QString id;
QString name;
QString duration;
QString mvid;
MVINFO mv;
QString blurPicUrl;
LYRIC lyrics;
std::vector<USERINFO> artists;
};
struct TIME
{
int h;
short m;
short s;
short ms;
};
struct WORKSTATUS
{
//code=-3 无法下载文件主体或下载中断
//code=-2 无法打开保存文件
//code=-1 无法获取总大小/无法打开源文件
//code=0 等待开始
//code=1 已经调用下载/已经开始转换
//code=2 已经开始下载(已经获取到总大小)
//code=3 正在下载进程(已经下载了一部分)/正在转换
//code=200 成功完成
int code;
//type=1 下载
//type=2 转换
int type;
long long totalSize;
long long finishedSize;
int speed;//平均速度
int speed_ain;//参与取平均的项数
};
struct WORKINFO
{
//type=1 单曲
int type;
QString savePath;
SONGINFO songInfo;
WORKSTATUS workStatus;
};