From 80a6f091c9f1077180263be52f547e0d5af88895 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Sun, 4 Feb 2001 20:58:07 +0000 Subject: - More KDOC comments. - Fix in ppsocket.cc: Add a cast for first parameter of gethostbyaddr() --- lib/plpdirent.h | 30 ++++++++++++++++++++++++++++-- lib/ppsocket.cc | 4 ++-- lib/rpcs.h | 2 ++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/lib/plpdirent.h b/lib/plpdirent.h index ab1f3a4..9a25a67 100644 --- a/lib/plpdirent.h +++ b/lib/plpdirent.h @@ -5,13 +5,36 @@ #include "psitime.h" #include "rfsv.h" +/** + * A class, representing the UIDs of a file on the Psion. + * Every File on the Psion has a unique UID for determining + * the application-mapping. This class stores these UIDs. + * An object of this class is contained in every @ref PlpDirent + * object. + * + * @author Fritz Elfert + */ class PlpUID { friend inline bool operator<(const PlpUID &u1, const PlpUID &u2); public: + /** + * Default constructor. + */ PlpUID(); + + /** + * Constructor. + * Create an instance, presetting all thre uid values. + */ PlpUID(const long u1, const long u2, const long u3); + /** + * Retrieve a UID value. + * + * @param idx The index of the desired UID. Range must be (0..2), + * otherwise an assertion is triggered. + */ long operator[](int idx); private: @@ -24,8 +47,11 @@ inline bool operator<(const PlpUID &u1, const PlpUID &u2) { /** * A class, representing a directory entry of the Psion. - * Objects of this type are used by @ref rfsv::readdir and - * @ref rfsv::dir for returning the entries of a directory. + * Objects of this type are used by @ref rfsv::readdir , + * @ref rfsv::dir and @ref rfsv::fgeteattr for returning + * the entries of a directory. + * + * @author Fritz Elfert */ class PlpDirent { friend class rfsv32; diff --git a/lib/ppsocket.cc b/lib/ppsocket.cc index e43b9e6..a482ae5 100644 --- a/lib/ppsocket.cc +++ b/lib/ppsocket.cc @@ -494,7 +494,7 @@ setPeer(const char * const Peer, int Port) m_LastError = errno; return false; } - he = gethostbyaddr(&ipaddr.s_addr, sizeof(ipaddr.s_addr), PF_INET); + he = gethostbyaddr((const char *)&ipaddr.s_addr, sizeof(ipaddr.s_addr), PF_INET); if (!he) { m_LastError = errno; return (false); @@ -546,7 +546,7 @@ setHost(const char * const Host, int Port) m_LastError = errno; return false; } - he = gethostbyaddr(&ipaddr.s_addr, sizeof(ipaddr.s_addr), PF_INET); + he = gethostbyaddr((const char *)&ipaddr.s_addr, sizeof(ipaddr.s_addr), PF_INET); if (!he) { m_LastError = errno; return false; diff --git a/lib/rpcs.h b/lib/rpcs.h index 4547cd1..bc7eb3c 100644 --- a/lib/rpcs.h +++ b/lib/rpcs.h @@ -21,6 +21,8 @@ class bufferArray; * @ref rpcs32 or @ref rpcs16 respectively. * These normally are instantiated by using * @ref rpcsfactory . + * + * @author Fritz Elfert */ class rpcs { public: -- cgit v1.2.3