From 9fac7af37460c6a73a7debac1ba82b094a8f066c Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Fri, 2 Feb 2001 04:49:20 +0000 Subject: 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. --- lib/plpdirent.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'lib/plpdirent.h') 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 #include +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 @@ -57,6 +74,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. * @@ -102,7 +126,7 @@ public: private: long size; long attr; - long uid[3]; + PlpUID UID; PsiTime time; string attrstr; string name; -- cgit v1.2.3