Files
interactive/gms/KT/sdkfreebsd64/SHSSDK.h
2026-08-07 17:38:18 +09:00

112 lines
2.7 KiB
C

#ifndef _SHSDK_H
#define _SHSDK_H
#include <time.h>
#ifdef WIN32
typedef __int64 INT64;
typedef __int64* PINT64;
typedef int BOOL;
#else
typedef long long INT64;
typedef long long* PINT64;
#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, // 알수 없는 에러
};
typedef struct tranlog_data{
char *sessionid; // 세션 ID char*
char *filename; // 파일명 char*
unsigned long long length; // 사이즈 long long
int ndirection; // 업다운여부
time_t startdate; // 시작시간 time_t
time_t enddate; // 종료시간 time_t
struct tranlog_data *pnext; // 다음 로그데이타 포인터
}TRANSFER_LOG_DATA,*LPTRANSFER_LOG_DATA;
const char *sh_get_service_host(
const char *userId, // 사용자 ID
const char *password, // 사용자 비밀번호
const char *serviceId // 서비스 ID
);
const int sh_get_service_info(
const char *userId, // 사용자 ID
const char *password, // 사용자 비밀번호
const char *serviceId, // 서비스 ID
PINT64 totalSpace, // 전체 용량
PINT64 freeSpace // 남은 용량
);
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)
);
const char *sh_decrypt(
const char *encrypted, // 암호화된 문자열
int acceptGap // 허용 시간 차
);
void sh_set_timeout(
int second // 접속대기시간()
);
void sh_set_cache_file(
const char *file_path // 캐쉬파일 저장 경로
);
const char* sh_get_uri_by_filename(
const char* szHost, // 서버 주소
const char *userId, // 사용자 ID
const char *password, // 사용자 비밀 번호
const char* uri, // 패스 URI
int ncount, // 다운로드 횟수
int nexpire); // 다운로드 만료 시한
LPTRANSFER_LOG_DATA sh_get_transfer_log_list(
const char *userId, // 사용자 ID
const char *password, // 사용자 비밀번호
const char *serviceId, // 서비스 ID
const char* szSessionID, // 세션 ID
time_t sTime, // 시작시간
time_t eTime, // 종료시간
int nDelete, // 삭제 여부
int nDirection // Up/Down 여부
);
void sh_free_transfer_log(
LPTRANSFER_LOG_DATA ploglist // 로그리스트 포인터
);
#ifdef __cplusplus
}
#endif
#endif