Initial commit
This commit is contained in:
@@ -0,0 +1,539 @@
|
||||
#ifndef StoredProcedureH
|
||||
#define StoredProcedureH
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
TSOFTWAREINFO swInfo;
|
||||
int iClientType;
|
||||
char strFilePath[256];
|
||||
} TCLIENTVERSION, *PTCLIENTVERSION;
|
||||
|
||||
typedef struct tQnAItem{
|
||||
UINT id;
|
||||
int iClientType[8];
|
||||
UINT state;
|
||||
UINT idUser;
|
||||
UINT dtUpdate;
|
||||
char strQuestion[320];
|
||||
char strAnswer[640];
|
||||
|
||||
tQnAItem(){
|
||||
id = state = idUser = dtUpdate = 0;
|
||||
memset( strQuestion, 0, 320 );
|
||||
memset( strAnswer, 0, 640 );
|
||||
memset( iClientType, -1, sizeof(int)*8 );
|
||||
}
|
||||
} TQNAITEM, *PTQNAITEM;
|
||||
|
||||
typedef vector<TQNAITEM*> TQNAITEMLIST;
|
||||
|
||||
typedef struct tNoticeItem{
|
||||
UINT id;
|
||||
UINT iType;
|
||||
char strTitle[320];
|
||||
char strContent[640];
|
||||
|
||||
tNoticeItem(){
|
||||
id = iType = 0;
|
||||
memset( strTitle, 0, 320 );
|
||||
memset( strContent, 0, 640 );
|
||||
}
|
||||
} TNOTICEITEM, *PTNOTICEITEM;
|
||||
|
||||
typedef vector<TNOTICEITEM*> TNOTICEITEMLIST;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define DBSPDEF _declspec(dllexport) __stdcall
|
||||
#else
|
||||
#define DBSPDEF
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_InitDatabases
|
||||
//--功 能: 初始化连接
|
||||
//--输 入:
|
||||
//--返 回:
|
||||
//--①初始化成功返回0
|
||||
//--②失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_InitDatabases(char *chHost, char *chUser, char *chPassword); //-*初始化连接*-
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_Release
|
||||
//--功 能: 释放资源,关闭连接
|
||||
//--输 入:
|
||||
//--返 回:
|
||||
//--①初始化成功返回0
|
||||
//--②失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_Release(); //-*资源释放*-
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetPath
|
||||
//--功 能: 获取相关目录的绝对路径
|
||||
//--输 入:
|
||||
//-/chPathStyle: 调用时定义char[256]用于接收风格路径;
|
||||
//-/chPathWeb: 调用时定义char[256]用于接收网站路径;
|
||||
// chPathMusic: 调用时定义char[256]用于接收上传歌曲路径;
|
||||
//--返 回: 成功返回 0 失败 -1
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetPath(char *chPathStyle, char *chPathWeb, char* chPathMusic); //-*获取目录*-
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_CleanVipLog
|
||||
//--功 能: 清理VIP登录表
|
||||
//--输 入:
|
||||
//--返 回: 成功返回 0 失败 -1
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_CleanVipLog();
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_Login
|
||||
//--功 能: 登陆验证
|
||||
//--输 入:
|
||||
//-/user:用户名
|
||||
//-/password:密码
|
||||
// idDevice: 设备号
|
||||
//-/chUserMsg:接收帐户信息
|
||||
// strNickName用户昵称
|
||||
// strIconFile:用户头像文件名
|
||||
// iClientType 客户端类型
|
||||
//--返 回: 成功返回0;密码错误返回1;帐号不存在返回2;函数调用失败返回 -1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_Login(char *user, char *password, char *idDevice, TACCOUNTINFO *stUserMsg,
|
||||
char* strNickName, char* strIconFile, int iClinetType);
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_Logoff
|
||||
//--功 能: 用户注销
|
||||
//--输 入:
|
||||
//-/idUser:用户号
|
||||
// idDevice: 设备号
|
||||
//--返 回: 成功返回0
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_Logoff( int idUser, char *idDevice );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_Register
|
||||
//--功 能: 软件用户注册
|
||||
//--输 入:
|
||||
//-/user:用户名
|
||||
//-/password:密码
|
||||
// isEmailOrMobile 捆绑邮箱或手机号 1=邮箱 2=手机号
|
||||
// idUser 用户ID
|
||||
// 返回strNickName用户昵称
|
||||
// iClientType 客户端类型
|
||||
//--返 回: 成功返回0;用户名已存在返回1;函数调用失败返回 -1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_Register(char *user, char *password, int isEmailOrMobile, int& idUser, char* strNickName, int iClinetType);
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_PhoneCheck
|
||||
//--功 能: 短信验证
|
||||
//--输 入:
|
||||
// idDevice: 设备号
|
||||
// strPhone: 手机号
|
||||
// strCode: 验证码
|
||||
//--返 回: 成功返回0;验证失败返回1;函数调用失败返回 -1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_PhoneCheck( char* idDevice, char* strPhone, char* strCode );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//-*获取更新标志*-
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetClientUpdataFlag
|
||||
//--功 能: 检查版本更新
|
||||
//--输 入:
|
||||
// iClientType: 客户端类型(软件内部编号)
|
||||
// clientVersion: 客户端版本结构体;
|
||||
// idDevice: 设备号
|
||||
//--返 回:
|
||||
//--①调用失败 -1;
|
||||
//--②最新版本 0;
|
||||
//--③选择更新 1;
|
||||
//--④强制更新,2;
|
||||
//--⑤非法版本,3;
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetClientUpdateFlag(int iClientType, TVERSION* clientVersion, char *idDevice); //-*获取更新标志*-
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetClientTypeNumber
|
||||
//--功 能: 获取版本类型个数
|
||||
//--输 入:
|
||||
//--返 回:
|
||||
//--①成功返回版本类型个数 N >= 1
|
||||
//--②失败 -1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetClientTypeNumber(); //-*获取客户端类型*-
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetStyleUpdataNumber
|
||||
//--功 能: 获取风格更新数目
|
||||
//--输 入:
|
||||
//-/chCltTime: Client时间点,如"2012-02-01 14:25:56" (高16位表示年 接下来饿8位表示月 低8位表示日)
|
||||
//UpdataNum:调用时定义 int 变量 用于接收检测到的更新总数
|
||||
//--返 回: 成功返回0; 失败返回-1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetStyleUpdateNumber(int chCltTime, int *UpdataNum); //-*获取更新风格数*-
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetClientVersion
|
||||
//--功 能: 获取多个版本类型的信息
|
||||
//--输 入:
|
||||
//aVersion:结构体数组返回每个版本的信息
|
||||
//nArraySize:个数
|
||||
//--返 回:
|
||||
//--①成功返回0
|
||||
//--②失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetClientVersion(TCLIENTVERSION aVersion[], int nArraySize); //-*获取版本*-
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_Verify
|
||||
//--功 能: 保存鉴权,显示用到的风格列表,以及实际价格和VIP价格,实际总价和应付总价,如果余额充足,支付完成后可保存,
|
||||
//-- 如果余额不足,则提示,并引导冲值的方式
|
||||
//--输 入:
|
||||
//user:用户名
|
||||
//password:密码
|
||||
//dwStyleID:风格ID数组
|
||||
//nStyleID :风格个数
|
||||
//dStyleOriginPrice: 定义double[ nStyleID ]数组接收每个个风格的实际价格
|
||||
//StyleCurrentPrice:定义double[ nStyleID ]数组接收每个个风格的应付价格
|
||||
//dOrgTotal:定义double变量接收实际总额
|
||||
//dCurToal: 定义double变量接收应付总额
|
||||
//dBalance: 定义double变量接收余额
|
||||
//--返 回:
|
||||
//--①如果余额充足(可以完成本次购买)返回 0;
|
||||
//--②如果余额不足(不能完成本次购买)返回 1;
|
||||
//--③如果调用失败返回-1;
|
||||
//--④如果用户无效,返回2;
|
||||
//--⑤如果有不存在的风格,返回3;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_Verify(int nUserID, int dwStyleID[],int nStyleID,
|
||||
int aStyleOriginCost[],int aStyleCurrentCost[], int *pBalance); //-*鉴权*-
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_Purchase
|
||||
//--功 能: 支付
|
||||
//--输 入:
|
||||
//user:用户名
|
||||
//password:密码
|
||||
//dwStyleID:风格ID数组
|
||||
//nStyleID :风格个数
|
||||
//dBalance:调用时定义flaot变量用于接收帐户余额
|
||||
//iapType: 支付方式 0=个人账户支付,1=中移动iap
|
||||
//--返 回:
|
||||
//--①(余额充足)购买成功返回0;
|
||||
//--②(余额不足)购买失败返回1;
|
||||
//--③调用失败返回-1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_Purchase(int nUserID, int dwStyleID[],int nStyleID, int *pBalance, int iapType); //-*支付*-
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//--函数名: DB_InsertStyle
|
||||
//--功 能: 新增风格数据
|
||||
//--输 入:
|
||||
// iType 新增类型,0=待审核,1=发布
|
||||
// pStyleInfo 风格信息
|
||||
//--返回:成功返回风格ID,失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_InsertStyle( int iType, TMAKESTYLEINFO* pStyleInfo ); //新增风格信息
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//--函数名: DB_InsertShareStyle
|
||||
//--功 能: 新增分享风格数据
|
||||
//--输 入:
|
||||
// pInfo 风格信息
|
||||
//--返回:成功返回风格ID,失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_InsertShareStyle( TSTYLESHARE* pInfo ); //新增分享风格信息
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//--函数名: DB_UpdateStyle
|
||||
//--功 能: 修改风格数据
|
||||
//--输 入: idStyle 风格ID
|
||||
//--pStyleInfo 风格信息
|
||||
//--返回:成功返回风格ID,失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_UpdateStyle( UINT idStyle, TMAKESTYLEINFO* pStyleInfo ); //修改风格信息
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetStyleUpdataList
|
||||
//--功 能: 获取风格更新数目
|
||||
//--输 入:
|
||||
//iClientType: 客户端类型,<3为伴奏魔方,4=Checker
|
||||
//tUpdateTime: 更新时间点,如"2012-02-01" (高16位表示年 接下来饿8位表示月 低8位表示日),返回最新更新时间
|
||||
//UpdataNum:调用时定义 int 变量 用于接收检测到的更新总数
|
||||
//aUpdate:返回的列表数据,外部分配,外部释放
|
||||
//--返 回: 成功返回0; 失败返回-1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetStyleUpdateList(int iClientType, int* tUpdateTime, int *UpdataNum, TSTYLEUPDATE0 aUpdate[] );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetStyleUpdataListNew
|
||||
//--功 能: 获取风格更新数目
|
||||
//--输 入:
|
||||
//tUpdateTime: 更新时间点,如"2012-02-01" (高16位表示年 接下来饿8位表示月 低8位表示日),返回最新更新时间
|
||||
//UpdataNum:调用时定义 int 变量 用于接收检测到的更新总数
|
||||
//aUpdate:返回的列表数据,外部分配,外部释放
|
||||
//--返 回: 成功返回0; 失败返回-1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetStyleUpdateListNew(int* tUpdateTime, int *UpdataNum, TSTYLEUPDATE aUpdate[] );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetShareUpdataList
|
||||
//--功 能: 获取分享风格更新数目
|
||||
//--输 入:
|
||||
//tUpdateDate: 更新时间点,如"2012-02-01" (高16位表示年 接下来饿8位表示月 低8位表示日),返回最新更新时间
|
||||
//UpdataNum:调用时定义 int 变量 用于接收检测到的更新总数
|
||||
//aUpdate: 返回的列表数据,内部分配,外部释放
|
||||
//--返 回: 成功返回0; 失败返回-1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetShareUpdateList(int* tUpdateDate, int *nListSize, TSHAREUPDATE aUpdate[] );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetCheckUpdateList
|
||||
//--功 能: 获取待审核风格更新数目
|
||||
//--输 入:
|
||||
//tUpdateDate: 更新时间点,如"2012-02-01" (高16位表示年 接下来饿8位表示月 低8位表示日),返回最新更新时间
|
||||
//UpdataNum:调用时定义 int 变量 用于接收检测到的更新总数
|
||||
//aUpdate: 返回的列表数据,内部分配,外部释放
|
||||
//--返 回: 成功返回0; 失败返回-1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetCheckUpdateList(int* tUpdateDate, int *nListSize, TCHECKUPDATE aUpdate[] );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_CheckStyleInfo
|
||||
//--功 能: 确认风格信息有效性
|
||||
//--输 入:
|
||||
//iType: 风格类型 1=发布风格 2=临时风格 3=共享风格
|
||||
//idStyle: 风格ID
|
||||
//--返 回: 成功返回0; 失败返回-1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_CheckStyleInfo(int iType, int idStyle );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetStyleInfoNew
|
||||
//--功 能: 获取风格信息
|
||||
//--输 入:
|
||||
//iClientType: 客户端类型,<3为伴奏魔方,4=Checker
|
||||
//idStyle: 风格ID
|
||||
//pInfo:返回风格信息
|
||||
//--返 回: 成功返回0; 失败返回-1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetStyleInfoNew(int iClientType, int idStyle, TSTYLEDETAIL* pInfo );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetRecomStyleIDs
|
||||
//--功 能: 获取推荐风格ID列表
|
||||
//--输 入:
|
||||
//idCount:调用时定义 int 变量 用于接收检测到的id总数
|
||||
//lstID:返回的列表数据,外部分配,外部释放
|
||||
//--返 回: 成功返回0; 失败返回-1;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetRecomStyleIDs( int* idCount, int lstID[] );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_CheckUserAuthority
|
||||
//--功 能: 获取用户权限
|
||||
//--输 入:
|
||||
//idUser:用户ID
|
||||
//anthority:查询权限, 0=上传歌曲
|
||||
//--返 回: 无权限返回0; 失败返回-1;有权限返回非零值
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_CheckUserAuthority( int idUser, int authority );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_SetStyleCheck
|
||||
//--功 能: 设置风格审核结果
|
||||
//--输 入:
|
||||
// idChecker: 审核者ID
|
||||
// idStyle: 临时风格ID
|
||||
// score: 评分 0=未通过
|
||||
// strMsg: 审核信息,审核通过时忽略
|
||||
//--返 回: 成功返回发布风格ID,失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_SetStyleCheck( int idUser, int idStyle, int score, char* strMsg );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetCommonQnA
|
||||
//--功 能: 查询常见问题
|
||||
//--输 入:
|
||||
// dtUpdate 最后更新时间
|
||||
// listSize 输入问题个数
|
||||
// listQA 返回问题数组
|
||||
//--返 回: 成功返回问题个数,失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetCommonQnA( int dtUpdate, int nListSize, TQNAITEM listQA[] );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetUserQnA
|
||||
//--功 能: 查询用户提问
|
||||
//--输 入:
|
||||
// idNum 待查询ID个数
|
||||
// idList 待查询ID
|
||||
// idUser 用户ID
|
||||
// iClientType 客户端类型
|
||||
// dtUpdate 更新时间
|
||||
// listSize 输入listQA大小
|
||||
// listQA 返回问题列表
|
||||
//--返 回: 成功返回问题个数,失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetUserQnA( int idNum, int idList[], int idUser, int iClientType, int dtUpdate,
|
||||
int nListSize, TQNAITEM listQA[] );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_SubmitQuestion
|
||||
//--功 能: 提交问题
|
||||
//--输 入:
|
||||
// idUser: 提交者ID
|
||||
// iClientType: 客户端类型
|
||||
// strMsg: 提交信息
|
||||
// strVersion: 客户端版本
|
||||
//--返 回: 成功返回问题ID,失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_SubmitQuestion( int idUser, int iClientType, char* strMsg, char* strVersion );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetNotice
|
||||
//--功 能: 查询系统公告或用户通知
|
||||
//--输 入:
|
||||
// listSize 输入通知个数
|
||||
// listNotece 返回通知数组
|
||||
// idUser 查询用户号
|
||||
//--返 回: 成功返回公告个数,失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetNotice( int nListSize, TNOTICEITEM listNotice[], UINT idUser );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_InsertSong
|
||||
//--功 能: 新增上传歌曲
|
||||
//--输 入:
|
||||
//--idUser 用户号
|
||||
// iClientType 客户端类型
|
||||
//--pSongInfo 歌曲信息
|
||||
//--nSongSize 歌曲文件大小
|
||||
//--path 歌曲文件路径
|
||||
//--strCover 缺省封面
|
||||
//--location 文件存放盘符,空不填写
|
||||
//--返回:成功返回歌曲ID,失败返回-1
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_InsertSong(int idUser, int iClientType, TSONGINFO0* pSongInfo, int nSongSize,
|
||||
char* path, char* strCover, char* location );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_CheckPayment
|
||||
//--功 能: 检查支付
|
||||
//--输 入:
|
||||
//idUser:用户号
|
||||
//iOperation: 操作号 0=使用 1=编辑
|
||||
//nStyleCount :风格个数
|
||||
//aStyleID: 风格ID数组
|
||||
//aCost: 风格当前消耗数组
|
||||
//pCost: 接收积分消耗
|
||||
//pBalance: 接收用户积分余额
|
||||
//pFee: 接收功能费
|
||||
//--返 回:
|
||||
//--①如果余额充足(可以完成本次购买)返回 0;
|
||||
//--②如果余额不足(不能完成本次购买)返回 1;
|
||||
//--③如果调用失败返回-1;
|
||||
//--④如果用户无效,返回2;
|
||||
//--⑤如果有不存在的风格,返回3;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_CheckPayment(int iClientType, UINT idUser, int iOperation, int nStyleCount, UINT aStyleID[], int aCost[], int *pBalance, int *pFee);
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_ConfirmPayment
|
||||
//--功 能: 确认支付
|
||||
//--输 入:
|
||||
// iClientType 客户端类型
|
||||
//idUser:用户号
|
||||
//iOperation: 操作号 0=使用 1=编辑
|
||||
//nStyleCount :风格个数
|
||||
//dwStyleID:风格ID数组
|
||||
//nPaidCount :已支付风格个数
|
||||
//dwPaidID:已支付风格ID数组
|
||||
//pBalance: 接收用户积分余额
|
||||
//--返 回:
|
||||
//--①如果余额充足(可以完成本次购买)返回 0;
|
||||
//--②如果余额不足(不能完成本次购买)返回 1;
|
||||
//--③如果调用失败返回-1;
|
||||
//--④如果用户无效,返回2;
|
||||
//--⑤如果有不存在的风格,返回3;
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_ConfirmPayment(int iClientType, UINT idUser, int iOperation, int nStyleCount, UINT dwStyleID[],
|
||||
int nPaidCount, UINT dwPaidID[], int *pBalance);
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_StyleScore
|
||||
//--功 能: 风格评分
|
||||
//--输 入:
|
||||
// iTYpe 风格类型 1=发布风格 2=临时风格 3=共享风格
|
||||
// idStyle:风格ID
|
||||
// pScore:风格当前评分
|
||||
// bGet:获取/设置
|
||||
//--返 回: 错误号
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_StyleScore( int iType, UINT idStyle, int *pScore, bool bGet);
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
//--函数名: DB_GetWebURL
|
||||
//--功 能: 获取网络地址
|
||||
//--输 入:
|
||||
//-/iPage: 请求页面编号
|
||||
// strURL: 接收网络地址
|
||||
//--返 回: 成功返回0
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
DBSPDEF int DB_GetWebURL( int iPage, char *strURL );
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user