~ubuntu-branches/debian/lenny/linuxdcpp/lenny

« back to all changes in this revision

Viewing changes to linux/downloadqueue.hh

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis
  • Date: 2006-05-30 01:59:51 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060530015951-ph4q3gteuuix20x9
Tags: 0.0.1.cvs20060530-1
* New upstream release
* Changed window title to LinuxDC++ (Closes: #352898)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifndef WULFOR_DOWNLOAD_QUEUE_HH
20
20
#define WULFOR_DOWNLOAD_QUEUE_HH
21
21
 
22
 
#include <iostream>
23
 
 
24
22
#include <gtk/gtk.h>
25
23
#include <glade/glade.h>
 
24
#include <iostream>
 
25
#include <sstream>
 
26
 
26
27
#include "bookentry.hh"
27
 
#include "treeviewfactory.hh"
 
28
#include "search.hh"
 
29
#include "treeview.hh"
 
30
#include "wulformanager.hh"
28
31
#include "wulformanager.hh"
29
32
 
30
33
#include <client/stdinc.h>
32
35
#include <client/QueueManager.h>
33
36
#include <client/User.h>
34
37
 
 
38
using namespace std;
 
39
 
35
40
class DownloadQueue :   public BookEntry,
36
41
                                        public QueueManagerListener
37
42
{
40
45
        DownloadQueue (GCallback closeCallback);
41
46
        ~DownloadQueue ();
42
47
 
43
 
        GtkWidget *getWidget(); // From BookEntry
44
 
        void switchedPage (); // From BookEntry
 
48
        // From BookEntry
 
49
        GtkWidget *getWidget();
45
50
 
46
51
        void buildList_gui ();
47
52
        void updateStatus_gui ();
55
60
 
56
61
private:
57
62
        enum {
58
 
                COLUMN_FIRST,
59
 
                COLUMN_TARGET = COLUMN_FIRST,
60
 
                COLUMN_STATUS,
61
 
                COLUMN_SIZE,
62
 
                COLUMN_DOWNLOADED,
63
 
                COLUMN_PRIORITY,
64
 
                COLUMN_USERS,
65
 
                COLUMN_PATH,
66
 
                COLUMN_EXACT_SIZE,
67
 
                COLUMN_ERRORS,
68
 
                COLUMN_ADDED,
69
 
                COLUMN_TTH,
70
 
                COLUMN_INFO,
71
 
                COLUMN_REALSIZE,
72
 
                COLUMN_DOWNLOAD_SIZE,
73
 
                COLUMN_LAST
74
 
        };
75
 
        enum {
76
 
                DIRCOLUMN_FIRST,
77
 
                DIRCOLUMN_DIR = DIRCOLUMN_FIRST,
78
 
                DIRCOLUMN_REALPATH,
79
 
                DIRCOLUMN_LAST
80
 
        };
81
 
        enum {
82
63
                STATUS_FIRST,
83
64
                STATUS_MAIN = STATUS_FIRST,
84
65
                STATUS_ITEMS,
87
68
                STATUS_TOTAL_SIZE,
88
69
                STATUS_LAST
89
70
        };
 
71
 
90
72
        class QueueItemInfo;
91
73
 
92
74
        GtkWidget *mainBox;
94
76
        pthread_mutex_t queueLock;
95
77
 
96
78
        // TreeView related stuff
97
 
        TreeViewFactory *dirView, *fileView;
 
79
        TreeView dirView, fileView;
98
80
        GtkTreeStore *dirStore;
99
81
        GtkListStore *fileStore;
100
82
        static gboolean dir_onButtonPressed_gui (GtkWidget *widget, GdkEventButton *event, gpointer user_data);
162
144
        std::map<string, std::vector<QueueItemInfo*> > dirFileMap;
163
145
        std::map<string, QueueItem*> fileMap;
164
146
 
165
 
        static int columnSize[COLUMN_LAST];
166
147
        int64_t queueSize;
167
148
        int queueItems;
168
149
        string showingDir;