summaryrefslogtreecommitdiffstats
path: root/Kod/display/ClientServerApp/Common/ComConduit.h
diff options
context:
space:
mode:
authorvikle012 <viktor.leek@liu.se>2019-09-11 13:57:14 +0200
committervikle012 <viktor.leek@liu.se>2019-09-11 13:57:14 +0200
commite66efbbe8df2dd4e7de0a1e9bd129cf92e00f92f (patch)
tree5ec35be0c219a2e6b017e12e450e76157b9de044 /Kod/display/ClientServerApp/Common/ComConduit.h
downloadtfyy51-e66efbbe8df2dd4e7de0a1e9bd129cf92e00f92f.tar.gz
Initializes repo.
Diffstat (limited to 'Kod/display/ClientServerApp/Common/ComConduit.h')
-rw-r--r--Kod/display/ClientServerApp/Common/ComConduit.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/Kod/display/ClientServerApp/Common/ComConduit.h b/Kod/display/ClientServerApp/Common/ComConduit.h
new file mode 100644
index 0000000..3948355
--- /dev/null
+++ b/Kod/display/ClientServerApp/Common/ComConduit.h
@@ -0,0 +1,59 @@
+/*
+ * ComConduit.h
+ *
+ * Declaration of the ComConduit class
+ *
+ * Author: Erik Hellström, hellstrom@isy.liu.se, 2008-12-14
+ * Modified: Emil Larsson, lime@isy.liu.se, 2012-01-13
+ */
+
+#ifndef COMCONDUIT_H_
+#define COMCONDUIT_H_
+
+// Include conduit base class
+#include "Conduit.h"
+// Include ipc interface
+#include "ipclink.h"
+
+#include <stdio.h>
+//
+// The ComConduit class
+//
+class ComConduit : public Conduit {
+
+public:
+
+ // Construct & Destruct
+ ComConduit();
+ virtual ~ComConduit();
+
+ // Server initialization
+ bool StartServer(KeyType* key);
+ // Client initialization
+ bool StartClient(KeyType* key);
+ // Detach and remove shared memory segment
+ bool Shutdown();
+
+ // Get shared data size
+ int GetDataSize() const;
+ // Get number of events
+ int GetNumEvents() const;
+ // Get pointer to common shared data
+ CommonData* GetCommonData() const;
+
+ // Write data
+ bool SetData(const wchar_t* data);
+
+ // Data read
+ bool GetData(wchar_t* data);
+
+private:
+
+ // Pointer to shared data
+ COMdata* ptrData;
+
+};
+
+
+
+#endif /* COMCONDUIT_H_ */