IDL_COMPILER += --pidl
lib_LIBRARIES += forb
-forb_SOURCES = forb.c cdr.c sha1.c uuid.c iop.c proto.c syncobj.c request.c
+forb_SOURCES = forb.c cdr.c sha1.c uuid.c iop.c proto.c syncobj.c \
+ request.c executor.c
forb_CLIENT_IDL = types.idl iop-idl.idl
to_forb_subdir=$(1)->forb/$(strip $(1))
$(call to_forb_subdir, uuid.h) \
$(call to_forb_subdir, syncobj.h) \
$(call to_forb_subdir, request.h) \
+ $(call to_forb_subdir, executor.h) \
$(call to_forb_subdir, proto.h)
renamed_include_GEN_HEADERS = \
--- /dev/null
+#include <forb/executor.h>
+
+int forb_executor_init(forb_executor_t *executor)
+{
+ return -1;
+}
+void forb_executor_destroy(forb_executor_t *executor)
+{
+}
+
+int forb_executor_register_object(forb_executor_t *executor, forb_object obj)
+{
+ return -1;
+}
+
+int forb_executor_run(forb_executor_t *executor)
+{
+ return -1;
+}
+
+/**
+ * Convenience function for executing only one object in one executor.
+ *
+ * @param obj The object to execute.
+ *
+ * @return Zero in case of success, error code on error.
+ */
+int forb_execute_object(forb_object obj)
+{
+ forb_executor_t executor;
+ int ret;
+
+ ret = forb_executor_init(&executor);
+ if (ret) goto error;
+ ret = forb_executor_register_object(&executor, obj);
+ if (ret) goto destroy_and_error;
+
+ ret = forb_executor_run(&executor);
+
+destroy_and_error:
+ forb_executor_destroy(&executor);
+error:
+ return ret;
+}
--- /dev/null
+#ifndef EXECUTOR_H
+#define EXECUTOR_H
+
+#include <forb/forb.h>
+
+typedef struct forb_executor {
+ int dummy;
+} forb_executor_t;
+
+int forb_executor_init(forb_executor_t *executor);
+void forb_executor_destroy(forb_executor_t *executor);
+int forb_executor_register_object(forb_executor_t *executor, forb_object obj);
+int forb_executor_run(forb_executor_t *executor);
+
+int forb_execute_object(forb_object obj);
+
+
+#endif