author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff) | |
tree | 1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/Bkmks.h | |
parent | e90847c784c48bd21bf8768cb38edb853b832697 (diff) | |
download | opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2 |
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/Bkmks.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Bkmks.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/noncore/apps/opie-reader/Bkmks.h b/noncore/apps/opie-reader/Bkmks.h index ee528e4..c2275e2 100644 --- a/noncore/apps/opie-reader/Bkmks.h +++ b/noncore/apps/opie-reader/Bkmks.h @@ -15,21 +15,34 @@ class Bkmk unsigned short m_namelen; unsigned char* m_anno; unsigned short m_annolen; unsigned int m_position; + unsigned int m_position2; + unsigned char m_red,m_green,m_blue, m_level; void init(const void*, unsigned short, const void*, unsigned short, unsigned int); public: Bkmk() : m_name(NULL), m_namelen(0), m_anno(NULL), m_annolen(0), m_position(0) {}; Bkmk(const unsigned char* _nm, unsigned short _nmlen, const unsigned char* _anno, unsigned short _annolen, unsigned int _p); Bkmk(const tchar* _nm, const unsigned char* _anno, unsigned short _annolen, unsigned int _p); Bkmk(const tchar* _nm, const tchar* _anno, unsigned int _p); + Bkmk(const tchar* _nm, const tchar* _anno, unsigned int _p, unsigned int _p2); Bkmk(const Bkmk& rhs) : m_name(NULL), m_anno(NULL) { *this = rhs; } ~Bkmk(); unsigned int value() const { return m_position; } void value(unsigned int _v) { m_position = _v; } + unsigned int value2() const { return m_position2; } + void value2(unsigned int _v) { m_position2 = _v; } + unsigned char red() { return m_red; } + unsigned char green() { return m_green; } + unsigned char blue() { return m_blue; } + void red(unsigned char _v) { m_red = _v; } + void green(unsigned char _v) { m_green = _v; } + void blue(unsigned char _v) { m_blue = _v; } + unsigned char level() { return m_level; } + void level(unsigned char _v) { m_level = _v; } tchar *name() const { return (tchar*)m_name; } tchar *anno() const { return (tchar*)m_anno; } bool operator<(const Bkmk& rhs) { return (m_position < rhs.m_position); } Bkmk& operator=(const Bkmk& rhs); @@ -51,19 +64,20 @@ class Bkmk class BkmkFile { FILE* f; bool wt; - bool isUpgraded; + bool isUpgraded, m_extras; static const unsigned long magic; private: - static Bkmk* read06(FILE*); - static Bkmk* read05(FILE*); - static Bkmk* read03(FILE*); - CList<Bkmk>* readall00(Bkmk*(*fn)(FILE*)); + static Bkmk* read07(BkmkFile*, FILE*); + static Bkmk* read06(BkmkFile*, FILE*); + static Bkmk* read05(BkmkFile*, FILE*); + static Bkmk* read03(BkmkFile*, FILE*); + CList<Bkmk>* readall00(Bkmk*(*fn)(BkmkFile*, FILE*)); void write(const Bkmk& b); public: bool upgraded() { return isUpgraded; } - BkmkFile(const char *fnm, bool w = false); + BkmkFile(const char *fnm, bool w, bool _x); ~BkmkFile(); void write(CList<Bkmk>& bl); CList<Bkmk>* readall(); }; |