From cbc14c8a3c6614987d2331057e114d92336cbac0 Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Sat, 19 Dec 2009 04:40:42 -0500 Subject: Added support for resources.xml from update server... Also added option to download music optionally I had to edit the XML wrapper a bit, basicilly its constructor can now take a optional thrid arguement which will tell it to use a resman or open the file directly Also I added fallback support for the old resouce2.txt so servers don't have to upgrade if they do not want to --- src/gui/updatewindow.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/gui/updatewindow.h') diff --git a/src/gui/updatewindow.h b/src/gui/updatewindow.h index 8388b722..55415938 100644 --- a/src/gui/updatewindow.h +++ b/src/gui/updatewindow.h @@ -39,6 +39,16 @@ class Button; class ProgressBar; class ScrollArea; +struct updateFile +{ + public: + std::string name; + std::string hash; + std::string type; + bool required; + std::string desc; +}; + /** * Update progress window GUI * @@ -95,6 +105,12 @@ class UpdaterWindow : public Window, public gcn::ActionListener, private: void download(); + /** + * Loads the updates this window has gotten into the resource manager + */ + void loadUpdates(); + + /** * A download callback for progress updates. */ @@ -160,10 +176,10 @@ private: Net::Download *mDownload; /** List of files to download. */ - std::vector mLines; + std::vector mUpdateFiles; /** Index of the file to be downloaded. */ - unsigned int mLineIndex; + unsigned int mUpdateIndex; gcn::Label *mLabel; /**< Progress bar caption. */ Button *mCancelButton; /**< Button to stop the update process. */ -- cgit v1.2.3-70-g09d2