]> rtime.felk.cvut.cz Git - frescor/fwp.git/blobdiff - fwp/lib/mngt/fwp_contract_table.h
Added support for contract negotiation
[frescor/fwp.git] / fwp / lib / mngt / fwp_contract_table.h
index 732875e224319a5f2e2552fa5c104cce56810852..fff52a049a1debf1a2874a4feaa52556c85a5d1f 100644 (file)
@@ -2,47 +2,22 @@
 #define _FWP_CONTRACT_TABLE_H
 
 #include "fwp_contract.h"
-#include "fwp_vres.h"
-
 #include "ul_list.h"
 #include "ul_gavlcust.h"
 
-#include <string.h>
-
-/**
- * FWP vres parameters 
- * It is internal representation of the contract used inside 
- * protocol.
- * 
- */
-typedef 
-struct fwp_contract_data {
-       fwp_entity_id_t                 id;     
-       /**< contract specified by user */
-       fwp_contract_t                  contract;
-       /**< parameters from contract negotiated for vres */
-       fwp_vres_params_t               vres_params;
-       /**< the address of agent from that the contract comes */
-       /*fwp_transaction_id_t          trans_id;*/     
-       /* pointer to fwp_vres or fwp_participant */
-       void                            *priv; 
-       fwp_contract_status_t           status;
-
-       ul_list_node_t                  list_node;
-       gavl_node_t                     tree_node;      
-} fwp_contract_data_t;
-
 /**
  * List of contract_data structures
  *
  */
-typedef
+/*typedef
 struct fwp_contract_list {
        ul_list_head_t                  head;
 } fwp_contract_list_t;
 
 UL_LIST_CUST_DEC(fwp_contract_list, fwp_contract_list_t, fwp_contract_data_t,
                 head, list_node);
+*/
+
 
 /**
  * Table of contract_data structures
@@ -67,4 +42,10 @@ fwp_contract_table_find(fwp_contract_table_t *tbl, unsigned int id);
 int fwp_contract_table_delete(fwp_contract_table_t *tbl,
                          fwp_contract_data_t *contdata);
 
+fwp_contract_data_t* fwp_contract_table_foreach_begin(fwp_contract_table_t *tbl);
+fwp_contract_data_t* fwp_contract_table_foreach_next(fwp_contract_table_t *tbl, fwp_contract_data_t *current);
+void                fwp_contract_table_foreach_end(fwp_contract_table_t *tbl);
+
+
+
 #endif /* _FWP_CONTRACT_TABLE_H */