]> rtime.felk.cvut.cz Git - frescor/frsh.git/commitdiff
fres_contract_type split to lower namespace pollution
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 26 Nov 2008 12:32:14 +0000 (13:32 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 26 Nov 2008 12:34:12 +0000 (13:34 +0100)
This was necessary to compile ORTE applications with FRSH as ORTE uses
slightly different variant of of CDR_Codec type.

fres/contract/Makefile.omk
fres/contract/fres_contract_ser.h [new file with mode: 0644]
fres/contract/fres_contract_type.h

index ad001533f27b8c2640575e9a09e0f64b880ce604..c3b958a77863293f6ac7098f9a56f012dd9d5dc8 100644 (file)
@@ -3,12 +3,13 @@ shared_LIBRARIES = contract
 contract_SOURCES = fres_contract.c fres_container.c fres_error.c contract_func.c
 contract_CLIENT_IDL = fres_contract_idl.idl fres_blocks.idl
 
-fres_contract_idl_IDLFLAGS = --include=fres_contract_type.h
+fres_contract_idl_IDLFLAGS = --include=fres_contract_ser.h
 fres_blocks_IDLFLAGS = --include=idl_native.h
 
-include_HEADERS = fres_container.h fres_container_type.h               \
-                 fres_contract_type.h fres_container_internal.h        \
-                 idl_native.h fres_contract.h fres_error.h
+include_HEADERS = fres_container.h fres_container_type.h       \
+                 fres_contract_type.h fres_contract_ser.h      \
+                 fres_container_internal.h idl_native.h        \
+                 fres_contract.h fres_error.h
 
 include_GEN_HEADERS = fres_contract_idl.h fres_blocks.h
 
diff --git a/fres/contract/fres_contract_ser.h b/fres/contract/fres_contract_ser.h
new file mode 100644 (file)
index 0000000..1e11fe7
--- /dev/null
@@ -0,0 +1,29 @@
+/**
+ * @file   fres_contract_ser.h
+ * @author Michal Sojka <sojkam1@fel.cvut.cz>
+ * @date   Wed Nov 26 13:24:47 2008
+ * 
+ * @brief  Prototypes of contract (de)serialization functions.
+ * 
+ * This is a separate header in order to avoid inclusion of CDR codec
+ * and such types to FRSH header files. In frsh_opaque_types.h we only
+ * need the contract type and not (de)serialization.
+ */
+#ifndef FRES_CONTRACT_SER_H
+#define FRES_CONTRACT_SER_H
+
+#include <forb/basic_types.h>
+#include <forb/cdr_codec.h>
+#include "fres_contract_type.h"
+
+CORBA_boolean
+fres_contract_ptr_serialize(CDR_Codec *codec,
+                         const fres_contract_ptr *contract);
+
+CORBA_boolean
+fres_contract_ptr_deserialize(CDR_Codec *codec,
+                           fres_contract_ptr *contract);
+
+void fres_contract_ptr_free(fres_contract_ptr contract);
+
+#endif
index aebf69dcfcdfcaf0d17a68ee37d4eacd1e2f9f1e..ccc2ea224ce6938b326f7e454e9769e309896fc8 100644 (file)
@@ -1,22 +1,11 @@
 #ifndef FRES_CONTRACT_TYPE_H
 #define FRES_CONTRACT_TYPE_H
 
-#include <forb/basic_types.h>
-#include <forb/cdr_codec.h>
-
 /**
  * Data type for represenataion of contract (imcomplete declaration).
  */
 typedef struct fres_contract *fres_contract_ptr;
 
-CORBA_boolean
-fres_contract_ptr_serialize(CDR_Codec *codec,
-                         const fres_contract_ptr *contract);
-
-CORBA_boolean
-fres_contract_ptr_deserialize(CDR_Codec *codec,
-                           fres_contract_ptr *contract);
-
 void fres_contract_ptr_free(fres_contract_ptr contract);
 
 #endif