Permalink
Browse files

Added some missing files (IPC related)

  • Loading branch information...
1 parent 6d1a4b4 commit 30bf408aac83217ddd49a0ec851d68391af9ab1f Alexander Stigsen committed Oct 12, 2010
Showing with 56 additions and 0 deletions.
  1. +19 −0 src/IConnection.h
  2. +18 −0 src/IIpcHandler.h
  3. +19 −0 src/IIpcServer.h
View
19 src/IConnection.h
@@ -0,0 +1,19 @@
+#ifndef __ICONNECTION_H__
+#define __ICONNECTION_H__
+
+// wxWidgets and boost asio uses diffent versions of windows includes.
+// So to avoid conflicts these interfaces are used to totally decouple
+// the two modules.
+
+#include "hessian_ipc/hessian_values.h"
+
+class IConnection {
+public:
+ virtual const hessian_ipc::Call* get_call() = 0; // The request recieved (may be NULL)
+ virtual hessian_ipc::Writer& get_reply_writer() = 0;
+ virtual void reply_done() = 0;
+ virtual void notifier_done() = 0;
+};
+
+
+#endif // __ICONNECTION_H__
View
18 src/IIpcHandler.h
@@ -0,0 +1,18 @@
+#ifndef __IIPCHANDLER_H__
+#define __IIPCHANDLER_H__
+
+// wxWidgets and boost asio uses diffent versions of windows includes.
+// So to avoid conflicts these interfaces are used to totally decouple
+// the two modules.
+
+//Pre-definitions
+class IConnection;
+
+class IIpcHandler {
+public:
+ virtual void handle_call(IConnection& conn) = 0;
+ virtual void handle_close(IConnection& conn) = 0;
+};
+
+
+#endif // __IIPCHANDLER_H__
View
19 src/IIpcServer.h
@@ -0,0 +1,19 @@
+#ifndef __IIPCSERVER_H__
+#define __IIPCSERVER_H__
+
+// wxWidgets and boost asio uses diffent versions of windows includes.
+// So to avoid conflicts these interfaces are used to totally decouple
+// the two modules.
+
+#include "IIpcHandler.h"
+
+class IIpcServer {
+public:
+ virtual void run() = 0;
+ virtual void stop() = 0;
+ virtual void destroy() = 0;
+};
+
+IIpcServer* NewIpcServer(IIpcHandler& handler);
+
+#endif // __IIPCSERVER_H__

0 comments on commit 30bf408

Please sign in to comment.