]> rtime.felk.cvut.cz Git - frescor/frsh.git/commitdiff
Added some doxygen comments
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 9 Nov 2008 22:55:14 +0000 (23:55 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 9 Nov 2008 22:55:14 +0000 (23:55 +0100)
fres/contract/fres_container.h
fres/contract/fres_container_internal.h
fres/contract/fres_contract.c
fres/contract/fres_contract.h

index 3259f47c71b041b758e298680dbe5cd9b9ce8e5f..a5283e52cbd94da82293025a1c23c431c977f01a 100644 (file)
@@ -42,7 +42,10 @@ enum fres_block_type {
 
 typedef CORBA_boolean (fres_block_serialize_fnc_t)(CDR_Codec *codec, const void *block_data);
 typedef CORBA_boolean (fres_block_deserialize_fnc_t)(CDR_Codec *codec, void **block_data);
-                                            
+
+/**
+ * Description of contract blocks.
+ */
 struct fres_block_desc {
        const char *name;       /**< Name of the block for use fres_container_to_string() */
        size_t size;            /**< Size of the block (used by fres_block_duplicate_default() and fres_container_ptr_deserialize()) */
index 13173c9e54e45098d1986b32669cd872230d4a69..7e16b78ccd5c5246965dc17a6108e991e3cb8d2b 100644 (file)
@@ -4,7 +4,7 @@
  * 
  * @brief  Internal interface to fres_container.
  *
- * This header should only be included by files in frsh/cm library.
+ * This header should only be included by files in frsh/fres library.
  * 
  */
 #ifndef FRES_CONTAINER_INTERNAL_H
@@ -27,15 +27,19 @@ enum fres_block_state {
 #define FRES_BLOCK_FLAG_ENDIAN_m 0x0001
 #define FRES_BLOCK_LITTLE_ENDIAN 0x0001
 
-/**< Unserialized (unknown) contracts blocks */
+/** Unserialized (unknown) contracts blocks */
 typedef struct fres_block_stream {
        void *data; /**< Serialized data */
        CORBA_unsigned_short flags; /**< Flags: bit 1 - little endian */
        size_t length;              /**< Length of the stream */
 } fres_block_stream_t;
 
+/**
+ * Contract block.
+ * 
+ */
 struct fres_block {
-       enum fres_block_state state;
+       enum fres_block_state state; /**< State of the block */
        union {
                /** Pointer to data according to param_type
                 * (state == FRES_BLOCK_DATA) */
@@ -47,10 +51,18 @@ struct fres_block {
        } u;
 };
 
+/**
+ * Container for contract blocks.
+ *
+ * This is currently implemented as fixed size array of ::fres_block
+ * structures, which means that the container cannot contain multiple
+ * blocks of the same type.
+ */
 struct fres_container {
        struct fres_block blocks[FRES_NUM_BLOCKS];
 };
 
+/** Checks wheder the @a type is valid number of the block */
 #define FRES_BLOCK_TYPE_VALID(type)    \
        ((type) < FRES_NUM_BLOCKS &&    \
         (type) >= 0)
index f462a73a7318267ff9720e950b8bc36dc340cfff..4605ea623bb8f2c795a0623c4fa813cd5d5ebb7e 100644 (file)
@@ -1,3 +1,12 @@
+/**
+ * @file   fres_contract.c
+ * @author Michal Sojka <sojkam1@fel.cvut.cz>
+ * @date   Sun Nov  9 22:17:29 2008
+ * 
+ * @brief  Implementation of contract functions
+ * 
+ * 
+ */
 #include <fres_contract.h>
 #include <fres_container_internal.h>
 #include <string.h>
index 0fe6bfa309f62873055501ce9203c730c31eb96f..d3a4df5c47f40424c365e6d690ae7b90fc2c1df0 100644 (file)
@@ -1,3 +1,12 @@
+/**
+ * @file   fres_contract.h
+ * @author Michal Sojka <sojkam1@fel.cvut.cz>
+ * @date   Sun Nov  9 22:15:09 2008
+ * 
+ * @brief  Declaration of contract type and functions
+ * 
+ * 
+ */
 #ifndef FRES_CONTRACT_H
 #define FRES_CONTRACT_H
 
@@ -8,9 +17,13 @@
 #include <fres_contract_idl.h>
 #include <forb/server_id.h>
 
+/**
+ * Contract data type.
+ * 
+ */
 struct fres_contract {
-       fres_contract_id_t id;
-       struct fres_container *container;       /**< Pointer to the container (opaque type). */
+       fres_contract_id_t id;  /**< Global contract ID */
+       struct fres_container *container;       /**< Pointer to the block container (opaque type). */
 };
 
 static inline int fres_contract_id_cmp(const fres_contract_id_t *a,