summaryrefslogtreecommitdiff
path: root/x11/ipc/client
Side-by-side diff
Diffstat (limited to 'x11/ipc/client') (more/less context) (ignore whitespace changes)
-rw-r--r--x11/ipc/client/ocopclient.cpp9
-rw-r--r--x11/ipc/client/ocopclient.h7
2 files changed, 15 insertions, 1 deletions
diff --git a/x11/ipc/client/ocopclient.cpp b/x11/ipc/client/ocopclient.cpp
index c1def73..6085481 100644
--- a/x11/ipc/client/ocopclient.cpp
+++ b/x11/ipc/client/ocopclient.cpp
@@ -14,6 +14,15 @@
#include "ocopclient.h"
+OCOPClient* OCOPClient::m_self = 0;
+
+OCOPClient* OCOPClient::self() {
+ if (!m_self ) {
+ m_self = new OCOPClient();
+ }
+ return m_self;
+}
+
OCOPClient::OCOPClient( const QString& path, QObject* obj )
: QObject( obj )
{
diff --git a/x11/ipc/client/ocopclient.h b/x11/ipc/client/ocopclient.h
index 53018a5..ee2015a 100644
--- a/x11/ipc/client/ocopclient.h
+++ b/x11/ipc/client/ocopclient.h
@@ -20,7 +20,11 @@ class OCOPPacket;
class OCOPClient : public QObject{
Q_OBJECT
public:
-
+ /*
+ * this is the static
+ * OCopClient
+ */
+ static OCOPClient* self();
/**
* Occasionally I decide to start a Server from here
*/
@@ -56,6 +60,7 @@ private:
int m_socket;
int m_tries;
+ static OCOPClient* m_self;
};
#endif