123456789101112131415161718192021222324252627282930313233343536373839 |
- #include "CloudApi.h"
- #include "qcloud.h"
- #include "eSDKOBS.h"
- static int g_type=0;
- void CloudSetYunType(int type)//0ÌÚѶ 1»ªÎª
- {
- g_type = type;
- }
- void InitQCLoud(unsigned long long appid, char* access_key, char* secret_key, char* region, char* bucket_name)
- {
- Qcloud_Init(appid, access_key, secret_key, region, bucket_name);
- }
- void InitHuaweiCLoud(char * hostName, char * accessKey, char * SecretKey, char * bucketName)
- {
- HWCloud_Init(hostName, accessKey, SecretKey, bucketName,0);
- }
- bool CloudPutFile(char* object_name, char* file_path, char url[], char ret[])
- {
- if (g_type==0)
- {
- return Qcloud_PutFromFile(object_name, file_path, url, ret);
- }
- else
- {
- return HWCloud_PutFromFile(object_name, file_path, url, ret);
- }
- }
- bool CloudPutFile(char* object_name, char* file_path, char url[])
- {
- if (g_type == 0)
- {
- return Qcloud_PutFromFile(object_name, file_path, url);
- }
- else
- {
- return HWCloud_PutFromFile(object_name, file_path, url, NULL);
- }
- }
|