// 下列 ifdef 块是创建使从 DLL 导出更简单的
// 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 SCBCCOPYKEY_EXPORTS
// 符号编译的。在使用此 DLL 的
// 任何其他项目上不应定义此符号。这样，源文件中包含此文件的任何其他项目都会将
// SCBCCOPYKEY_API 函数视为是从 DLL 导入的，而此 DLL 则将用此宏定义的
// 符号视为是被导出的。
#ifdef SCBCCOPYKEY_EXPORTS
#define SCBCCOPYKEY_API __declspec(dllexport)
#else
#define SCBCCOPYKEY_API __declspec(dllimport)
#endif

#ifndef __MAKE_PYD__
// 打开串口;
SCBCCOPYKEY_API BOOL Open(int nPort, DWORD dwBaudrate, BYTE ByteSize, BYTE Parity, BYTE StopBits);
// 关闭串口;
SCBCCOPYKEY_API void Close();
// 串口是否打开;
SCBCCOPYKEY_API BOOL IsOpen();
// 进入工厂模式;
SCBCCOPYKEY_API BOOL EnterFactory();
// 离开工厂模式;
SCBCCOPYKEY_API BOOL LeaveFactory();
// 获取pid;
SCBCCOPYKEY_API INT GetProjectId();
// 软件版本号;
SCBCCOPYKEY_API LPCTSTR GetSoftVersion();
// 设备ID
SCBCCOPYKEY_API LPCTSTR GetDeviceId();
// ClientType;
SCBCCOPYKEY_API LPCTSTR GetClientType();
// MAC地址;
SCBCCOPYKEY_API LPCTSTR GetMAC();
// HDCP Key;
SCBCCOPYKEY_API LPCTSTR GetHDCPKey();
// HDCP Key2.2;
SCBCCOPYKEY_API LPCTSTR GetHDCPKey22();
// Widi;
SCBCCOPYKEY_API LPCTSTR GetWidi();
// Netflix ESN;
SCBCCOPYKEY_API LPCTSTR GetNetflixESN();
// Widevine;
SCBCCOPYKEY_API LPCTSTR GetWidevine();
// ci plus key;
SCBCCOPYKEY_API LPCTSTR GetCiKey();
// OSD Language;
SCBCCOPYKEY_API LPCTSTR GetOSDLanguage();
// Shop Language;
SCBCCOPYKEY_API LPCTSTR GetShopLanguage();

SCBCCOPYKEY_API LPCTSTR GetChannel();

SCBCCOPYKEY_API BOOL SetProjectId(int pid);
SCBCCOPYKEY_API BOOL SetProjectId(LPCTSTR lpPid);
SCBCCOPYKEY_API BOOL SetProjectId(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetDeviceId(LPCTSTR lpDeviceId);
SCBCCOPYKEY_API BOOL SetDeviceId(const byte* pBuffer, const int &nLen);
SCBCCOPYKEY_API BOOL SetMAC(LPCTSTR lpMac);
SCBCCOPYKEY_API BOOL SetMAC(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetHDCPKey(LPCTSTR lpHDCP, BOOL bHasSpace = FALSE);
SCBCCOPYKEY_API BOOL SetHDCPKey(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetHDCPKey22(LPCTSTR lpHDCP22, BOOL bHasSpace = FALSE);
SCBCCOPYKEY_API BOOL SetHDCPKey22(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetNetflixESN(LPCTSTR lpESN, BOOL bHasSpace = FALSE);
SCBCCOPYKEY_API BOOL SetNetflixESN(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetWidi(LPCTSTR lpWidi, BOOL bHasSpace = FALSE);
SCBCCOPYKEY_API BOOL SetWidi(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetWidevine(LPCTSTR lpWidevine, BOOL bHasSpace = FALSE);
SCBCCOPYKEY_API BOOL SetWidevine(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetCiKey(LPCTSTR lpCiKey, BOOL bHasSpace = FALSE);
SCBCCOPYKEY_API BOOL SetCiKey(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetOSDLanguage(LPCTSTR lan, BOOL bHasSpace = TRUE);
SCBCCOPYKEY_API BOOL SetOSDLanguage(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetShopLanguage(LPCTSTR lan, BOOL bHasSpace = TRUE);
SCBCCOPYKEY_API BOOL SetShopLanguage(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetChannel(LPCTSTR channel, BOOL bHasSpace = TRUE);
SCBCCOPYKEY_API BOOL SetChannel(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetWBNormal(LPCTSTR data);
SCBCCOPYKEY_API BOOL SetWBNormal(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetWBCool(LPCTSTR data);
SCBCCOPYKEY_API BOOL SetWBCool(const byte* pBuffer, const int& nLen);
SCBCCOPYKEY_API BOOL SetWBWarm(LPCTSTR data);
SCBCCOPYKEY_API BOOL SetWBWarm(const byte* pBuffer, const int& nLen);

SCBCCOPYKEY_API BOOL CheckDeviceId();
SCBCCOPYKEY_API BOOL CheckMAC();
SCBCCOPYKEY_API BOOL CheckHDCP();
SCBCCOPYKEY_API BOOL CheckHDCP22();
SCBCCOPYKEY_API BOOL CheckNetflixESN();
SCBCCOPYKEY_API BOOL CheckWidi();
SCBCCOPYKEY_API BOOL CheckWidevine();
SCBCCOPYKEY_API BOOL CheckCikey();

SCBCCOPYKEY_API BOOL StarWarmUpMode();
SCBCCOPYKEY_API BOOL StopWarmUpMode();

// 工厂菜单显示与隐藏;
SCBCCOPYKEY_API BOOL ShowFactoryMenu();
SCBCCOPYKEY_API BOOL HideFactoryMenu();
// 工厂信息内容显示与隐藏;
SCBCCOPYKEY_API BOOL ShowFactoryInformation();
SCBCCOPYKEY_API BOOL HideFactoryInformation();
// 老化模式的开与关、老化时间读取;
SCBCCOPYKEY_API BOOL EnterAgingModel();
SCBCCOPYKEY_API BOOL LeaveAgingModel();
SCBCCOPYKEY_API BOOL ReadAgingTime(int &min);
// 红绿蓝增益;
SCBCCOPYKEY_API BOOL SetRedGainRegister(int value);
SCBCCOPYKEY_API BOOL SetGreenGainRegister(int value);
SCBCCOPYKEY_API BOOL SetBlueGainRegister(int value);
// 红绿蓝偏移;
SCBCCOPYKEY_API BOOL SetRedOffsetRegister(int value);
SCBCCOPYKEY_API BOOL SetGreenOffsetRegister(int value);
SCBCCOPYKEY_API BOOL SetBlueOffsetRegister(int value);

#endif
//////////////////////////////////////////////////////////////////////////
SCBCCOPYKEY_API LPCTSTR HTTP_Login(LPCTSTR lpHost, LPCTSTR lpUserName, LPCTSTR lpPassword, BOOL bRemember);
SCBCCOPYKEY_API int HTTP_GetUserId(LPCTSTR lpHost, LPCTSTR lpLoginToken, LPCTSTR lpClientType, LPCTSTR lpDeviceId, LPCTSTR lpMAC);