base
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "SHSSDK.h"
|
||||
|
||||
// 아래는 개통정보 전달시 전달된 내용입니다.
|
||||
#define ID "nctest"
|
||||
#define PWD "nctest123"
|
||||
#define SERVICE "nctest"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
///////////////////////// SSDK ////////////////////////////////////////////////////////////////////
|
||||
// !!! 중요 !!!
|
||||
// SSDK 가 End User에게 배포가되면 안됩니다.
|
||||
// 그 이유는 보안상 취약점이 발생 하기때문입니다.
|
||||
// 해당 소스는 샘플용일 뿐이며, SSDK는 인증서버를 마련하여 해당 서버에서
|
||||
// 생성해 전달 될 수 있도록 제작되어야 합니다.
|
||||
|
||||
/* SSDK : get service space (Bytes) */
|
||||
long long t = 0, f = 0;
|
||||
if (sh_get_service_info(ID, PWD, SERVICE, &t, &f))
|
||||
{
|
||||
printf("Service [%s] => Total space : %lld, Free space %lld\n", SERVICE, t, f);
|
||||
}
|
||||
else
|
||||
{
|
||||
char errmsg[254] = {0};
|
||||
sh_get_error_msg(sh_get_lasterror(), errmsg);
|
||||
printf("sh_get_service_info ERROR : %d, %s\n", sh_get_lasterror(), errmsg);
|
||||
}
|
||||
///////////////////////// SSDK ////////////////////////////////////////////////////////////////////
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user