aboutsummaryrefslogtreecommitdiffstats
path: root/sisinstall/psion.cpp
diff options
context:
space:
mode:
authorDaniel Brahneborg <basic@chello.se>2002-03-02 23:27:47 +0000
committerDaniel Brahneborg <basic@chello.se>2002-03-02 23:27:47 +0000
commit6f49fd782b8935b8caf7cea7bcb6e10644851b13 (patch)
tree3ad7ed335500fbec9ffe59299079760b810c0ce2 /sisinstall/psion.cpp
parent4f497127917554c3a7249658feee9f5bbae84b88 (diff)
downloadplptools-6f49fd782b8935b8caf7cea7bcb6e10644851b13.tar.gz
plptools-6f49fd782b8935b8caf7cea7bcb6e10644851b13.tar.bz2
plptools-6f49fd782b8935b8caf7cea7bcb6e10644851b13.zip
Actually copy stuff to the psion, and lots of other updates.
Diffstat (limited to 'sisinstall/psion.cpp')
-rw-r--r--sisinstall/psion.cpp47
1 files changed, 39 insertions, 8 deletions
diff --git a/sisinstall/psion.cpp b/sisinstall/psion.cpp
index 6aeadf1..287ea76 100644
--- a/sisinstall/psion.cpp
+++ b/sisinstall/psion.cpp
@@ -1,3 +1,4 @@
+
#include "psion.h"
#include <plpintl.h>
@@ -14,6 +15,11 @@
#include <stdio.h>
+Psion::~Psion()
+{
+ disconnect();
+}
+
bool
Psion::connect()
{
@@ -41,11 +47,11 @@ Psion::connect()
m_skt = new ppsocket();
if (!m_skt->connect(NULL, sockNum)) {
- return 1;
+ return false;
}
m_skt2 = new ppsocket();
if (!m_skt2->connect(NULL, sockNum)) {
- return 1;
+ return false;
}
m_rfsvFactory = new rfsvfactory(m_skt);
m_rpcsFactory = new rpcsfactory(m_skt2);
@@ -53,24 +59,43 @@ Psion::connect()
m_rpcs = m_rpcsFactory->create(true);
if ((m_rfsv != NULL) && (m_rpcs != NULL))
return true;
+ return false;
}
-Psion::~Psion()
+Enum<rfsv::errs>
+Psion::copyToPsion(const char * const from, const char * const to,
+ void *, cpCallback_t func)
{
- disconnect();
+ return m_rfsv->copyToPsion(from, to, NULL, func);
+}
+
+Enum<rfsv::errs>
+Psion::devinfo(const char drive, PlpDrive& plpDrive)
+{
+ return m_rfsv->devinfo(drive, plpDrive);
}
Enum<rfsv::errs>
Psion::devlist(u_int32_t& devbits)
{
- printf("Running devlist\n");
- u_int32_t devb;
Enum<rfsv::errs> res;
- res = m_rfsv->devlist(devb);
- devbits = devb;
+ res = m_rfsv->devlist(devbits);
return res;
}
+bool
+Psion::dirExists(const char* name)
+{
+ rfsvDirhandle handle;
+ Enum<rfsv::errs> res;
+ bool exists = false;
+ res = m_rfsv->opendir(rfsv::PSI_A_ARCHIVE, name, handle);
+ if (res == rfsv::E_PSI_GEN_NONE)
+ exists = true;
+ res = m_rfsv->closedir(handle);
+ return exists;
+}
+
void
Psion::disconnect()
{
@@ -82,3 +107,9 @@ Psion::disconnect()
delete m_rpcsFactory;
}
+Enum<rfsv::errs>
+Psion::mkdir(const char* dir)
+{
+ return m_rfsv->mkdir(dir);
+}
+