summaryrefslogtreecommitdiff
path: root/lib/ipcomm.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
committerChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
commit32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (patch)
treec6e107c1ee4d70610e43a7912e57c720334a08c7 /lib/ipcomm.cpp
parent08299e8b2bf50ba90daf570f57def529dd29d6e7 (diff)
New upstream version 2.2.0~rc1+repackupstream/2.2.0_rc1+repack
Diffstat (limited to 'lib/ipcomm.cpp')
-rw-r--r--lib/ipcomm.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/lib/ipcomm.cpp b/lib/ipcomm.cpp
deleted file mode 100644
index 6f65dcae..00000000
--- a/lib/ipcomm.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <QDebug>
-#include <QString>
-#include <QSharedMemory>
-#include <QSystemSemaphore>
-
-#include "../commons.h"
-
-// Multiple instances: KK1D, 17 Jul 2013
-QSharedMemory mem_jt9;
-
-// Semaphore not changed, as the acquire/release calls do not
-// appear to be used anywhere.
-QSystemSemaphore sem_jt9("sem_jt9", 1, QSystemSemaphore::Open);
-
-extern "C" {
- bool attach_jt9_();
- bool create_jt9_(int nsize);
- bool detach_jt9_();
- bool lock_jt9_();
- bool unlock_jt9_();
- struct jt9com * address_jt9_();
- int size_jt9_();
-// Multiple instances: wrapper for QSharedMemory::setKey()
- bool setkey_jt9_(char* mykey, int mykey_len);
-
- bool acquire_jt9_();
- bool release_jt9_();
-}
-
-bool attach_jt9_() {return mem_jt9.attach();}
-bool create_jt9_(int nsize) {return mem_jt9.create(nsize);}
-bool detach_jt9_() {return mem_jt9.detach();}
-bool lock_jt9_() {return mem_jt9.lock();}
-bool unlock_jt9_() {return mem_jt9.unlock();}
-struct jt9com * address_jt9_() {return reinterpret_cast<struct jt9com *>(mem_jt9.data());}
-int size_jt9_() {return (int)mem_jt9.size();}
-
-// Multiple instances:
-bool setkey_jt9_(char* mykey, int mykey_len) {
- char *tempstr = (char *)calloc(mykey_len+1,1);
- memset(tempstr, 0, mykey_len+1);
- strncpy(tempstr, mykey, mykey_len);
- QString s1 = QString(QLatin1String(tempstr));
- mem_jt9.setKey(s1);
- return true;}
-
-bool acquire_jt9_() {return sem_jt9.acquire();}
-bool release_jt9_() {return sem_jt9.release();}