Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3275 in orxonox.OLD for orxonox/branches


Ignore:
Timestamp:
Dec 25, 2004, 12:46:25 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/updater: doxygen tags

Location:
orxonox/branches/updater/src/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc

    r3271 r3275  
    174174/**
    175175   \brief Moves through all the Widgets downwards from this and executes the function on them.
    176    \param Function must be of type void and takes a Widget* as an Input.
     176   \param function must be of type void and takes a Widget* as an Input.
    177177*/
    178178void Widget::walkThrough (void (*function)(Widget*))
     
    11511151
    11521152/**
    1153    \breif Creates a new ProgressBar.
     1153   \brief Creates a new ProgressBar.
    11541154*/
    11551155ProgressBar::ProgressBar (void)
     
    11591159
    11601160/**
    1161    \breif Creates a new ProgressBar.
     1161   \brief Creates a new ProgressBar.
    11621162   \param label The name you want to get the ProgressBar.
    11631163*/
     
    11691169
    11701170/**
    1171    \destructs a ProgressBar
     1171   \brief destructs a ProgressBar
    11721172*/
    11731173ProgressBar::~ProgressBar ()
  • orxonox/branches/updater/src/gui/orxonox_gui_gtk.h

    r3263 r3275  
    1111#endif
    1212
     13//! verbose level, soon obsolete
    1314extern int verbose; // soon obsolete here
    1415
     
    245246  void setTitle(char* title);
    246247
    247   bool isActive();
     248  bool isActive();           //!< a Bool value to see, if this CheckButton is active.
    248249  void redraw ();
    249250};
  • orxonox/branches/updater/src/gui/orxonox_gui_update.cc

    r3274 r3275  
    6666}
    6767
     68/**
     69   \brief Creates a window, and all it contains for the Data-update.
     70*/
    6871void OrxonoxGuiUpdate::updateDataWindowCreate (void)
    6972{
     
    101104
    102105/**
    103    \returns A Pointer to the Button of the UpdaterWindow
     106   \returns A Pointer to the Button of the UpdaterDataWindow
    104107*/
    105108Button* OrxonoxGuiUpdate::updateDataWindowGetButton(void)
     
    108111}
    109112
     113/**
     114   \brief Creates a window, and all it contains for the Source-update.
     115*/
    110116void OrxonoxGuiUpdate::updateSourceWindowCreate (void)
    111117{
     
    136142}
    137143
     144/**
     145   \returns A Pointer to the Button of the UpdaterSourceWindow
     146*/
    138147Button* OrxonoxGuiUpdate::updateSourceWindowGetButton(void)
    139148{
     
    175184
    176185#ifdef HAVE_CURL
     186/**
     187   \brief The Function Curl calls to write out the File.
     188   \param ptr A Pointer to the date to write.
     189   \param size The size in bytes of one nmemb to write.
     190   \param nmemb The Count of size to write.
     191   \param stream Filehandler to write to.
     192*/
    177193size_t OrxonoxGuiUpdate::curlWriteFunc (void* ptr, size_t size, size_t nmemb, FILE* stream)
    178194{
     
    180196}
    181197
     198/**
     199   \brief The Function Curl calls to write out the File.
     200   \param ptr A Pointer to the date to write to.
     201   \param size The size in bytes of one nmemb to write.
     202   \param nmemb The Count of size to write.
     203   \param stream Filehandler to get data from.
     204*/
    182205size_t OrxonoxGuiUpdate::curlReadFunc (void* ptr, size_t size, size_t nmemb, FILE* stream)
    183206{
     
    186209
    187210
     211/**
     212   \brief An update Function for the GUI, to show the progress.
     213   \param Bar th ProgressBar to update
     214   \param totalSize The total size of the download in bytes.
     215   \param progress The current Progress of the download in bytes.
     216   \param upTotal not needed
     217   \param upProgress not needed
     218*/
    188219int OrxonoxGuiUpdate::curlProgressFunc (ProgressBar* Bar, double totalSize, double progress, double upTotal, double upProgress)
    189220{
     
    198229}
    199230
     231/**
     232   \brief THe Curl handle for only one CURL
     233*/
    200234CURL* OrxonoxGuiUpdate::curlHandle = NULL;
    201235
    202236#ifdef HAVE_PTHREAD_H
     237/** \brief The download Thread ID */
    203238pthread_t* OrxonoxGuiUpdate::downloadThreadID = new pthread_t;
     239/**   \brief The download Thread ID*/
     240pthread_t* OrxonoxGuiUpdate::downloadThreadFinishID = new pthread_t;
    204241#endif /* HAVE_PTHREAD_H */
     242/**
     243   \brief A bool parameter that shows if we are downloading.
     244*/
    205245bool OrxonoxGuiUpdate::isDownloading = false;
    206246
     247/**
     248   \brief Initializes a Download
     249   \param fileInfo the FileInfo.
     250*/
    207251bool OrxonoxGuiUpdate::download (void* fileInfo)
    208252{
     
    238282      if (!isDownloading)
    239283        {
     284          isDownloading = true;
    240285          //! \todo check if threads really were created.
    241286#ifdef HAVE_PTHREAD_H
     287          pthread_join(*downloadThreadFinishID, NULL);
    242288          pthread_create(downloadThreadID, NULL, downloadThread, info);
    243 
    244           pthread_t finish;
    245           pthread_create(&finish, NULL, downloadThreadFinished, info); 
     289          pthread_create(downloadThreadFinishID, NULL, downloadThreadFinished, info); 
    246290#else
    247291          downloadThread(info);
     
    259303  return true;
    260304}
     305
     306/**
     307   \brief The downloading process (either threaded or not).
     308   \param fileInfo the FileInfo.
     309*/
    261310void* OrxonoxGuiUpdate::downloadThread(void* fileInfo)
    262311{
    263312  pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
    264313  gdk_threads_enter();
    265   isDownloading = true;
    266314  FileInfo* info = (FileInfo*)fileInfo;
    267315  info->stateButton->disconnectSignal(info->buttonSignal);
     
    275323}
    276324
     325/**
     326   \brief Finishes a downloading process.
     327   \param fileInfo the FileInfo.
     328*/
    277329void* OrxonoxGuiUpdate::downloadThreadFinished(void* fileInfo)
    278330{
     
    300352
    301353#ifdef HAVE_GTK2
     354/**
     355   \brief canceles a downloading session.
     356   \param w The widget, that executed this Function.
     357   \param event The event that trigered this Function.
     358   \param bar The Bar, that triggered this event.
     359
     360   \todo canceling a session in non-threaded mode.
     361*/
    302362gint OrxonoxGuiUpdate::cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar)
    303363{
  • orxonox/branches/updater/src/gui/orxonox_gui_update.h

    r3274 r3275  
    1515#endif /* HAVE_CURL */
    1616#ifdef HAVE_PTHREAD_H
     17#define _MULTI_THREADED
    1718#include <pthread.h>
    1819#endif /* HAVE_PTHREAD_H */
     
    7071#ifdef HAVE_PTHREAD_H
    7172  static pthread_t* downloadThreadID;
     73  static pthread_t* downloadThreadFinishID;
    7274#endif /* HAVE_PTHREAD_H */
    7375  static bool isDownloading;
     
    8688  Widget* getWidget ();
    8789 
    88   void updateWindowCreate (void);
    89   Button* updateWindowGetButton(void);
     90  //  void updateWindowCreate (void);
     91  //  Button* updateWindowGetButton(void);
    9092
    9193  void updateDataWindowCreate (void);
Note: See TracChangeset for help on using the changeset viewer.