80 lines
2.3 KiB
C++
80 lines
2.3 KiB
C++
/*************************************************************************
|
|
*
|
|
* DeepCam CONFIDENTIAL
|
|
* FILE: face-detector-tracker.py
|
|
*
|
|
* [2016] - [2017] DeepCam, LLC and DeepCam
|
|
|
|
NOTICE:
|
|
* All information contained herein is, and remains the property of DeepCam LLC.
|
|
* The intellectual and technical concepts contained herein are proprietary to DeepCam
|
|
* and may be covered by U.S. and Foreign Patents,patents in process, and are protected by
|
|
* trade secret or copyright law.
|
|
* Dissemination of this information or reproduction of this material
|
|
* is strictly forbidden unless prior written permission is obtained
|
|
* DeepCam, LLC.
|
|
*
|
|
*
|
|
* Written: Delong Qi
|
|
* Date: 08/11/2017
|
|
* Mail: delong.qi@deepcam.com
|
|
*/
|
|
|
|
#ifndef __REQUEST_H
|
|
#define __REQUEST_H
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <curl\curl.h>
|
|
#include <json\json.h>
|
|
|
|
using namespace std;
|
|
bool Encrypt_AES_CBC(string & key, string & srcData, string & encryptData);
|
|
bool Decrypt_AES_CBC(string & key, string & srcData, string & decryptData);
|
|
|
|
/*
|
|
int _getTimestampFormatString(char * strTime);
|
|
int _getTimeString(char * strTime);
|
|
|
|
bool Encrypt_AES_CBC(string & key, string & srcData, string & encryptData);
|
|
bool Decrypt_AES_CBC(string & key, string & srcData, string & decryptData);
|
|
|
|
bool IsPathExist(const string & strPath);
|
|
bool FileRename(const string &OldName, const string &NewName);
|
|
|
|
int EncryptFileEx(string filename);
|
|
int DecryptFileEx(string filename, bool bToTmpFile = false);
|
|
|
|
struct Mac_Key
|
|
{
|
|
string _Mac;
|
|
string _MacKey;
|
|
};
|
|
struct AuthorizeConfigs
|
|
{
|
|
string _Type; //1:Local without Mac 2:Local with Macs 3:Network
|
|
string _LimitTime;
|
|
string _PackageName;
|
|
string _AuthorizeKey;
|
|
string _ToolKey; //5th line of Key file.(When _Type "2")
|
|
vector<Mac_Key> _MacKeys; //6th-End lines of Key file.(When _Type "2")
|
|
string _ActivateUrl; //5th line of Key file.(When _Type "3")
|
|
string _ActivateLocalCipher; //6th line of Key file.(When _Type "3")
|
|
};
|
|
int GetAuthorizeConfigs(string filename, AuthorizeConfigs & configs);
|
|
*/
|
|
|
|
class Request
|
|
{
|
|
public:
|
|
Request(void);
|
|
~Request(void);
|
|
int post(string &url,string &data,int timeout = -1);
|
|
int post(string &url,string &data,string &files,string & strData,int timeout = -1);
|
|
bool downloadFile(string & fileUrl, string & fileName);
|
|
};
|
|
|
|
|
|
#endif
|
|
|