#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
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 */