<commit_before>//------------------------------------------------------------------------------
// File: oapis.hpp
//
// Desc: OpenCVR API - OpenCVR API.
//
// Copyright (c) 2014-2018 opencvr.com. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __VSC_OAPIS_H_
#define __VSC_OAPIS_H_
#include "oapicmn.hpp"
#include "factory.hpp"
#include "oapiproto.hpp"
#include "XSDK/XHash.h"
#include "XSDK/TimeUtils.h"
#include "XSDK/XSocket.h"
#include "XSDK/XSSLSocket.h"
#include "Poco/UUIDGenerator.h"
#include "XSDK/XMD5.h"

using namespace XSDK;
using namespace std;
using namespace oapi;
using namespace Poco;

class OAPIConverter
{
public:
	inline static BOOL Converter(VSCDeviceData__ &from, oapi::Device &to);
	inline static BOOL Converter(oapi::Device &from, VSCDeviceData__ &to);
};

/* a internal thread to process all the request of XSocket */
class OAPIServer
{
public:
	inline OAPIServer(XRef<XSocket> pSocket, Factory &pFactory);
	inline ~OAPIServer();
public:
	inline BOOL Process(OAPIHeader &header);<commit_msg>add cloud api<commit_after>//------------------------------------------------------------------------------
// File: oapis.hpp
//
// Desc: OpenCVR API - OpenCVR API.
//
// Copyright (c) 2014-2018 opencvr.com. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __VSC_OAPIS_H_
#define __VSC_OAPIS_H_
#include "oapicmn.hpp"
#include "factory.hpp"
#include "oapiproto.hpp"
#include "XSDK/XHash.h"
#include "XSDK/TimeUtils.h"
#include "XSDK/XSocket.h"
#include "XSDK/XSSLSocket.h"
#include "Poco/UUIDGenerator.h"
#include "XSDK/XMD5.h"

using namespace XSDK;
using namespace std;
using namespace oapi;
using namespace Poco;

class OAPIConverter
{
public:
	inline static BOOL Converter(VSCDeviceData__ &from, oapi::Device &to);
	inline static BOOL Converter(VSCDeviceData__ &from, 
						cloudapi::CloudAPIDevice &to);
	inline static BOOL Converter(oapi::Device &from, VSCDeviceData__ &to);
};

/* a internal thread to process all the request of XSocket */
class OAPIServer
{
public:
	inline OAPIServer(XRef<XSocket> pSocket, Factory &pFactory);
	inline ~OAPIServer();
public:
	inline BOOL Process(OAPIHeader &header);
{'fraction_non_alphanumeric': 0.247001332741004, 'fraction_numerical': 0.007996446023989337, 'mean_word_length': 2.597444089456869, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2042949', 'n_tokens_mistral': 767, 'n_tokens_neox': 729, 'n_words': 190}