summaryrefslogtreecommitdiff
path: root/src/gui/updatewindow.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-23 16:56:34 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-23 16:56:34 +0000
commit2590eefea680fa4e76de4e7ea25090cc97bd3488 (patch)
tree231dee28e4edca0b64cf0d17e67746ad4fdc6960 /src/gui/updatewindow.h
parent2003fd3534a312128c620e7e36902ac07045516e (diff)
downloadMana-2590eefea680fa4e76de4e7ea25090cc97bd3488.tar.gz
Mana-2590eefea680fa4e76de4e7ea25090cc97bd3488.tar.bz2
Mana-2590eefea680fa4e76de4e7ea25090cc97bd3488.tar.xz
Mana-2590eefea680fa4e76de4e7ea25090cc97bd3488.zip
* docs/HACKING.txt: Added info about member naming and ChangeLog
format. * src/gui/updatewindow.h, src/gui/updatewindow.cpp: Changed member names, set a 15 second timeout for connecting to update server and restore some doxygen comments.
Diffstat (limited to 'src/gui/updatewindow.h')
-rw-r--r--src/gui/updatewindow.h104
1 files changed, 50 insertions, 54 deletions
diff --git a/src/gui/updatewindow.h b/src/gui/updatewindow.h
index 805d55df..b1d58a78 100644
--- a/src/gui/updatewindow.h
+++ b/src/gui/updatewindow.h
@@ -81,23 +81,24 @@ class UpdaterWindow : public Window, public gcn::ActionListener
int updateState;
protected:
-
void download();
- /*
- * The tread function that download the files
+ /**
+ * The tread function that download the files.
*/
static int downloadThread(void *ptr);
- /*
- * A libcurl callback
+ /**
+ * A libcurl callback for progress updates.
*/
- static int updateProgress(void *ptr, double dt, double dn, double ut, double un);
+ static int updateProgress(void *ptr,
+ double dt, double dn, double ut, double un);
- /*
- * A libcurl callback
+ /**
+ * A libcurl callback for writing to memory.
*/
- static size_t memoryWrite(void *ptr, size_t size, size_t nmemb, FILE *stream);
+ static size_t memoryWrite(void *ptr, size_t size, size_t nmemb,
+ FILE *stream);
enum DownloadStatus
{
@@ -109,73 +110,68 @@ class UpdaterWindow : public Window, public gcn::ActionListener
UPDATE_RESOURCES
};
- /*
- * A thread that use libcurl to download updates
+ /**
+ * A thread that use libcurl to download updates.
*/
- class SDL_Thread *m_thread;
+ class SDL_Thread *mThread;
- /*
- * A mutex to protect shared data betwed the threads
+ /**
+ * A mutex to protect shared data between the threads.
*/
- class SDL_mutex *m_mutex;
+ class SDL_mutex *mMutex;
-
- /*
- * Status of the current download
+ /**
+ * Status of the current download.
*/
- DownloadStatus m_downloadStatus;
+ DownloadStatus mDownloadStatus;
- /*
- * host where we get the updated files
+ /**
+ * Host where we get the updated files.
*/
- std::string m_updateHost;
+ std::string mUpdateHost;
- /*
- * the file currently downloading
+ /**
+ * The file currently downloading.
*/
- std::string m_currentFile;
+ std::string mCurrentFile;
- /*
- * Absolute path to locally save downloaded files
+ /**
+ * Absolute path to locally save downloaded files.
*/
- std::string m_basePath;
+ std::string mBasePath;
- /*
- * A flag to know if we must write the downloaded file
- * in m_memoryBuffer instead of a regular file
+ /**
+ * A flag to know if we must write the downloaded file to a memory buffer
+ * instead of a regular file.
*/
- bool m_storeInMemory;
+ bool mStoreInMemory;
- /*
- * flag that show if current download is complete
+ /**
+ * Flag that show if current download is complete.
*/
- bool m_downloadComplete;
+ bool mDownloadComplete;
- /*
- * byte count currently downloaded in m_memoryBuffer
+ /**
+ * Byte count currently downloaded in mMemoryBuffer.
*/
- int m_downloadedBytes;
+ int mDownloadedBytes;
- /*
- * buffer where to put downloaded file which are
- * not stored in file system
+ /**
+ * Buffer where to put downloaded file which are not stored in file system.
*/
- char *m_memoryBuffer;
+ char *mMemoryBuffer;
- /*
- * buffer to handler human readable error provided by curl
+ /**
+ * Buffer to handler human readable error provided by curl.
*/
- char *m_curlError;
-
- std::string labelText; /**< Text for caption label */
-
- gcn::Label *label; /**< Progress bar caption */
- Button *cancelButton; /**< Button to stop the update process */
- Button *playButton; /**< Button to start playing */
- ProgressBar *progressBar; /**< Update progress bar */
- BrowserBox* browserBox; /**< Box to display news */
- ScrollArea *scrollArea; /**< Used to scroll news box */
+ char *mCurlError;
+ gcn::Label *mLabel; /**< Progress bar caption. */
+ Button *mCancelButton; /**< Button to stop the update process. */
+ Button *mPlayButton; /**< Button to start playing. */
+ ProgressBar *mProgressBar; /**< Update progress bar. */
+ BrowserBox* mBrowserBox; /**< Box to display news. */
+ ScrollArea *mScrollArea; /**< Used to scroll news box. */
};
void updateData();