545 lines
26 KiB
C++
545 lines
26 KiB
C++
#ifndef DBInterfaceH
|
||
#define DBInterfaceH
|
||
|
||
#include "ProCommon.h"
|
||
#include "ServerInner.h"
|
||
|
||
#include <string>
|
||
#include <vector>
|
||
using namespace std;
|
||
|
||
#ifndef StoredProcedureH
|
||
typedef struct tClientVersion
|
||
{
|
||
TSOFTWAREINFO swInfo;
|
||
int iClientType;
|
||
char strFilePath[256];
|
||
|
||
tClientVersion(){
|
||
iClientType = 0;
|
||
memset(strFilePath, 0, sizeof(strFilePath));
|
||
}
|
||
} TCLIENTVERSION, *PTCLIENTVERSION;
|
||
|
||
typedef struct
|
||
{
|
||
int iClientType;
|
||
TVERSION version;
|
||
} TTESTVERSION, *PTTESTVERSION;
|
||
|
||
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;
|
||
#endif
|
||
|
||
#ifdef _WIN32
|
||
#define DLLAPI __stdcall
|
||
#else //!_WIN32
|
||
#define DLLAPI
|
||
#endif
|
||
|
||
//Param function
|
||
typedef DLLAPI DWORD (*PM_HANDLEPARAM)( DWORD dwParam1, DWORD dwParam2 );
|
||
|
||
//Database storeprocedure
|
||
//---------------------------------------------------------获取目录-------------------------------------------------------------
|
||
//--函数名: DB_GetPath
|
||
//--功 能: 获取相关目录的绝对路径
|
||
//--输 入:
|
||
//-/chPathStyle: 调用时定义char[256]用于接收风格路径;
|
||
//-/chPathFile: 调用时定义char[256]用于接收web路径;
|
||
// chPathMusic: 调用时定义char[256]用于接收音乐路径;
|
||
//--返 回: 成功返回 0 失败 -1
|
||
//-----------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETPATH)(char *chPathStyle, char *chPathFile, char* chPathMusic);
|
||
|
||
//--函数名: DB_CleanVipLog
|
||
//--功 能: 清理VIP登录表
|
||
//--输 入:
|
||
//--返 回: 成功返回 0 失败 -1
|
||
//-----------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_CLEANVIPLOG)();
|
||
|
||
//-----------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_Register
|
||
//--功 能: 软件用户注册
|
||
//--输 入:
|
||
//-/user:用户名
|
||
//-/password:密码
|
||
// isEmailOrMobile 捆绑邮箱或手机号 1=邮箱 2=手机号
|
||
// idUser 用户ID
|
||
// 返回strNickName用户昵称
|
||
// iClientType 客户端类型
|
||
//--返 回: 成功返回0;用户名已存在返回1;函数调用失败返回 -1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_REGISTER)(char *user, char *password, int isEmailOrMobile, int& idUser, char* strNickName, int iClinetType);
|
||
|
||
//-----------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_PhoneCheck
|
||
//--功 能: 短信验证
|
||
//--输 入:
|
||
// idDevice: 设备号
|
||
// strPhone: 手机号
|
||
// strCode: 验证码
|
||
//--返 回: 成功返回0;验证失败返回1;函数调用失败返回 -1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_PHONECHECK)( char* idDevice, char* strPhone, char* strCode );
|
||
|
||
//-------------------------------------------------------------登陆-----------------------------------------------------------------
|
||
//--函数名: Prc_user_checkLogin
|
||
//--功 能: 登陆验证
|
||
//--输 入:
|
||
//--user:用户名
|
||
//--password:密码
|
||
// idDevice: 设备号
|
||
//--chUserMsg:外部定义char[256] 用于接收帐户信息,以"|"分隔,如"3|sadwjf222|8308.44|100|1"
|
||
// strNickName:用户昵称
|
||
// strIconFile:用户头像文件名
|
||
// iClientType 客户端类型
|
||
//--返 回: 成功返回0;密码错误返回1;帐号不存在返回2;函数调用失败返回 -1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_LOGIN)(char *user, char *password, char *idDevice, TACCOUNTINFO *stUserMsg,
|
||
char* strNickName, char* strIconFile, int iClinetType);
|
||
|
||
//-----------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_Logoff
|
||
//--功 能: 用户注销
|
||
//--输 入:
|
||
//-/idUser:用户号
|
||
// idDevice: 设备号
|
||
//--返 回: 成功返回0
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_LOGOFF)( int idUser, char *idDevice );
|
||
|
||
//------------------------------------检查更新-----------------------------------------------------------------
|
||
//--函数名: DB_GetClientUpdateFlag
|
||
//--功 能: 检查版本更新
|
||
//--输 入:
|
||
// iClientType: 客户端类型
|
||
// clientVersion: 客户端版本信息;
|
||
// idDevice: 设备号
|
||
//--返 回:
|
||
//--如果是最新版本,返回0;;
|
||
//--如果有更新但不是强制更新,返回1;
|
||
//--如果强制更新,返回2;
|
||
//--非法版本,返回3;
|
||
//--调用失败返回-1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETCLIENTUPDATEFLAG)(int iClientType, TVERSION* clientVersion, char *idDevice);
|
||
|
||
//-------------------------------------------------------版本类型个数-----------------------------------------------------------
|
||
//--函数名: getClientTypeNum
|
||
//--功 能: 获取版本类型个数
|
||
//--输 入:
|
||
//--返 回:
|
||
//--①成功返回版本类型个数 N >= 1
|
||
//--②失败 -1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETCLIENTTYPENUMBER)();
|
||
|
||
//-------------------------------------------------------版本类型信息-----------------------------------------------------------
|
||
//--函数名: getClientVersion
|
||
//--功 能: 获取多个版本类型的信息
|
||
//--输 入:
|
||
//--aVersion:
|
||
//--nArraySize:个数
|
||
//--返 回:
|
||
//--①成功返回0
|
||
//--②失败返回-1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETCLIENTVERSION)(TCLIENTVERSION aVersion[], int nArraySize);
|
||
|
||
|
||
//
|
||
//-------------------------------------------------------------更新风格数目-----------------------------------------------------------------
|
||
//--函数名: DB_GetStyleUpdateNumber
|
||
//--功 能: 获取风格更新数目
|
||
//--输 入:
|
||
//--chCltTime: Client上次更新时间点(YEAR<<16)+(MON<<8)+DAY),
|
||
//--UpdataNum:调用时定义 int 变量 用于接收检测到的更新总数
|
||
//--返 回: 成功返回0; 失败返回-1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETSTYLEUPDATENUMBER)(int tCltTime, int *UpdataNum);
|
||
|
||
//---------------------------------------------------------保存鉴权-------------------------------------------------------------
|
||
//--函数名: Prc_user_verify
|
||
//--功 能: 保存鉴权,显示用到的风格列表,以及实际价格和VIP价格,如果余额充足,支付完成后可保存,如果余额不足,则提示,并引导冲值的方式
|
||
//--输 入:
|
||
//--dwStyleID:风格ID数组
|
||
//--nStyleID :风格个数
|
||
//--dStyleOriginPrice: 定义double[ nStyleID ]数组接收每个个风格的实际价格
|
||
//--StyleCurrentPrice:定义double[ nStyleID ]数组接收每个个风格的应付价格
|
||
//--dBalance: 定义double变量接收余额
|
||
//--返 回:
|
||
//--①如果余额充足(通过本次鉴权)返回 0;
|
||
//--②如果余额不足(未通过鉴权)返回 1;
|
||
//--③如果调用失败返回-1;
|
||
// userID无效(未通过鉴权)返回2
|
||
// styleID无效(未通过鉴权)返回3,同时在相应的styleoriginprice填写-1;
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_VERIFY)( int nUserID,
|
||
int dwStyleID[],
|
||
int nStyleID,
|
||
int aStyleOriginCost[],
|
||
int aStyleCurrentCost[],
|
||
int *nBalance);
|
||
|
||
//---------------------------------------------------------支 付-------------------------------------------------------------
|
||
//--函数名: Prc_user_purchase
|
||
//--功 能: 支付
|
||
//--输 入:
|
||
//--userID:用户号
|
||
//--dwStyleID:风格ID数组
|
||
//--nStyleID :风格个数
|
||
//--nBalance:调用时定义int变量用于接收帐户余额
|
||
//iapType: 支付方式 0=个人账户支付,1=中移动iap
|
||
//--返 回:
|
||
//--①(余额充足)购买成功返回0;
|
||
//--②(余额不足)购买失败返回1;
|
||
//--③调用失败返回-1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (* DB_PURCHASE)(int nUserID, int dwStyleID[],int nStyleID, int *nBalance, int iapType);
|
||
|
||
//--------------------------------------------------------新增风格数据--------------------------------------------------------------
|
||
//--函数名: DB_InsertStyle
|
||
//--功 能: 新增风格数据
|
||
//--输 入:
|
||
// iType 新增类型,0=待审核,1=发布
|
||
// pStyleInfo 风格信息
|
||
//--返回:成功返回风格ID,失败返回-1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_INSERTSTYLE)( int iType, TMAKESTYLEINFO* pStyleInfo ); //新增风格数据
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_InsertShareStyle
|
||
//--功 能: 新增分享风格数据
|
||
//--输 入:
|
||
// pInfo 风格信息
|
||
//--返回:成功返回风格ID,失败返回-1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_INSERTSHARESTYLE)( TSTYLESHARE* pInfo ); //新增分享风格信息
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_GetStyleUpdataList
|
||
//--功 能: 获取风格更新数目
|
||
//--输 入:
|
||
//iClientType: 客户端类型,<3为伴奏魔方,4=Checker
|
||
//tUpdateTime: 更新时间点,如"2012-02-01" (高16位表示年 接下来饿8位表示月 低8位表示日),返回最新更新时间
|
||
//UpdataNum:调用时定义 int 变量 用于接收检测到的更新总数
|
||
//aUpdate:返回的列表数据,外部分配,外部释放
|
||
//--返 回: 成功返回0; 失败返回-1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETSTYLEUPDATELIST)(int iClientType, int* tUpdateTime, int *UpdataNum, TSTYLEUPDATE0 aUpdate[] );
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_GetStyleUpdateListNew
|
||
//--功 能: 获取风格更新数目新接口
|
||
//--输 入:
|
||
//tUpdateTime: 更新时间点,如"2012-02-01" (高16位表示年 接下来饿8位表示月 低8位表示日),返回最新更新时间
|
||
//UpdataNum:调用时定义 int 变量 用于接收检测到的更新总数
|
||
//aUpdate:返回的列表数据,外部分配,外部释放
|
||
//--返 回: 成功返回0; 失败返回-1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETSTYLEUPDATELISTNEW)(int* tUpdateTime, int *UpdataNum, TSTYLEUPDATE aUpdate[] );
|
||
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_GetShareUpdataList
|
||
//--功 能: 获取分享风格更新数目
|
||
//--输 入:
|
||
//tUpdateDate: 更新时间点,如"2012-02-01" (高16位表示年 接下来饿8位表示月 低8位表示日),返回最新更新时间
|
||
//UpdataNum:调用时定义 int 变量 用于接收检测到的更新总数
|
||
//aUpdate: 返回的列表数据,内部分配,外部释放
|
||
//--返 回: 成功返回0; 失败返回-1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETSHAREUPDATELIST)(int* tUpdateDate, int *nListSize, TSHAREUPDATE aUpdate[] );
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_GetCheckUpdataList
|
||
//--功 能: 获取分享风格更新数目
|
||
//--输 入:
|
||
//tUpdateDate: 更新时间点,如"2012-02-01" (高16位表示年 接下来饿8位表示月 低8位表示日),返回最新更新时间
|
||
//UpdataNum:调用时定义 int 变量 用于接收检测到的更新总数
|
||
//aUpdate: 返回的列表数据,内部分配,外部释放
|
||
//--返 回: 成功返回0; 失败返回-1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETCHECKUPDATELIST)(int* tUpdateDate, int *nListSize, TCHECKUPDATE aUpdate[] );
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_CheckStyleInfo
|
||
//--功 能: 确认风格信息有效性
|
||
//--输 入:
|
||
//iType: 风格类型 1=发布风格 2=临时风格 3=共享风格
|
||
//idStyle: 风格ID
|
||
//--返 回: 成功返回0; 失败返回-1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_CHECKSTYLEINFO)( int iType, int idStyle );
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_GetStyleInfoNew
|
||
//--功 能: 获取风格信息
|
||
//--输 入:
|
||
//iClientType: 客户端类型,<3为伴奏魔方,4=Checker
|
||
//idStyle: 风格ID
|
||
//pInfo:返回风格信息
|
||
//--返 回: 成功返回0; 失败返回-1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETSTYLEINFONEW)(int iClientType, int idStyle, TSTYLEDETAIL* pInfo );
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_GetRecomStyleIDs
|
||
//--功 能: 获取推荐风格ID列表
|
||
//--输 入:
|
||
//idCount:调用时定义 int 变量 用于接收检测到的id总数
|
||
//lstID:返回的列表数据,外部分配,外部释放
|
||
//--返 回: 成功返回0; 失败返回-1;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (* DB_GETRECOMSTYLEIDS)( int* idCount, int lstID[] );
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_CheckUserAuthority
|
||
//--功 能: 获取用户权限
|
||
//--输 入:
|
||
//idUser:用户ID
|
||
//anthority:查询权限
|
||
//--返 回: 无权限返回0; 失败返回-1;有权限返回非零值
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_CHECKUSERAUTHORITY)( int idUser, int authority );
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_SetStyleCheck
|
||
//--功 能: 设置风格审核结果
|
||
//--输 入:
|
||
// idChecker: 审核者ID
|
||
// idStyle: 临时风格ID
|
||
// score: 评分 0=未通过
|
||
// strMsg: 审核信息,审核通过时忽略
|
||
//--返 回: 成功返回发布风格ID,失败返回-1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_SETSTYLECHECK)( int idUser, int idStyle, int score, char* strMsg );
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_GetCommonQnA
|
||
//--功 能: 查询常见问题
|
||
//--输 入:
|
||
// dtUpdate 最后更新时间
|
||
// listSize 输入问题个数
|
||
// listQA 返回问题数组
|
||
//--返 回: 成功返回问题个数,失败返回-1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETCOMMONQNA)( int dtUpdate, int nListSize, TQNAITEM listQA[] );
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_GetUserQnA
|
||
//--功 能: 查询用户提问
|
||
//--输 入:
|
||
// idNum 待查询ID个数
|
||
// idList 待查询ID
|
||
// idUser 用户ID
|
||
// iClientType 客户端类型
|
||
// dtUpdate 更新时间
|
||
// listSize 输入listQA大小
|
||
// listQA 返回问题列表
|
||
//--返 回: 成功返回问题个数,失败返回-1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI 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
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_SUBMITQUESTION)( int idUser, int iClientType, char* strMsg, char* strVersion );
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_GetNotice
|
||
//--功 能: 查询系统公告或用户通知
|
||
//--输 入:
|
||
// listSize 输入通知个数
|
||
// listNotece 返回通知数组
|
||
// idUser 查询用户号
|
||
//--返 回: 成功返回公告个数,失败返回-1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETNOTICE)( int nListSize, TNOTICEITEM listNotice[], UINT idUser );
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_InsertSong
|
||
//--功 能: 新增上传歌曲
|
||
//--输 入:
|
||
//--idUser 用户号
|
||
// iClientType 客户端类型
|
||
//--pSongInfo 歌曲信息
|
||
//--nSongSize 歌曲文件大小
|
||
//--path 歌曲文件路径
|
||
//--strCover 缺省封面
|
||
//--location 文件存放盘符,空不填写
|
||
//--返回:成功返回歌曲ID,失败返回-1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_INSERTSONG)(int idUser, int iClientType, TSONGINFO0* pSongInfo, int nSongSize,
|
||
char* path, char* strCover, char* location );
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_UpdateStyle
|
||
//--功 能: 修改风格数据
|
||
//--输 入: idStyle 风格ID
|
||
//--pStyleInfo 风格信息
|
||
//--返回:成功返回风格ID,失败返回-1
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_UPDATESTYLE)( UINT idStyle, TMAKESTYLEINFO* pStyleInfo );
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_CheckPayment
|
||
//--功 能: 检查支付
|
||
//--输 入:
|
||
//idUser:用户号
|
||
//iOperation: 操作号 0=使用 1=编辑
|
||
//dwStyleID:风格ID数组
|
||
//nStyleCount :风格个数
|
||
//pCost: 接收积分消耗
|
||
//pBalance: 接收用户积分余额
|
||
//pFee: 接收功能费
|
||
//--返 回:
|
||
//--①如果余额充足(可以完成本次购买)返回 0;
|
||
//--②如果余额不足(不能完成本次购买)返回 1;
|
||
//--③如果调用失败返回-1;
|
||
//--④如果用户无效,返回2;
|
||
//--⑤如果有不存在的风格,返回3;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_CHECKPAYMENT)(int iClientType, UINT idUser, int iOperation, int nStyleCount, UINT dwStyleID[], int* pCost, int *pBalance, int *pFee);
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_ConfirmPayment
|
||
//--功 能: 确认支付
|
||
//--输 入:
|
||
// iClientType 客户端类型
|
||
//idUser:用户号
|
||
//iOperation: 操作号 0=使用 1=编辑
|
||
//nStyleCount :风格个数
|
||
//dwStyleID:风格ID数组
|
||
//nPaidCount :已支付风格个数
|
||
//dwPaidID:已支付风格ID数组
|
||
//pBalance: 接收用户积分余额
|
||
//--返 回:
|
||
//--①如果余额充足(可以完成本次购买)返回 0;
|
||
//--②如果余额不足(不能完成本次购买)返回 1;
|
||
//--③如果调用失败返回-1;
|
||
//--④如果用户无效,返回2;
|
||
//--⑤如果有不存在的风格,返回3;
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI 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:获取/设置
|
||
//--返 回: 错误号
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_STYLESCORE)( int iType, UINT idStyle, int *pScore, bool bGet);
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
//--函数名: DB_GetWebURL
|
||
//--功 能: 获取网络地址
|
||
//--输 入:
|
||
//-/iPage: 请求页面编号
|
||
// strURL: 接收网络地址
|
||
//--返 回: 成功返回0
|
||
//------------------------------------------------------------------------------------------------------------------------------
|
||
typedef DLLAPI int (*DB_GETWEBURL)( int iPage, char *strURL );
|
||
|
||
|
||
extern PM_HANDLEPARAM f_PM_HandleParam;
|
||
|
||
extern DB_GETCLIENTVERSION f_DB_GetClientVersion;
|
||
extern DB_GETCLIENTTYPENUMBER f_DB_GetClientTypeNumber;
|
||
extern DB_GETPATH f_DB_GetPath;
|
||
extern DB_CLEANVIPLOG f_DB_CleanVipLog;
|
||
extern DB_GETSTYLEUPDATENUMBER f_DB_GetStyleUpdateNumber;
|
||
extern DB_GETCLIENTUPDATEFLAG f_DB_GetClientUpdateFlag;
|
||
extern DB_PHONECHECK f_DB_PhoneCheck;
|
||
extern DB_REGISTER f_DB_Register;
|
||
extern DB_LOGIN f_DB_Login;
|
||
extern DB_LOGOFF f_DB_Logoff;
|
||
extern DB_VERIFY f_DB_Verify;
|
||
extern DB_PURCHASE f_DB_Purchase;
|
||
extern DB_INSERTSTYLE f_DB_InsertStyle;
|
||
extern DB_GETSTYLEUPDATELIST f_DB_GetStyleUpdateList;
|
||
extern DB_CHECKSTYLEINFO f_DB_CheckStyleInfo;
|
||
extern DB_GETRECOMSTYLEIDS f_DB_GetRecomStyleIDs;
|
||
extern DB_CHECKUSERAUTHORITY f_DB_CheckUserAuthority;
|
||
extern DB_SETSTYLECHECK f_DB_SetStyleCheck;
|
||
extern DB_GETCOMMONQNA f_DB_GetCommonQnA;
|
||
extern DB_GETUSERQNA f_DB_GetUserQnA;
|
||
extern DB_SUBMITQUESTION f_DB_SubmitQuestion;
|
||
extern DB_GETNOTICE f_DB_GetNotice;
|
||
extern DB_INSERTSONG f_DB_InsertSong;
|
||
extern DB_GETSTYLEUPDATELISTNEW f_DB_GetStyleUpdateListNew;
|
||
extern DB_GETSHAREUPDATELIST f_DB_GetShareUpdateList;
|
||
extern DB_GETCHECKUPDATELIST f_DB_GetCheckUpdateList;
|
||
extern DB_GETSTYLEINFONEW f_DB_GetStyleInfoNew;
|
||
extern DB_UPDATESTYLE f_DB_UpdateStyle;
|
||
extern DB_CHECKPAYMENT f_DB_CheckPayment;
|
||
extern DB_CONFIRMPAYMENT f_DB_ConfirmPayment;
|
||
extern DB_STYLESCORE f_DB_StyleScore;
|
||
extern DB_INSERTSHARESTYLE f_DB_InsertShareStyle;
|
||
extern DB_GETWEBURL f_DB_GetWebURL;
|
||
|
||
#define DB_DLL "StoredProcedure.dll"
|
||
#define PM_DLL "params.dll"
|
||
|
||
bool LoadDB();
|
||
void FreeDB();
|
||
|
||
#endif
|