source: trunk/beos/TRTransfer.h @ 2549

Last change on this file since 2549 was 2549, checked in by charles, 15 years ago

Get BeOS client building on Zeta 1.21 thanks to patches by Fredrik Modéen

  • Property svn:keywords set to Date Rev Author Id
File size: 1.1 KB
Line 
1// $Id: TRTransfer.h 2549 2007-07-30 13:59:23Z charles $
2
3#ifndef TR_TRANSFER
4#define TR_TRANSFER
5
6#include <Entry.h>
7#include <ListItem.h>
8#include <Locker.h>
9#include <String.h>
10#include <View.h>
11
12#include <libtransmission/transmission.h>
13
14class TRTransfer : public BListItem {
15public: // Construction and Controll methods.
16        TRTransfer(const char *fullpath, node_ref node, tr_torrent_t *torrentRef);
17        ~TRTransfer();
18
19        inline node_ref GetCachedNodeRef() { return cachedNodeRef; };
20        inline const char* GetCachedPath() { return cachedPath->String(); };
21        inline tr_torrent_t* GetTorrent()  { return torrent; };
22       
23        bool UpdateStatus(const tr_stat_t *stat, bool shade);
24        bool IsRunning();
25       
26public: // BListItem
27        virtual void Update(BView *owner, const BFont *font);
28        virtual void DrawItem(BView *owner, BRect frame, bool complete = false);
29
30private: 
31        node_ref cachedNodeRef;
32        BString *cachedPath;
33        tr_torrent_t *torrent;
34
35private: // Private members used for rendering.
36        float fBaselineOffset;
37        float fLineSpacing;
38       
39        BLocker *fStatusLock;
40        tr_stat_t *fStatus;
41        BString *fName;
42       
43        rgb_color fBarColor;
44       
45        char* fTimeStr;
46        char* fTransStr;
47       
48        bool fShade;
49};
50
51#endif /* TR_TRANSFER */
Note: See TracBrowser for help on using the repository browser.