base
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
#ifndef _SHSDK_H
|
||||
#define _SHSDK_H
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#ifdef __SSDK_LIB__
|
||||
# define WIN32DLL
|
||||
#else // __SSDK_LIB__
|
||||
# if defined(SHSSDK_EXPORTS)
|
||||
# define WIN32DLL __declspec(dllexport)
|
||||
# else
|
||||
# define WIN32DLL __declspec(dllimport)
|
||||
# endif
|
||||
#endif // __SSDK_LIB__
|
||||
|
||||
typedef __int64 INT64;
|
||||
typedef __int64* PINT64;
|
||||
typedef int BOOL;
|
||||
#else
|
||||
# define WIN32DLL
|
||||
typedef long long INT64;
|
||||
typedef long long* PINT64;
|
||||
#endif
|
||||
|
||||
#ifdef _SP_SDK_
|
||||
#include "SHSSDK_EXT.h"
|
||||
#endif //
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// SSDK 커스텀 에러번호
|
||||
enum SHSSDK_ERRNO {
|
||||
SHERRNO_UNDEFINED = 30000,
|
||||
SHERRNO_AUTHORIZATION = 31000,
|
||||
SHERRNO_INTERNAL = 31001,
|
||||
SHERRNO_NOSERVICE = 32000,
|
||||
SHERRNO_NOCACHEFILE = 33000,
|
||||
SHERRNO_INVALIDCACHEFILE = 33001,
|
||||
};
|
||||
|
||||
enum SASSDK_ERRNO {
|
||||
ERR_RCTRAN_NOT_EXSIT_URI = 0x3a27, // 존재하지 않는 URI
|
||||
ERR_RCTRAN_USERID_NOT_FOUND = 0x3a24, // 존재하지 않는 ID
|
||||
ERR_RCTRAN_PASSWORD_NOT_MATCH = 0x3a25, // 패스워드 에러
|
||||
ERR_RCTRAN_NOT_DEFINED = 0x00, // 알수 없는 에러
|
||||
};
|
||||
|
||||
WIN32DLL const char *sh_get_service_host(
|
||||
const char *userId, // 사용자 ID
|
||||
const char *password, // 사용자 비밀번호
|
||||
const char *serviceId // 서비스 ID
|
||||
);
|
||||
|
||||
WIN32DLL void sh_mem_free(void* pData);
|
||||
|
||||
WIN32DLL const int sh_get_service_info(
|
||||
const char *userId, // 사용자 ID
|
||||
const char *password, // 사용자 비밀번호
|
||||
const char *serviceId, // 서비스 ID
|
||||
PINT64 totalSpace, // 전체 용량
|
||||
PINT64 freeSpace // 남은 용량
|
||||
);
|
||||
|
||||
WIN32DLL const char *sh_get_auth_string(
|
||||
const char *userId, // 사용자 ID
|
||||
const char *password, // 사용자 비밀번호
|
||||
const char *serviceId, // 서비스 ID
|
||||
const char *authKey, // 인증 키
|
||||
const char *authFile, // 인증서 파일 경로
|
||||
time_t expire // 만기시간 (BASE 1970-01-01 00:00:00)
|
||||
);
|
||||
|
||||
WIN32DLL const char *sh_decrypt(
|
||||
const char *encrypted, // 암호화된 문자열
|
||||
int acceptGap // 허용 시간 차
|
||||
);
|
||||
|
||||
WIN32DLL void sh_set_timeout(
|
||||
int second // 접속대기시간(초)
|
||||
);
|
||||
|
||||
WIN32DLL void sh_set_cache_file(
|
||||
const char *file_path // 캐쉬파일 저장 경로
|
||||
);
|
||||
|
||||
WIN32DLL int sh_get_lasterror();
|
||||
|
||||
WIN32DLL void sh_get_error_msg(
|
||||
int code, // error code
|
||||
char* errstr // error string
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user