From 304f811a55ba2fe339973304d73e957273f01ca7 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 22 Mar 2012 20:59:01 +1000 Subject: Removing ancient, left over, broken and never used, hippo update code. --- linden/indra/newview/hippoupdate.cpp | 93 ------------------------------------ linden/indra/newview/hippoupdate.h | 12 ----- linden/indra/newview/llappviewer.cpp | 1 - 3 files changed, 106 deletions(-) delete mode 100644 linden/indra/newview/hippoupdate.cpp delete mode 100644 linden/indra/newview/hippoupdate.h diff --git a/linden/indra/newview/hippoupdate.cpp b/linden/indra/newview/hippoupdate.cpp deleted file mode 100644 index 848a8fd..0000000 --- a/linden/indra/newview/hippoupdate.cpp +++ /dev/null @@ -1,93 +0,0 @@ - -#include "hippoupdate.h" - -#include -#include -#include - -#include -#include -#include -//#include -#include "llviewercontrol.h" -#include "llviewernetwork.h" -#include "llweb.h" -#include - - -std::string gHippoChannel; - - -// TODO - Um, WTH? Is this actually used anywhere? -// static -bool HippoUpdate::checkUpdate() -{ - llinfos << "Hippo Update Check..." << llendl; - - // get channel name - gHippoChannel = gSavedSettings.getString("ChannelName"); - - // get mac address - char macAddress[18]; - sprintf(macAddress, "%02x:%02x:%02x:%02x:%02x:%02x", - gMACAddress[0], gMACAddress[1], gMACAddress[2], gMACAddress[3], gMACAddress[4], gMACAddress[5]); - - // build URL for update check - char url[1000]; - snprintf(url, 1000, -/* "http://update.mjm.game-host.org/os/viewer.php?" - "product=%s&channel=%s&" - "version_major=%d&version_minor=%d&version_patch=%d&version_base=%s&" - "platform=%s&mac=%s", - LL_PRODUCT, LL_CHANNEL_CSTR, - LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BASE, - LL_PLATFORM*/"", macAddress); - - // query update server - std::string escaped_url = LLWeb::escapeURL(url); - LLSD response = LLHTTPClient::blockingGet(escaped_url.c_str()); - - // check response, return on error - S32 status = response["status"].asInteger(); - if ((status != 200) || !response["body"].isMap()) { - llinfos << "Hippo Update failed (" << status << "): " - << (response["body"].isString()? response["body"].asString(): "") - << llendl; - return true; - } - - // get data from response - LLSD data = response["body"]; - std::string webpage = (data.has("webpage") && data["webpage"].isString())? data["webpage"].asString(): ""; - std::string message = (data.has("message") && data["message"].isString())? data["message"].asString(): ""; - std::string yourVersion = (data.has("yourVersion") && data["yourVersion"].isString())? data["yourVersion"].asString(): ""; - std::string curVersion = (data.has("curVersion") && data["curVersion"].isString())? data["curVersion"].asString(): ""; - bool update = (data.has("update") && data["update"].isBoolean())? data["update"].asBoolean(): false; - bool mandatory = (data.has("mandatory") && data["mandatory"].isBoolean())? data["mandatory"].asBoolean(): false; - - // log and return, if no update available - llinfos << "Your version is " << yourVersion << ", current version is " << curVersion << '.' << llendl; - if (!update) return true; - llinfos << "Update is " << (mandatory? "mandatory.": "optional.") << llendl; - - // show update dialog - char msg[1000]; - snprintf(msg, 1000, - "There is a new viewer version available.\n" - "\n" - "Your version: %s\n" - "Current version: %s\n" - "%s\n" - "Do you want to visit the web site?", - yourVersion.c_str(), curVersion.c_str(), - mandatory? "\nThis is a mandatory update.\n": ""); - S32 button = OSMessageBox(msg, "Hippo OpenSim Viewer Update", OSMB_YESNO); - if (button == OSBTN_YES) { - llinfos << "Taking user to " << webpage << llendl; - LLWeb::loadURLExternal(webpage); - // exit the viewer - return false; - } - - return !mandatory; -} diff --git a/linden/indra/newview/hippoupdate.h b/linden/indra/newview/hippoupdate.h deleted file mode 100644 index 559c8b3..0000000 --- a/linden/indra/newview/hippoupdate.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __HIPPO_UPDATE_H__ -#define __HIPPO_UPDATE_H__ - - -class HippoUpdate -{ - public: - static bool checkUpdate(); -}; - - -#endif diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index e02bfc7..33a71fe 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -179,7 +179,6 @@ #include "hippogridmanager.h" #include "hippolimits.h" -#include "hippoupdate.h" // [RLVa:KB] #include "rlvhandler.h" -- cgit v1.1