Initial commit

This commit is contained in:
2026-07-09 11:27:59 +08:00
commit 3f1edda843
126 changed files with 34446 additions and 0 deletions
+325
View File
@@ -0,0 +1,325 @@
#ifndef ServerInnerH
#define ServerInnerH
#pragma once
//功能费定义(单位:音符)
#define PAY_BASIC 1 // 基本费
#define PAY_MIDICOMPOSE 20 // 伴奏MIDI
#define PAY_MIDITRANS 50 // 音频转MIDI
#define PAY_MULTIAUDIO 30 // 多音轨
#define PAY_MULTIFONT 80 // 多音色库
#define MAX_STYLE_NUM 80
#pragma pack (2)
//////////////////////////////////////////////////
//风格详细信息结构体 (兼容早期版本)
typedef struct tagStyleDetail0{
int size;
int idAuthor; //作者ID
int iTempo; //原速
short iTimesignature; //节拍 ( 0=4/4, 1=3/4, 2=2/4, 3=6/8 )
char nSegNum[4]; //伴奏/加花/前奏/尾奏个数
char aIntroBars[8]; //前奏小节数
char aEndingBars[8]; //尾奏小节数
char strStyleName[40]; //风格名称 UTF8
char strDescription[120];//风格描述 UTF8
char strAuthor[40]; //作者名称 UTF8
char type[6]; //风格分类
char progVar[4][3]; //伴奏主要乐器
char progIntro[4][3]; //前奏主要乐器
char progEnding[4][3]; //尾奏主要乐器
char chordRecom[8]; //推荐和声进行
tagStyleDetail0(){
size = sizeof(tagStyleDetail0);
idAuthor = iTempo = iTimesignature = 0;
memset( nSegNum, 0, sizeof(nSegNum) );
memset( aIntroBars, 0, sizeof(aIntroBars) );
memset( aEndingBars, 0, sizeof(aEndingBars) );
memset( strStyleName, 0, sizeof(strStyleName) );
memset( strDescription, 0, sizeof(strDescription) );
memset( strAuthor, 0, sizeof(strAuthor) );
memset( type, -1, sizeof(type) );
memset( progVar, -1, sizeof(progVar) );
memset( progIntro, -1, sizeof(progIntro) );
memset( progEnding, -1, sizeof(progEnding) );
memset( chordRecom, -1, sizeof(chordRecom) );
}
}TSTYLEDETAIL0, *PTSTYLEDETAIL0;
//风格信息结构体
typedef struct tagStyleInfo0{
UINT idStyle; //风格ID
int cost; //价格
int state; //状态
TSTYLEDETAIL0 detail; //详细信息
tagStyleInfo0(){
idStyle = 0;
cost = 0;
state = 0;
}
}TSTYLEINFO0, *PTSTYLEINFO0;
//账户信息结构体
typedef struct tAccountInfo1{
int size; //数据长度
UINT ID; //用户ID
UINT authority; //用户权限
int balance; //帐户余额(唱作音符)
int pops; //魅力值
int fans; //粉丝数
int songs; //歌曲数
int ownStyleNum; //已购买风格数
int arrStyleId[16]; //已购买风格ID数组
tAccountInfo1(){
memset( this, 0, sizeof(tAccountInfo1) );
size = 32;
};
}TACCOUNTINFO1, *PTACCOUNTINFO1;
//
/////////////////////////////////////////////////////////
//前向兼容网络消息
typedef struct {
UINT tLastUpdateDate;
DWORD dwVersionMS;
DWORD dwVersionLS;
} TVersionRequest0;
typedef struct {
UINT nAvailibleNum;
DWORD dwVersionMS; //最新版本号
DWORD dwVersionLS;
UINT tIssueDate;
UINT nFileSize;
UINT nDescribLen;
char strDescrib[MAX_DESCRIB_LENGTH];
} TVersionResponse0;
typedef struct {
DWORD dwVersionMS;
DWORD dwVersionLS;
} TVersionRequest1;
typedef struct {
DWORD dwVersionMS;
DWORD dwVersionLS;
char idDevice[6];
} TVersionRequest2;
typedef struct {
UINT idUser;
DWORD dwMMParam;
UINT nStyleNum;
UINT aIdStyles[MAX_STYLE_NUM];
} TVerifyRequest;
typedef struct {
DWORD dwMMParam;
UINT nStyleNum;
float fUserBalance;
float aStylePrices[MAX_STYLE_NUM*2];
} TVerifyResponse;
typedef struct {
UINT idUser;
WORD iapType; //应用内付费类型:0=个人账户,1=移动IAP
WORD nStyleNum;
UINT aIdStyles[MAX_STYLE_NUM];
} TPurchaseRequest;
typedef struct {
float fUserBalance;
} TPurchaseResponse;
typedef struct {
UINT iClientType;
UINT idUser;
char strQuestion[320];
} TQnASubmitRequest0;
typedef struct {
UINT idUser;
WORD wOperation;
WORD wStyleNum;
UINT aIdStyles[MAX_STYLE_NUM];
} TCheckPaymentRequest0;
typedef struct {
int nUserBalance;
int nPayment;
} TCheckPaymentResponse0;
typedef struct {
int nUserBalance;
int nPayment;
int aStyleCost[MAX_STYLE_NUM];
} TCheckPaymentResponse1;
typedef struct {
UINT idUser;
UINT dwMMParam;
WORD wOperation;
WORD wStyleNum;
UINT aIdStyles[MAX_STYLE_NUM];
} TPayRequest0;
typedef struct {
UINT dwMMParam;
int nUserBalance;
} TPayResponse0;
typedef struct {
char strName[32];
char strPassword[80];
} TLoginRequest0;
typedef struct {
TACCOUNTINFO1 accountInfo;
} TLoginResponse0;
typedef struct {
UINT idUser;
char idDevice[6];
} TLogoffRequest0;
typedef struct {
UINT param;
char strName[32];
char strPassword[80];
} TLoginRequest1;
typedef struct {
UINT param;
char strName[32];
char strPassword[80];
char idDevice[6];
} TLoginRequest2;
typedef struct {
UINT param;
char strNickname[32];
TACCOUNTINFO1 accountInfo;
} TLoginResponse1;
typedef struct {
char strName[32];
char strPassword[80];
} TRegisterRequest0;
typedef struct {
UINT param;
char strName[32];
char strPassword[80];
} TRegisterRequest1;
typedef struct {
UINT param;
char strName[32];
char strPassword[80];
char strNickname[32]; //昵称
char idDevice[6]; //设备号
char strCode[80]; //验证码
} TRegisterRequest2;
typedef struct {
UINT idUser;
char strNickname[32];
} TRegisterResponse0;
typedef struct {
UINT idStyle;
int verDetail; //信息版本
int size;
char detail[1400];
} TStyleInfoResponse0;
typedef struct {
UINT idUser;
UINT idStyle;
short scrUser;
} TStyleScoreRequest0;
typedef struct {
UINT iClientType;
UINT idUser;
UINT tLastUpdateDate;
} TStyleUpdateRequest0;
typedef struct {
UINT nAvailibleNum;
UINT tUpdateDate;
UINT idData;
UINT nDataSize;
} TStyleUpdateResponse0;
#pragma pack (4)
/////////////////////////////////////////////
//兼容早期版本
typedef struct tStylePrice{
UINT idStyle; //风格ID
float fPrice; //价格
} TSTYLEPRICE, *PTSTYLEPRICE;
typedef struct tStyleUpdate0{
UINT idStyle; //风格ID
int price; //购买消费
int cost; //使用消费
int score; //评分 (score/100)10分制
} TSTYLEUPDATE0, *PTSTYLEUPDATE0;
//
/////////////////////////////////////////////
//账户信息结构体
typedef struct tAccountInfo0{
int size; //数据长度
UINT ID; //用户ID
int balance; //帐户余额(唱作音符)
int pops; //魅力值
int fans; //粉丝数
int songs; //歌曲数
int ownStyleNum; //已购买风格数
tAccountInfo0(){
memset( this, 0, sizeof(tAccountInfo0) );
size = 28;
};
}TACCOUNTINFO0, *PTACCOUNTINFO0;
//上传歌曲信息结构体
typedef struct tSongInfo0{
int size; //结构大小
char strSongName[64]; //歌曲名
int iTempo; //速度
char iTS; //节拍
char iCreation; //创作类型 (1:原创 3:改编)
char iSubmit; //提交审核状态(0:不提交,1:自动提交)
char iSingerType; //演唱人类别 (1:男;2:女;3:组合;4:其他;0:未知)
char strSinger[32]; //演唱
char strOriginal[32]; //原唱
char strLyricist[32]; //作词
char strComposer[32]; //作曲
char strArranger[32]; //编曲
char iMusicStyle[4]; //曲风
UINT aStyleIDs[32]; //使用的风格ID
char strDescription[640];//歌曲描述
tSongInfo0(){
memset( this, 0, sizeof(tSongInfo0) );
memset( iMusicStyle, -1, 4 );
size = sizeof(tSongInfo0);
};
} TSONGINFO0, *PTSONGINFO0;
#pragma pack()
#endif //_SERVER_INNER_H_