aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README16
-rw-r--r--lib/plpdirent.cc66
-rw-r--r--lib/ppsocket.cc6
-rw-r--r--lib/ppsocket.h15
-rw-r--r--lib/rfsv16.cc2
5 files changed, 88 insertions, 17 deletions
diff --git a/README b/README
index 94a2d96..ff2b700 100644
--- a/README
+++ b/README
@@ -84,11 +84,19 @@
this file on some operating systems is vital for functionality
of mount/umount, this update can be disabled with the above option.
+ --enable-kde
+
+ Enable build of KDE related stuff. This needs installed
+ KDE 2.0.1 headers/development-libraries as well as QT
+ headers/development-libraries.
+
You will get 3 programs and a shared and static library.
By default, the install-prefix is /usr/local, so you probably
should add /usr/local/lib to your /etc/ld.so.conf and then run
ldconfig after installation. Another option is to run configure
with the option --prefix=/usr
+ When enabling KDE stuff, you will get an additional library
+ kio_plp.so, which installs into KDE's library dir.
Please read the man pages ncpd(8) plpftp(1) and plpnfsd(8)! The
information there is more up-to-date.
@@ -123,6 +131,14 @@
As soon as the psion is connected again, the subdirectories
will reappear. (possibly with a few secs delay)
+ The KDE2 KIOslave library adds support for a new protocol named
+ "psion:". So in konqueror, just open psion:/ to see your Psion's
+ drives. You now can copy, move, rename, open ... all those
+ operations you are used to. Any KDE application which supports
+ URLs should be able to deal with the files on the Psion.
+ Currently there are no mime-types for Psion-Files but i soon will
+ add these.
+
Have fun.
-Fritz
diff --git a/lib/plpdirent.cc b/lib/plpdirent.cc
new file mode 100644
index 0000000..345eac6
--- /dev/null
+++ b/lib/plpdirent.cc
@@ -0,0 +1,66 @@
+#include <plpdirent.h>
+#include <stream.h>
+#include <iomanip>
+
+PlpDirent::PlpDirent(const PlpDirent &e) {
+ size = e.size;
+ attr = e.attr;
+ time = e.time;
+ memcpy(uid, e.uid, sizeof(uid));
+ name = e.name;
+ attrstr = e.attrstr;
+}
+
+long PlpDirent::
+getSize() {
+ return size;
+}
+
+long PlpDirent::
+getAttr() {
+ return attr;
+}
+
+long PlpDirent::
+getUID(int uididx) {
+ if ((uididx >= 0) && (uididx < 4))
+ return uid[uididx];
+ return 0;
+}
+
+const char *PlpDirent::
+getName() {
+ return name.c_str();
+}
+
+PsiTime PlpDirent::
+getPsiTime() {
+ return time;
+}
+
+void PlpDirent::
+setName(const char *str) {
+ name = str;
+}
+
+PlpDirent &PlpDirent::
+operator=(const PlpDirent &e) {
+ size = e.size;
+ attr = e.attr;
+ time = e.time;
+ memcpy(uid, e.uid, sizeof(uid));
+ name = e.name;
+ attrstr = e.attrstr;
+ return *this;
+}
+
+ostream &
+operator<<(ostream &o, const PlpDirent &e) {
+ ostream::fmtflags old = o.flags();
+
+ o << e.attrstr << " " << dec << setw(10)
+ << setfill(' ') << e.size << " " << e.time
+ << " " << e.name;
+ o.flags(old);
+ return o;
+}
diff --git a/lib/ppsocket.cc b/lib/ppsocket.cc
index cfaa429..86ff4f4 100644
--- a/lib/ppsocket.cc
+++ b/lib/ppsocket.cc
@@ -504,7 +504,7 @@ bool ppsocket::
bindSocket(char *Host, int Port)
{
- // If we are already bound return FALSE but with no last error
+ // If we are already bound return false but with no last error
m_LastError = 0;
@@ -542,7 +542,7 @@ bindInRange(char *Host, int Low, int High, int Retries)
{
int port, i;
- // If we are already bound return FALSE but with no last error
+ // If we are already bound return false but with no last error
m_LastError = 0;
if (m_Bound) {
return (false);
@@ -627,7 +627,7 @@ createSocket(void)
return (false);
}
// By default set no lingering
- linger(FALSE, 0);
+ linger(false, 0);
// Return indicating success
return (true);
}
diff --git a/lib/ppsocket.h b/lib/ppsocket.h
index f36344c..696ca78 100644
--- a/lib/ppsocket.h
+++ b/lib/ppsocket.h
@@ -1,19 +1,11 @@
-#if !defined(AFX_ppsocket_H__5611BC0C_3E39_11D1_8E4B_00805F2AB205__INCLUDED_)
-#define AFX_ppsocket_H__5611BC0C_3E39_11D1_8E4B_00805F2AB205__INCLUDED_
-
-#if _MSC_VER >= 1000
-#pragma once
-#endif // _MSC_VER >= 1000
+#ifndef _PPSOCKET_H_
+#define _PPSOCKET_H_
#include <unistd.h>
#include <netdb.h>
#include <sys/socket.h>
#include <arpa/inet.h>
-#ifndef TRUE
-#define TRUE -1
-#define FALSE 0
-#endif
#define DWORD unsigned int
#define SOCKET int
@@ -89,9 +81,6 @@ private:
struct sockaddr m_HostAddr, m_PeerAddr;
int m_Port;
bool m_Bound;
-#ifdef WIN32
- OVERLAPPED m_ReadOverlapped, m_WriteOverlapped;
-#endif
DWORD m_Timeout;
DWORD m_LastError;
};
diff --git a/lib/rfsv16.cc b/lib/rfsv16.cc
index 26a153b..d42b270 100644
--- a/lib/rfsv16.cc
+++ b/lib/rfsv16.cc
@@ -573,7 +573,7 @@ sendCommand(enum commands cc, bufferStore & data)
if (status == E_PSI_FILE_DISC) {
reconnect();
if (status == E_PSI_FILE_DISC)
- return FALSE;
+ return false;
}
bool result;