303 lines
12 KiB
C
303 lines
12 KiB
C
|
#ifndef _HC_ISUP_SS_H_
|
|||
|
#define _HC_ISUP_SS_H_
|
|||
|
|
|||
|
#include "HCISUPPublic.h"
|
|||
|
|
|||
|
#define MAX_URL_LEN_SS 4096 //ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>URL<52><4C><EFBFBD><EFBFBD>
|
|||
|
#define MAX_KMS_USER_LEN 512 //KMS<4D>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define MAX_KMS_PWD_LEN 512 //KMS<4D><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define MAX_CLOUD_AK_SK_LEN 64 //EHome5.0<EFBFBD>洢Э<EFBFBD><EFBFBD>AK SK<53><4B><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
#define SS_CLIENT_FILE_PATH_PARAM_NAME "File-Path"
|
|||
|
#define SS_CLIENT_VRB_FILENAME_CODE "Filename-Code"
|
|||
|
#define SS_CLIENT_KMS_USER_NAME "KMS-Username"
|
|||
|
#define SS_CLIENT_KMS_PASSWIRD "KMS-Password"
|
|||
|
#define SS_CLIENT_CLOUD_AK_NAME "Access-Key"
|
|||
|
#define SS_CLIENT_CLOUD_SK_NAME "Secret-Key"
|
|||
|
#define SS_CLIENT_CLOUD_POOL_ID "Pool-Id"
|
|||
|
#define SS_CLIENT_CLOUD_SERIAL_ID "Serial-Id"
|
|||
|
#define SS_CLIENT_CENTRAL_AK_NAME "Central-Access-Key"
|
|||
|
#define SS_CLIENT_CENTRAL_SK_NAME "Central-Secret-Key"
|
|||
|
#define SS_CLIENT_CENTRAL_POOL_ID "Central-Pool-Id"
|
|||
|
|
|||
|
#ifndef MAX_PATH
|
|||
|
#define MAX_PATH 260
|
|||
|
#endif
|
|||
|
|
|||
|
enum NET_EHOME_SS_MSG_TYPE
|
|||
|
{
|
|||
|
NET_EHOME_SS_MSG_TOMCAT = 1, //Tomcat<61>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
NET_EHOME_SS_MSG_KMS_USER_PWD, //KMS<4D>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>
|
|||
|
NET_EHOME_SS_MSG_CLOUD_AK, //EHome5.0<EFBFBD>洢Э<EFBFBD><EFBFBD>AK<EFBFBD>ص<EFBFBD>
|
|||
|
NET_EHOME_SS_MSG_ADDR = 4,
|
|||
|
};
|
|||
|
|
|||
|
enum NET_EHOME_SS_CLIENT_TYPE
|
|||
|
{
|
|||
|
NET_EHOME_SS_CLIENT_TYPE_TOMCAT = 1, //TomcatͼƬ<CDBC>ϴ<EFBFBD><CFB4>ͻ<EFBFBD><CDBB><EFBFBD>
|
|||
|
NET_EHOME_SS_CLIENT_TYPE_VRB, //VRBͼƬ<CDBC>ϴ<EFBFBD><CFB4>ͻ<EFBFBD><CDBB><EFBFBD>
|
|||
|
NET_EHOME_SS_CLIENT_TYPE_KMS, //KMSͼƬ<CDBC>ϴ<EFBFBD><CFB4>ͻ<EFBFBD><CDBB><EFBFBD>
|
|||
|
NET_EHOME_SS_CLIENT_TYPE_CLOUD, //EHome5.0<EFBFBD>洢Э<EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
NET_EHOME_SS_CLIENT_TYPE_CENTRAL //<2F><><EFBFBD>Ĵ洢<C4B4><E6B4A2>ʽ<EFBFBD>洢Э<E6B4A2><D0AD>
|
|||
|
};
|
|||
|
|
|||
|
//TomcatͼƬ<CDBC><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>Ϣ
|
|||
|
typedef struct tagNET_EHOME_SS_TOMCAT_MSG
|
|||
|
{
|
|||
|
char szDevUri[MAX_URL_LEN_SS/*4096*/]; //<2F>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>URI
|
|||
|
DWORD dwPicNum; //ͼƬ<CDBC><C6AC>
|
|||
|
char* pPicURLs; //ͼƬURL,ÿ<><C3BF>URL MAX_URL_LEN_SS<53><53><EFBFBD><EFBFBD>
|
|||
|
BYTE byRes[64];
|
|||
|
}NET_EHOME_SS_TOMCAT_MSG, *LPNET_EHOME_SS_TOMCAT_MSG;
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_SS_KMS_MSG
|
|||
|
{
|
|||
|
char* strUserName;
|
|||
|
char* strPassword;
|
|||
|
BYTE byRes[64];
|
|||
|
}NET_EHOME_SS_KMS_MSG, *LPNET_EHOME_SS_KMS_MSG;
|
|||
|
|
|||
|
//<2F><>д<EFBFBD><D0B4>չ<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṹ<EFBFBD><E1B9B9>
|
|||
|
typedef struct tagNET_EHOME_SS_RW_PARAM
|
|||
|
{
|
|||
|
const char* pFileName; //<2F>ļ<EFBFBD><C4BC><EFBFBD>
|
|||
|
void* pFileBuf; //<2F>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DWORD* dwFileLen; //<2F>ļ<EFBFBD><C4BC><EFBFBD>С
|
|||
|
const char* pFileUrl; //<2F>ļ<EFBFBD>url
|
|||
|
void* pUser; //
|
|||
|
BYTE byAct; //<2F><>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-д<>ļ<EFBFBD><C4BC><EFBFBD>1-<2D><><EFBFBD>ļ<EFBFBD>
|
|||
|
BYTE byUseRetIndex; //<2F>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD>ϲ㷵<CFB2>ص<EFBFBD>pRetIndex<65><78>0-<2D><>ʹ<EFBFBD>ã<EFBFBD>1-ʹ<><CAB9>
|
|||
|
BYTE byRes1[2];
|
|||
|
char *pRetIndex; //<2F>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>pRetIndexΪ0ʱ<30><CAB1><EFBFBD>ɲ<EFBFBD><C9B2><EFBFBD><EFBFBD>ã<EFBFBD>pRetIndexΪ1ʱ<31><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
BYTE byRes[56];
|
|||
|
}NET_EHOME_SS_RW_PARAM, *LPNET_EHOME_SS_RW_PARAM;
|
|||
|
|
|||
|
//<2F><><EFBFBD>Ĵ洢<C4B4><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
typedef struct tagNET_EHOME_SS_CENTRAL_PARAM
|
|||
|
{
|
|||
|
const char* pPoolId; //poolId <20><>Դ<EFBFBD><D4B4>id<69><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD>32
|
|||
|
const char* pSerialID; //SerialID <20>豸ID,<2C><><EFBFBD><EFBFBD>64
|
|||
|
const char* pSerialIDUUID; //SerialID+UUID <20><>ʾ<EFBFBD><CABE>Ƶ<EFBFBD>ļ<EFBFBD>key,<2C><><EFBFBD><EFBFBD>64<36><34><EFBFBD>豸ID<49><44><EFBFBD>ȣ<EFBFBD>+32<33><32>UUID<49><44><EFBFBD><EFBFBD>)
|
|||
|
const char* pBeginTime; //<2F><>ʼʱ<CABC><CAB1>
|
|||
|
const char* pEndTime; //<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|||
|
BYTE byPoolIdLength; //poolid <20><><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4>ļ<EFBFBD>ʱ<EFBFBD><CAB1>Ч
|
|||
|
BYTE bySerialIDLength; //SerialID <20><><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4>ļ<EFBFBD>ʱ<EFBFBD><CAB1>Ч
|
|||
|
BYTE bySerialIDUUIDLength;//SerialID+UUID <20><><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>Ƶ<EFBFBD>ļ<EFBFBD>ʱ<EFBFBD><CAB1>Ч
|
|||
|
BYTE byBeginTimeLength; //<2F><>ʼʱ<CABC>䳤<EFBFBD><E4B3A4>
|
|||
|
BYTE byEndTimeLength; //<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD>䳤<EFBFBD><E4B3A4>
|
|||
|
BYTE byTransform; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD>Ҫת<D2AA><D7AA>װ<EFBFBD><D7B0>0 - <20><><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>1-<2D><>Ҫ<EFBFBD><D2AA>Ĭ<EFBFBD><C4AC>Ϊ 0
|
|||
|
BYTE byRes1[2];
|
|||
|
DWORD dwRecordType; //¼<><C2BC><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><EFBFBD><CDB8><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Զ<EFBFBD><D4B6><EFBFBD>
|
|||
|
DWORD dwSourceDataType; //<2F><>Ƶ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD> 4<><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>洢<EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD>֡<EFBFBD><D6A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ļ<EFBFBD>
|
|||
|
DWORD dwHeadSize; //¼<><C2BC>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>
|
|||
|
DWORD dwErrorCode; //<2F><><EFBFBD>Ĵ洢<C4B4><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
BYTE byRes[468];
|
|||
|
}NET_EHOME_SS_CENTRAL_PARAM, *LPNET_EHOME_SS_CENTRAL_PARAM;
|
|||
|
|
|||
|
//<2F>ƴ洢<C6B4>ṹ<EFBFBD><E1B9B9>
|
|||
|
typedef struct tagNET_EHOME_SS_CLOUD_PARAM
|
|||
|
{
|
|||
|
const char* pPoolId; //poolId <20><>Դ<EFBFBD><D4B4>id
|
|||
|
BYTE byPoolIdLength; //poolid <20><><EFBFBD><EFBFBD>
|
|||
|
BYTE byRes1[3];
|
|||
|
DWORD dwErrorCode; //<2F>ƴ洢<C6B4><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
BYTE byRes[500];
|
|||
|
}NET_EHOME_SS_CLOUD_PARAM, *LPNET_EHOME_SS_CLOUD_PARAM;
|
|||
|
|
|||
|
//KMS<4D>ṹ<EFBFBD><E1B9B9>
|
|||
|
typedef struct tagNET_EHOME_SS_KMS_PARAM
|
|||
|
{
|
|||
|
BYTE byRes[512];
|
|||
|
}NET_EHOME_SS_KMS_PARAM, *LPNET_EHOME_SS_KMS_PARAM;
|
|||
|
|
|||
|
//TOMCAT<41>ṹ<EFBFBD><E1B9B9>
|
|||
|
typedef struct tagNET_EHOME_SS_TOMCAT_PARAM
|
|||
|
{
|
|||
|
BYTE byRes[512];
|
|||
|
}NET_EHOME_SS_TOMCAT_PARAM, *LPNET_EHOME_SS_TOMCAT_PARAM;
|
|||
|
|
|||
|
//VRB<52>ṹ<EFBFBD><E1B9B9>
|
|||
|
typedef struct tagNET_EHOME_SS_VRB_PARAM
|
|||
|
{
|
|||
|
BYTE byRes[512];
|
|||
|
}NET_EHOME_SS_VRB_PARAM, *LPNET_EHOME_SS_VRB_PARAM;
|
|||
|
|
|||
|
//<2F>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>չ<EFBFBD>ṹ<EFBFBD><E1B9B9>
|
|||
|
typedef struct tagNET_EHOME_SS_EX_PARAM
|
|||
|
{
|
|||
|
BYTE byProtoType; //<2F>洢Э<E6B4A2><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1-<2D>ƴ洢<C6B4><E6B4A2>2-tomcat<61><74>3-kms<6D><73>4-vrb, 5-<2D><><EFBFBD>Ĵ洢Э<E6B4A2><D0AD>
|
|||
|
BYTE byRes[23];
|
|||
|
union
|
|||
|
{
|
|||
|
NET_EHOME_SS_CLOUD_PARAM struCloud;
|
|||
|
NET_EHOME_SS_TOMCAT_PARAM struTomcat;
|
|||
|
NET_EHOME_SS_KMS_PARAM struKms;
|
|||
|
NET_EHOME_SS_VRB_PARAM struVrb;
|
|||
|
NET_EHOME_SS_CENTRAL_PARAM struCentral;
|
|||
|
}unionStoreInfo;
|
|||
|
}NET_EHOME_SS_EX_PARAM, *LPNET_EHOME_SS_EX_PARAM;
|
|||
|
|
|||
|
//<2F><>Ϣ<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
typedef BOOL(CALLBACK *EHomeSSMsgCallBack)(LONG iHandle, NET_EHOME_SS_MSG_TYPE enumType
|
|||
|
, void *pOutBuffer, DWORD dwOutLen, void *pInBuffer, DWORD dwInLen, void *pUser);
|
|||
|
|
|||
|
//<2F>洢<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
typedef BOOL(CALLBACK *EHomeSSStorageCallBack)(LONG iHandle, const char* pFileName, void *pFileBuf, DWORD dwFileLen, char *pFilePath, void *pUser);
|
|||
|
|
|||
|
|
|||
|
//<2F><>д<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD> byAct 0-д 1-<2D><> 2-ɾ
|
|||
|
typedef BOOL(CALLBACK *EHomeSSRWCallBack)(LONG iHandle, BYTE byAct, const char* pFileName
|
|||
|
, void *pFileBuf, LONG* dwFileLen, const char* pFileUrl, void *pUser);
|
|||
|
|
|||
|
//<2F><>д<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ byAct 0-д 1-<2D><> 2-ɾ pRwParam<61><6D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ洢Э<E6B4A2>鹲<EFBFBD><E9B9B2><EFBFBD>ֶΣ<D6B6>pExStruct<63><74><EFBFBD>ڴ<EFBFBD><DAB4>ݴ洢Э<E6B4A2><D0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>
|
|||
|
typedef BOOL(CALLBACK *EHomeSSRWCallBackEx)(LONG iHandle, NET_EHOME_SS_RW_PARAM* pRwParam, NET_EHOME_SS_EX_PARAM* pExStruct);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
typedef struct tagNET_EHOME_SS_LISTEN_PARAM
|
|||
|
{
|
|||
|
NET_EHOME_IPADDRESS struAddress; //<2F><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>IPΪ0.0.0.0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>Ĭ<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>Ĭ<EFBFBD><EFBFBD>Ϊ<EFBFBD>Ӳ<EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>һ<EFBFBD><EFBFBD>
|
|||
|
char szKMS_UserName[MAX_KMS_USER_LEN]; //KMS<4D>û<EFBFBD><C3BB><EFBFBD>
|
|||
|
char szKMS_Password[MAX_KMS_PWD_LEN]; //KMS<4D><53><EFBFBD><EFBFBD>
|
|||
|
EHomeSSStorageCallBack fnSStorageCb; //ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>洢<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
EHomeSSMsgCallBack fnSSMsgCb; //ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
char szAccessKey[MAX_CLOUD_AK_SK_LEN]; //EHome5.0<EFBFBD>洢Э<EFBFBD><EFBFBD>AK
|
|||
|
char szSecretKey[MAX_CLOUD_AK_SK_LEN]; //EHome5.0<EFBFBD>洢Э<EFBFBD><EFBFBD>SK
|
|||
|
void* pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
BYTE byHttps; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>HTTPs
|
|||
|
BYTE byRes1[3];
|
|||
|
EHomeSSRWCallBack fnSSRWCb; //<2F><>д<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
EHomeSSRWCallBackEx fnSSRWCbEx; //<2F><>д<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>չ
|
|||
|
BYTE bySecurityMode; //[add] by yangzheng 2020/03/13 <20>洢<EFBFBD><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫģʽ<C4A3><CABD><EFBFBD>أ<EFBFBD>Ĭ<EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD>0-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1-<2D>ر<EFBFBD>
|
|||
|
BYTE byRes[51];
|
|||
|
}NET_EHOME_SS_LISTEN_PARAM, *LPNET_EHOME_SS_LISTEN_PARAM;
|
|||
|
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>Https<70><73><EFBFBD><EFBFBD>
|
|||
|
typedef struct tagNET_EHOME_SS_LISTEN_HTTPS_PARAM
|
|||
|
{
|
|||
|
BYTE byHttps; //0-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>HTTPS 1-<2D><><EFBFBD><EFBFBD>HTTPS
|
|||
|
BYTE byVerifyMode; //0-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤(<28><>ֻ֧<D6BB>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD>֤)
|
|||
|
BYTE byCertificateFileType; //֤<><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-pem, 1-ANS1
|
|||
|
BYTE byPrivateKeyFileType; //˽Կ<CBBD><D4BF><EFBFBD><EFBFBD>0-pem, 1-ANS1
|
|||
|
char szUserCertificateFile[MAX_PATH]; //<2F><>Կ֤<D4BF><D6A4><EFBFBD>ļ<EFBFBD>·<EFBFBD><C2B7>
|
|||
|
char szUserPrivateKeyFile[MAX_PATH]; //˽Կ֤<D4BF><D6A4><EFBFBD>ļ<EFBFBD>·<EFBFBD><C2B7>
|
|||
|
|
|||
|
DWORD dwSSLVersion; //SSL Method<6F>汾
|
|||
|
//0 - SSL23, 1 - SSL2, 2 - SSL3, 3 - TLS1.0, 4 - TLS1.1, 5 - TLS1.2
|
|||
|
//SSL23<32>Ǽ<EFBFBD><C7BC><EFBFBD>ģʽ<C4A3><CABD><EFBFBD><EFBFBD>Э<EFBFBD>̿ͻ<CCBF><CDBB>˺ͷ<CBBA><CDB7><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD>߰汾
|
|||
|
|
|||
|
BYTE byRes3[360];
|
|||
|
}NET_EHOME_SS_LISTEN_HTTPS_PARAM, *LPNET_EHOME_SS_LISTEN_HTTPS_PARAM;
|
|||
|
|
|||
|
//ͼƬ<CDBC>ϴ<EFBFBD><CFB4>ͻ<EFBFBD><CDBB>˲<EFBFBD><CBB2><EFBFBD>
|
|||
|
typedef struct tagNET_EHOME_SS_CLIENT_PARAM
|
|||
|
{
|
|||
|
NET_EHOME_SS_CLIENT_TYPE enumType; //ͼƬ<CDBC>ϴ<EFBFBD><CFB4>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
NET_EHOME_IPADDRESS struAddress; //ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
|
|||
|
BYTE byHttps; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>HTTPs
|
|||
|
BYTE byRes[63];
|
|||
|
}NET_EHOME_SS_CLIENT_PARAM, *LPNET_EHOME_SS_CLIENT_PARAM;
|
|||
|
|
|||
|
enum NET_EHOME_SS_INIT_CFG_TYPE
|
|||
|
{
|
|||
|
NET_EHOME_SS_INIT_CFG_SDK_PATH = 1, //<2F><><EFBFBD><EFBFBD>SS<53><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Linux<75>汾֧<E6B1BE>֣<EFBFBD>
|
|||
|
NET_EHOME_SS_INIT_CFG_CLOUD_TIME_DIFF = 2, //<2F><><EFBFBD><EFBFBD><EFBFBD>˴洢<CBB4><E6B4A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ֵ,Ĭ<><C4AC>15<31><35><EFBFBD><EFBFBD>,<2C><>С5<D0A1><35><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>60<36><30><EFBFBD><EFBFBD>
|
|||
|
NET_EHOME_SS_INIT_CFG_PUBLIC_IP_PORT = 3, //<2F><><EFBFBD>ù<EFBFBD><C3B9><EFBFBD><EFBFBD><EFBFBD>ַ(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><D3B3>ʱ)
|
|||
|
NET_EHOME_SS_INIT_CFG_LIBEAY_PATH = 4, //<2F><><EFBFBD><EFBFBD>OpenSSL<53><4C>libeay32.dll<6C><6C>·<EFBFBD><C2B7>
|
|||
|
NET_EHOME_SS_INIT_CFG_SSLEAY_PATH = 5, //<2F><><EFBFBD><EFBFBD>OpenSSL<53><4C>ssleay32.dll<6C><6C>·<EFBFBD><C2B7>
|
|||
|
NET_EHOME_SS_INIT_CFG_SQLITE3_PATH = 6 //<2F><><EFBFBD><EFBFBD>sqlite3<65><33><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
|||
|
};
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_SS_LOCAL_SDK_PATH
|
|||
|
{
|
|||
|
char sPath[MAX_PATH];
|
|||
|
BYTE byRes[128];
|
|||
|
}NET_EHOME_SS_LOCAL_SDK_PATH, *LPNET_EHOME_SS_LOCAL_SDK_PATH;
|
|||
|
|
|||
|
enum NET_EHOME_SS_TYPE
|
|||
|
{
|
|||
|
NET_EHOME_SS_TYPE_TOMCAT = 1, //Tomcat
|
|||
|
NET_EHOME_SS_TYPE_VRB, //VRB
|
|||
|
NET_EHOME_SS_TYPE_KMS, //KMS
|
|||
|
NET_EHOME_SS_TYPE_CLOUD, //EHome5.0<EFBFBD>洢Э<EFBFBD><EFBFBD>
|
|||
|
NET_EHOME_SS_TYPE_CENTRAL //<2F><><EFBFBD>Ĵ洢<C4B4><E6B4A2>ʽ<EFBFBD>洢Э<E6B4A2><D0AD>
|
|||
|
};
|
|||
|
|
|||
|
//ͼƬURI
|
|||
|
typedef struct tagNET_EHOME_SS_STORAGE_URI
|
|||
|
{
|
|||
|
NET_EHOME_SS_TYPE enumType; //[in]ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD>
|
|||
|
char szFilename[256]; // [in]<5D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ʶ
|
|||
|
char szUri[MAX_URL_LEN_SS/*4096*/]; // [out]<5D><><EFBFBD>ɵ<EFBFBD>URL
|
|||
|
BYTE byRes[64];
|
|||
|
}NET_EHOME_SS_STORAGE_URI, *LPNET_EHOME_SS_STORAGE_URI;
|
|||
|
|
|||
|
#define SS_DB_KEY_MAX_LEN 32
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_SS_INIT_PARAM
|
|||
|
{
|
|||
|
char szKey[SS_DB_KEY_MAX_LEN/*32*/]; //<2F><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD>Կ<EFBFBD><D4BF><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>
|
|||
|
BYTE byRes[224]; //<2F><><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD>
|
|||
|
}NET_EHOME_SS_INIT_PARAM, *LPNET_EHOME_SS_INIT_PARAM;
|
|||
|
|
|||
|
|
|||
|
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC>
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_Init();
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_Init_V11(NET_EHOME_SS_INIT_PARAM *pParam);
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_Fini();
|
|||
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
NET_DVR_API DWORD CALLBACK NET_ESS_GetLastError();
|
|||
|
|
|||
|
//<2F><>־
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_SetLogToFile(LONG iLogLevel, const char *strLogDir, BOOL bAutoDel);
|
|||
|
|
|||
|
//<2F><>ȡ<EFBFBD>汾<EFBFBD><E6B1BE>
|
|||
|
NET_DVR_API DWORD CALLBACK NET_ESS_GetBuildVersion();
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>HTTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Https<70><73><EFBFBD><EFBFBD>
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_SetListenHttpsParam(NET_EHOME_SS_LISTEN_HTTPS_PARAM* pSSHttpsParam);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>ͼƬURI
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_GenerateStorageUri(NET_EHOME_SS_STORAGE_URI* pSSStorageUri);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
NET_DVR_API LONG CALLBACK NET_ESS_StartListen(NET_EHOME_SS_LISTEN_PARAM* pSSListenParam);
|
|||
|
//<2F>رռ<D8B1><D5BC><EFBFBD>
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_StopListen(LONG lListenHandle);
|
|||
|
|
|||
|
//<2F><><EFBFBD>ó<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_SetSDKInitCfg(NET_EHOME_SS_INIT_CFG_TYPE enumType, void* const lpInBuff);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>ͼƬ<CDBC>ϴ<EFBFBD>/<2F><><EFBFBD>ؿͻ<D8BF><CDBB><EFBFBD>
|
|||
|
NET_DVR_API LONG CALLBACK NET_ESS_CreateClient(NET_EHOME_SS_CLIENT_PARAM* pClientParam);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>ͼƬ<CDBC>ϴ<EFBFBD>/<2F><><EFBFBD>ؿͻ<D8BF><CDBB>˳<EFBFBD>ʱʱ<CAB1><CAB1>,<2C><>λms,Ĭ<><C4AC>Ϊ5s
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_ClientSetTimeout(LONG lHandle, DWORD dwSendTimeout, DWORD dwRecvTimeout);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>ͼƬ<CDBC>ϴ<EFBFBD>/<2F><><EFBFBD>ؿͻ<D8BF><CDBB>˲<EFBFBD><CBB2><EFBFBD>
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_ClientSetParam(LONG lHandle, const char* strParamName, const char* strParamVal);
|
|||
|
|
|||
|
//ͼƬ<CDBC>ϴ<EFBFBD>/<2F><><EFBFBD>ؿͻ<D8BF><CDBB><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD>ϴ<EFBFBD>
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_ClientDoUpload(LONG lHandle, char* strUrl, LONG dwUrlLen);
|
|||
|
|
|||
|
//ͼƬ<CDBC>ϴ<EFBFBD>/<2F><><EFBFBD>ؿͻ<D8BF><CDBB><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_ClientDoDownload(LONG lHandle, char* strUrl, void** pFileContent, DWORD& dwContentLen);
|
|||
|
|
|||
|
//<2F><><EFBFBD>ٿͻ<D9BF><CDBB><EFBFBD>
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_DestroyClient(LONG lHandle);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>HMAC-SHA256
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_HAMSHA256(const char* pSrc, const char* pSecretKey, char* pSingatureOut, DWORD dwSingatureLen);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Կ
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_GENERATE_SECRETKEY(const char* pSrc, const char* pKey, char* pSecretKeyOut, DWORD dwSecretKeyLen);
|
|||
|
|
|||
|
//ͼƬ<CDBC>ϴ<EFBFBD><CFB4>ͻ<EFBFBD><CDBB><EFBFBD>ִ<EFBFBD><D6B4>ɾ<EFBFBD><C9BE>
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_ClientDoDelete(LONG lHandle, char* strUrl);
|
|||
|
|
|||
|
//ͼƬ<CDBC>ϴ<EFBFBD><CFB4>ͻ<EFBFBD><CDBB><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD>ϴ<EFBFBD>ʹ<EFBFBD><CAB9>ͼƬbuffer
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESS_ClientDoUploadBuffer(LONG lHandle, char* strUrl, DWORD dwUrlLen, void*pFileContent, DWORD dwContentLen);
|
|||
|
|
|||
|
#endif //_HC_ISUP_SS_H_
|
|||
|
|