aboutsummaryrefslogtreecommitdiffstats
path: root/lib/plpdirent.h
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-02-02 04:49:20 +0000
committerFritz Elfert <felfert@to.com>2001-02-02 04:49:20 +0000
commit9fac7af37460c6a73a7debac1ba82b094a8f066c (patch)
treec6ef3e0ebd088c62348f140289f82482d82db1cf /lib/plpdirent.h
parent4da48658c8f1dfbf5960bb1768dc6d154c528734 (diff)
downloadplptools-9fac7af37460c6a73a7debac1ba82b094a8f066c.tar.gz
plptools-9fac7af37460c6a73a7debac1ba82b094a8f066c.tar.bz2
plptools-9fac7af37460c6a73a7debac1ba82b094a8f066c.zip
Replaced lot of ugly char * by string.
Fixed bug in plpftp's filename-completion, which was introduced yesterday. Added a class PlpUID for dealing with application-UIDs Added UID->mimetype mapping in kioslave.
Diffstat (limited to 'lib/plpdirent.h')
-rw-r--r--lib/plpdirent.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/plpdirent.h b/lib/plpdirent.h
index 808af37..d10c76a 100644
--- a/lib/plpdirent.h
+++ b/lib/plpdirent.h
@@ -5,6 +5,23 @@
#include <psitime.h>
#include <rfsv.h>
+class PlpUID
+{
+ friend inline bool operator<(const PlpUID &u1, const PlpUID &u2);
+public:
+ PlpUID();
+ PlpUID(const long u1, const long u2, const long u3);
+
+ long operator[](int idx);
+
+private:
+ long uid[3];
+};
+
+inline bool operator<(const PlpUID &u1, const PlpUID &u2) {
+ return (memcmp(u1.uid, u2.uid, sizeof(u1.uid)) < 0);
+}
+
/**
* A class, representing a directory entry of the Psion.
* Objects of this type are used by @ref rfsv::readdir and
@@ -58,6 +75,13 @@ public:
long getUID(int uididx);
/**
+ * Retrieves the @ref PlpUID object of a directory entry.
+ *
+ * @returns The PlpUID object.
+ */
+ PlpUID &getUID();
+
+ /**
* Retrieve the file name of a directory entry.
*
* @returns The name of the file.
@@ -102,7 +126,7 @@ public:
private:
long size;
long attr;
- long uid[3];
+ PlpUID UID;
PsiTime time;
string attrstr;
string name;