summaryrefslogtreecommitdiff
path: root/src/include/gm
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-04-07 11:37:21 +0200
committerAlexis211 <alexis211@gmail.com>2010-04-07 11:37:21 +0200
commitee348973b0cb0f6481e4fd6e7494c63167c9759c (patch)
treea9f1cd82703aaeeefbf4cf449203881cfcafc0a5 /src/include/gm
parentca4f5906f284e60a7a59ca7450e3e09c4f9356e5 (diff)
downloadTCE-ee348973b0cb0f6481e4fd6e7494c63167c9759c.tar.gz
TCE-ee348973b0cb0f6481e4fd6e7494c63167c9759c.zip
More work on manager
Diffstat (limited to 'src/include/gm')
-rw-r--r--src/include/gm/call.h18
-rw-r--r--src/include/gm/call/manager.h14
-rw-r--r--src/include/gm/method.h2
-rw-r--r--src/include/gm/method/manager.h20
4 files changed, 54 insertions, 0 deletions
diff --git a/src/include/gm/call.h b/src/include/gm/call.h
new file mode 100644
index 0000000..5c3849d
--- /dev/null
+++ b/src/include/gm/call.h
@@ -0,0 +1,18 @@
+#ifndef DEF_CALL_H
+#define DEF_CALL_H
+
+/*
+ * This file and all files in include/call/ define prototypes to helper functions for calling methods on objects.
+ */
+
+#include <gc/obj.h>
+
+#define _CHP Object o, int block
+#define _CHC if (block) request(o, &sr); else send_msg(o, &sr);
+
+int c_handleCheck(_CHP, int method);
+int c_handleCheckA(_CHP, int* methods, int number);
+
+int c_nothing(_CHP);
+
+#endif
diff --git a/src/include/gm/call/manager.h b/src/include/gm/call/manager.h
new file mode 100644
index 0000000..49aafe7
--- /dev/null
+++ b/src/include/gm/call/manager.h
@@ -0,0 +1,14 @@
+#ifndef DEF_CALL_MANAGER_H
+#define DEF_CALL_MANAGER_H
+
+#include <gm/call.h>
+#include <gc/obj.h>
+
+Object c_open(_CHP, char *c);
+Object open(char *c); //calls c_open with object 1
+
+void c_registerSvc(char *name); //automatically calls with objecct id 0
+
+void c_logSvc(char *log, int level);
+
+#endif
diff --git a/src/include/gm/method.h b/src/include/gm/method.h
index 6206f07..13d3f16 100644
--- a/src/include/gm/method.h
+++ b/src/include/gm/method.h
@@ -22,4 +22,6 @@
#define M_NOTHING_VVVV (2)
/* This method does nothing, it just checks message transmission to an object. */
+#include "method/manager.h"
+
#endif
diff --git a/src/include/gm/method/manager.h b/src/include/gm/method/manager.h
new file mode 100644
index 0000000..2066093
--- /dev/null
+++ b/src/include/gm/method/manager.h
@@ -0,0 +1,20 @@
+#ifdef DEF_METHOD_H
+
+#define M_OPEN_OMVV (10 | MP(1, 3, 0, 0))
+/* This function opens a distant ressource. Example : open("file:Root/Public/test.txt"); */
+
+#define M_REGISTERSVC_VMOV (11 | MP(0, 3, 1, 0))
+/* This function registers a service.
+ * parameter 1 : service name;
+ * parameter 2 : service root object. */
+
+#define M_LOGSVC_VMIV (12 | MP(0, 3, 2, 0))
+/* This parameters logs an entry for service with corresponding PID. Parameter 2 is : */
+#define LL_CRITICAL 0
+#define LL_ERROR 1
+#define LL_WARNING 2
+#define LL_NOTICE 3
+#define LL_STATUS 4
+#define LL_DEBUG 5
+
+#endif