This reverts commit 1772027e9e.
1772027e9e
@ -5267,5 +5267,10 @@ VendorCtrl* CPhoneDevice::MakeVendorCtrl(int vendor, uint8_t channel, const std:
// Hang Yu - New
vendorCtrl = new HangYuCtrl(ip, userName, password, channel, netHandle, syncTime);
}
if (syncTime)
{
time_t ts = time(NULL);
vendorCtrl->UpdateTime(ts);
return vendorCtrl;
@ -12,16 +12,6 @@
#include <cstring>
#include <algorithm>
HangYuCtrl::HangYuCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime)
: VendorCtrl(ip, userName, password, channel, netHandle, syncTime)
UpdateTime(ts);
HangYuCtrl::~HangYuCtrl()
@ -10,7 +10,7 @@
class HangYuCtrl : public VendorCtrl
public:
HangYuCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime = true);
using VendorCtrl::VendorCtrl;
virtual ~HangYuCtrl();
virtual bool SetOsd(uint8_t channel, std::string osd, uint8_t pos);
HikonCtrl::HikonCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime)
HikonCtrl::~HikonCtrl()
class HikonCtrl : public VendorCtrl
HikonCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime = true);
virtual ~HikonCtrl();
@ -8,16 +8,6 @@
#include <json/json.h>
YuShiCtrl::YuShiCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime)
YuShiCtrl::~YuShiCtrl()
@ -10,8 +10,7 @@
class YuShiCtrl : public VendorCtrl
// using VendorCtrl::VendorCtrl;
YuShiCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime = true);
virtual ~YuShiCtrl();