/*
 * kk_connect.h
 *
 *  Created on: 2020年10月1日
 *      Author: hj
 */

#ifndef KK_CONNECT_H_
#define KK_CONNECT_H_

#include <sys/types.h>
#include <vector>
#include <string>

#include "json/value.h"
// #include "../KK_HwDevManager.h"

using namespace std;

class EH_FindCCU;

class kk_connect{
public:
    static kk_connect* GetInstance();

	kk_connect();
    virtual ~kk_connect();

    int init(string ccuId, string accessKey,bool autoDestroyHandler);
    static void* run0(void* opt);
	void destroy();

private:
    static kk_connect* ms_instance;
	void* run(void* opt);
	string sendLoginReq(string msg);

private:
	string ccuId;
	string accessKey;
    string ccuServerIp;
    string ccuLocalIP;
    u_short ccuServerPort;
    string ccuSn;
    bool autoDestroyHandler;

    EH_FindCCU* findCCU;
    // string cacheInputMsg;
};

#endif /* KK_CONNECT_H_ */
