]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
Server ID function prototypes moved to a separate header
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 20 Oct 2008 15:46:13 +0000 (17:46 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 20 Oct 2008 15:46:13 +0000 (17:46 +0200)
src/Makefile.omk
src/forb-internal.h
src/forb.c
src/server_id.h [new file with mode: 0644]

index 1853c88fb34b88f871a58e671395a88e07c22c3a..d9d49feb5dfdfaf22673844c3def9c89a34e3ff3 100644 (file)
@@ -31,6 +31,7 @@ renamed_include_HEADERS += \
        $(call to_forb_subdir, refcnt.h) \
        $(call to_forb_subdir, request.h) \
        $(call to_forb_subdir, syncobj.h) \
+       $(call to_forb_subdir, server_id.h) \
        $(call to_forb_subdir, uuid.h)
 
 renamed_include_GEN_HEADERS = \
index ec9a84deeecd52025493b46d3326e5fa03c82f9f..b4fea905e6e9d8299e8b09ec7e4be3505b6ffcbb 100644 (file)
@@ -65,6 +65,7 @@
 #include <ul_gavlcust.h>
 #include <forb.h>
 #include <string.h>
+#include <forb/server_id.h>
 
 
 /**
@@ -119,49 +120,4 @@ typedef void (*forb_skel_func)(CDR_Codec *cin,
 int
 forb_init_tmp_dir(void);
 
-void
-forb_server_id_init(forb_server_id *serer);
-
-/** 
- * Compares to server IDs.
- * 
- * @param id1 
- * @param id2 
- * 
- * @return -1, 0 or 1 if the @a id1 is less, equal on greated to @a id2 respectively.
- */
-static inline int forb_server_id_cmp(const forb_server_id *id1, const forb_server_id *id2)
-{
-       return memcmp(id1, id2, sizeof(forb_server_id));
-}
-
-/** 
- * Converts a server ID to string.
- * 
- * @param dest Where to store the converted string.
- * @param server_id Server ID to convert.
- * @param n The size of @a dest memory buffer.
- * 
- * @return Same value as @a dest.
- */
-static inline char *
-forb_server_id_to_string(char *dest, const forb_server_id *server_id, size_t n)
-{
-       return forb_uuid_to_string(dest, (forb_uuid_t*)server_id->uuid, n);
-}
-
-/** 
- * Initializes server ID from string.
- * 
- * @param server_id Initialized server ID.
- * @param string String form of server ID.
- * 
- * @return Same value as @a server_id.
- */
-static inline forb_server_id * 
-forb_server_id_from_string(forb_server_id *server_id, const char *string)
-{
-       return (forb_server_id *)forb_uuid_from_string((forb_uuid_t*)&server_id->uuid, string);
-}
-
 #endif
index 94e77864fca37e09272c8b04f75330563ba6b563..b067b3e7c8c36c394c5dbc2a9aa5da21c28e8aee 100644 (file)
@@ -246,6 +246,7 @@ void forb_destroy(forb_orb orb)
 /* { */
 /*     gavl_insert(&type_registry, &interface->node); */
 /* } */
+
 /** 
  * Initializes server ID variable.
  * 
diff --git a/src/server_id.h b/src/server_id.h
new file mode 100644 (file)
index 0000000..f179b28
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef FORB_SERVER_ID_H
+#define FORB_SERVER_ID_H
+
+#include <forb/uuid.h>
+#include <forb/types.h>
+
+void
+forb_server_id_init(forb_server_id *serer);
+
+/** 
+ * Compares to server IDs.
+ * 
+ * @param id1 
+ * @param id2 
+ * 
+ * @return -1, 0 or 1 if the @a id1 is less, equal on greated to @a id2 respectively.
+ */
+static inline int forb_server_id_cmp(const forb_server_id *id1, const forb_server_id *id2)
+{
+       return memcmp(id1, id2, sizeof(forb_server_id));
+}
+
+/** 
+ * Converts a server ID to string.
+ * 
+ * @param dest Where to store the converted string.
+ * @param server_id Server ID to convert.
+ * @param n The size of @a dest memory buffer.
+ * 
+ * @return Same value as @a dest.
+ */
+static inline char *
+forb_server_id_to_string(char *dest, const forb_server_id *server_id, size_t n)
+{
+       return forb_uuid_to_string(dest, (forb_uuid_t*)server_id->uuid, n);
+}
+
+/** 
+ * Initializes server ID from string.
+ * 
+ * @param server_id Initialized server ID.
+ * @param string String form of server ID.
+ * 
+ * @return Same value as @a server_id.
+ */
+static inline forb_server_id * 
+forb_server_id_from_string(forb_server_id *server_id, const char *string)
+{
+       return (forb_server_id *)forb_uuid_from_string((forb_uuid_t*)&server_id->uuid, string);
+}
+
+
+
+#endif