Changeset 4056 in orxonox.OLD for orxonox/trunk/src/lib/gui/gui/gui_update.cc
- Timestamp:
- May 5, 2005, 1:43:20 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/gui/gui/gui_update.cc
r4054 r4056 35 35 \brief Creates an Update-Frame 36 36 */ 37 OrxonoxGuiUpdate::OrxonoxGuiUpdate(void)37 GuiUpdate::GuiUpdate(void) 38 38 { 39 39 this->tmpDir = NULL; … … 73 73 \brief Destructs the Update-stuff 74 74 */ 75 OrxonoxGuiUpdate::~OrxonoxGuiUpdate(void)75 GuiUpdate::~GuiUpdate(void) 76 76 { 77 77 … … 81 81 \brief Look what info we can get from this system 82 82 */ 83 bool OrxonoxGuiUpdate::getSystemInfo(void)83 bool GuiUpdate::getSystemInfo(void) 84 84 { 85 85 PRINTF(3)("Grabbing system information\n"); … … 107 107 108 108 #ifdef HAVE_CURL 109 bool* OrxonoxGuiUpdate::checkForUpdates(void)109 bool* GuiUpdate::checkForUpdates(void) 110 110 { 111 111 PRINTF(3)("checking for new version of orxonox\n"); … … 122 122 \brief Creates a window, and all it contains for the Data-update. 123 123 */ 124 void OrxonoxGuiUpdate::updateDataWindowCreate(void)124 void GuiUpdate::updateDataWindowCreate(void) 125 125 { 126 126 this->updateDataWindow = new Window("update orxonox::Data"); … … 161 161 \returns A Pointer to the Button of the UpdaterDataWindow 162 162 */ 163 Button* OrxonoxGuiUpdate::updateDataWindowGetButton(void)163 Button* GuiUpdate::updateDataWindowGetButton(void) 164 164 { 165 165 return this->updateDataWindowButton; … … 169 169 \brief Creates a window, and all it contains for the Source-update. 170 170 */ 171 void OrxonoxGuiUpdate::updateSourceWindowCreate(void)171 void GuiUpdate::updateSourceWindowCreate(void) 172 172 { 173 173 // the button, that opens this Window. … … 200 200 \returns A Pointer to the Button of the UpdaterSourceWindow 201 201 */ 202 Button* OrxonoxGuiUpdate::updateSourceWindowGetButton(void)202 Button* GuiUpdate::updateSourceWindowGetButton(void) 203 203 { 204 204 return this->updateSourceWindowButton; … … 213 213 \param button The Button, that triggered this event. 214 214 */ 215 gint OrxonoxGuiUpdate::updateDataFunc(GtkWidget* w, GdkEventKey* event, void* info)215 gint GuiUpdate::updateDataFunc(GtkWidget* w, GdkEventKey* event, void* info) 216 216 { 217 217 FileInfo* dataInfo =(FileInfo*)info; … … 230 230 \param button The Button, that triggered this event. 231 231 */ 232 gint OrxonoxGuiUpdate::updateSourceFunc(GtkWidget* w, GdkEventKey* event, void* bar)232 gint GuiUpdate::updateSourceFunc(GtkWidget* w, GdkEventKey* event, void* bar) 233 233 { 234 234 ProgressBar* tmpBar = static_cast<ProgressBar*>(bar); … … 245 245 \param stream Filehandler to write to. 246 246 */ 247 size_t OrxonoxGuiUpdate::curlWriteFunc(void* ptr, size_t size, size_t nmemb, FILE* stream)247 size_t GuiUpdate::curlWriteFunc(void* ptr, size_t size, size_t nmemb, FILE* stream) 248 248 { 249 249 return fwrite(ptr, size, nmemb, stream); … … 257 257 \param stream Filehandler to get data from. 258 258 */ 259 size_t OrxonoxGuiUpdate::curlReadFunc(void* ptr, size_t size, size_t nmemb, FILE* stream)259 size_t GuiUpdate::curlReadFunc(void* ptr, size_t size, size_t nmemb, FILE* stream) 260 260 { 261 261 return fread(ptr, size, nmemb, stream); … … 271 271 \param upProgress not needed 272 272 */ 273 int OrxonoxGuiUpdate::curlProgressFunc(ProgressBar* bar, double totalSize, double progress, double upTotal, double upProgress)273 int GuiUpdate::curlProgressFunc(ProgressBar* bar, double totalSize, double progress, double upTotal, double upProgress) 274 274 { 275 275 bar->setProgress(progress); … … 286 286 \brief The Curl handle for only one CURL(static). 287 287 */ 288 CURL* OrxonoxGuiUpdate::curlHandle = NULL;288 CURL* GuiUpdate::curlHandle = NULL; 289 289 290 290 #ifdef HAVE_PTHREAD_H 291 291 /** \brief The download Thread ID */ 292 pthread_t* OrxonoxGuiUpdate::downloadThreadID = new pthread_t;292 pthread_t* GuiUpdate::downloadThreadID = new pthread_t; 293 293 /** \brief The download Thread ID*/ 294 pthread_t* OrxonoxGuiUpdate::downloadThreadFinishID = new pthread_t;294 pthread_t* GuiUpdate::downloadThreadFinishID = new pthread_t; 295 295 #endif /* HAVE_PTHREAD_H */ 296 296 /** 297 297 \brief A bool parameter that shows if we are downloading. 298 298 */ 299 bool OrxonoxGuiUpdate::isDownloading = false;299 bool GuiUpdate::isDownloading = false; 300 300 301 301 … … 306 306 !! BE AWARE THIS WILL NOT BE THREADED. !! 307 307 */ 308 bool OrxonoxGuiUpdate::download(void* fileInfo)308 bool GuiUpdate::download(void* fileInfo) 309 309 { 310 310 if(isDownloading) … … 354 354 Downloading with a Button that gets a different Name while downloading, and a Bar, that gets to be updated. More to be followed 355 355 */ 356 bool OrxonoxGuiUpdate::downloadWithStyle(void* fileInfo)356 bool GuiUpdate::downloadWithStyle(void* fileInfo) 357 357 { 358 358 if(isDownloading) … … 426 426 \todo Threads get locked, if the cancel button is pressed in to small intervals. 427 427 */ 428 void* OrxonoxGuiUpdate::downloadThread(void* fileInfo)428 void* GuiUpdate::downloadThread(void* fileInfo) 429 429 { 430 430 isDownloading = true; … … 436 436 \param fileInfo the FileInfo. 437 437 */ 438 void* OrxonoxGuiUpdate::downloadThreadFinished(void* fileInfo)438 void* GuiUpdate::downloadThreadFinished(void* fileInfo) 439 439 { 440 440 FileInfo* info =(FileInfo*)fileInfo; … … 477 477 \todo canceling a session in non-threaded mode. 478 478 */ 479 gint OrxonoxGuiUpdate::cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar)479 gint GuiUpdate::cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar) 480 480 { 481 481 #ifdef HAVE_PTHREAD_H
Note: See TracChangeset
for help on using the changeset viewer.