const std::string GetMinorModifier() { #if defined(UNITSYNC) || !defined(CUSTOM_ENGINE_TYPE) return ""; #endif return (GetMinorVersion() == 0) ? "" : ("-" + GetMinorVersion()); }
std::string Isa::GetFullName() const { std::stringstream full_name; full_name << GetVendor() << ":" << GetArchitecture() << ":" << GetMajorVersion() << ":" << GetMinorVersion() << ":" << GetStepping(); return full_name.str(); }
bool Handshake::IsValid() const { if (! (memcmp(Magic, Protocol::Magic, sizeof(Protocol::Magic)) == 0)) return false; if (! (Space == ' ')) return false; if (! (Dot == '.')) return false; if (! (Newline == '\n')) return false; if (! (GetMajorVersion() >= 0)) return false; if (! (GetMinorVersion() >= 0)) return false; return true; return memcmp(Magic, Protocol::Magic, sizeof(Protocol::Magic)) == 0 && Space == ' ' && Dot == '.' && Newline == '\n' && GetMajorVersion() >= 0 && GetMinorVersion() >= 0; }
CString CInternetExplorerVersion::GetVersionString(void) { CString csVersion; csVersion.Format("%u.%u.%u.%u", GetMajorVersion(), GetMinorVersion(), GetBuild(), GetSubBuild()); return csVersion; }
BOOL CInternetExplorerVersion::IsVersion4(void) const { BOOL fResult = FALSE; if (IsValid()) { fResult = (GetMajorVersion() == 4) && (GetMinorVersion() >= 71); } return fResult; }
bool WillRestartEngine(const std::string& message) { if ((reqEngineType >= 0 && (reqEngineType != GetCurrentEngineType())) || (reqEngineMinor >= 0 && (reqEngineMinor != GetMinorVersion()))) { EngineTypeInfo* eti = GetEngineTypeInfo(reqEngineType); if (eti == NULL) { LOG_L(L_ERROR, "Unknown engine type: %d", reqEngineType); } else { std::string newexe = eti->exe; if (reqEngineMinor > 0) newexe += boost::str(boost::format("-%d") %reqEngineMinor); LOG("Preparing to start %s", newexe.c_str()); SetRestartExecutable(newexe, message); return true; } } return false; }
void *RequestProc(void *p) { TRequest request; memset(&request, 0, sizeof(TRequest)); request.nStartByte = REQUEST_START_BYTE; request.nMajorVersion = GetMajorVersion(); request.nMinorVersion = GetMinorVersion(); request.nCustomerID = CUSTOMER_ID; if ( bparam.stIEBaseParam.dwDeviceID[0] != 0 ) strcpy(request.szID, bparam.stIEBaseParam.dwDeviceID); char server_ip[32] = {0}; GetDownloadServerIPAddress(server_ip); while(1) { sleep(REQUEST_FREQUENCY); //ONE HOUR Request Once TiNetUdpSend( server_ip, (Int8 *)&request, sizeof(TRequest)); } }
bool Client::AreServicesSupported() const { return Features::iRemoteServices(GetMajorVersion(), GetMinorVersion()); }
bool Client::IsZoomingSupported() const { return Features::iRemoteZooming(GetMajorVersion(), GetMinorVersion()); }
bool Client::SupportPasswordProtection() const { return Features::iRemotePasswordProtection(GetMajorVersion(), GetMinorVersion()); }