]> rtime.felk.cvut.cz Git - frescor/fwp.git/blobdiff - fwp/lib/mngt/fwp_contract.h
Futher include file cleaning
[frescor/fwp.git] / fwp / lib / mngt / fwp_contract.h
index 8ad6ec094ce11ac4d289db54b9c6713ebb28aa39..ea15d3847c60225667b095144a01a491f0a86c1c 100644 (file)
@@ -2,10 +2,7 @@
 #define _FWP_CONTRACT_H
 
 #include "fwp_vres.h"
-#include "ul_list.h"
-#include "ul_gavlcust.h"
 
-#include <stdlib.h>
 /*
  *typedef struct mfrsh_contract_ops{
  *     fwp_contract_d_t (*create)(fwp_contract_t *contract);
  *}
  */
 
-/**< Contract Status */ 
-/*typedef enum {
-       FWP_CONT_INVALID =      0,
-       FWP_CONT_REQUESTED =    1,
-       FWP_CONT_REJECTED =     2,
-       FWP_CONT_NEGOTIATED =   3,
-       FWP_CONT_ACCEPTED =     4
-} fwp_contract_status_t;*/
-
-typedef enum {
-       FWP_CONT_NOTNEGOTIATED  = 0,
-       FWP_CONT_RESERVED       = 1,    
-       FWP_CONT_NEGOTIATED     = 2
-} fwp_contract_status_t;
-
 /**
  * FWP contract.
  * It is an external representation of contract intented for application 
@@ -47,10 +29,35 @@ struct fwp_contract {
 } fwp_contract_t;
 
 struct fwp_contract_data;
-//typedef struct fwp_contract_data fwp_contract_data_t;
 typedef struct fwp_contract_data* fwp_contract_d_t;
 
+fwp_contract_d_t fwp_contract_create(fwp_contract_t *contract);
+int  fwp_contract_negotiate(fwp_contract_d_t contract, fwp_vres_d_t *vresdp);
+int fwp_contract_is_negotiated(fwp_contract_d_t contract);
+
+
 #ifdef _FWP_INTERNALS_
+
+#include "ul_gavlcust.h"
+#include "ul_list.h"
+#include <stdlib.h>
+
+/**< Contract Status */ 
+/*typedef enum {
+       FWP_CONT_INVALID =      0,
+       FWP_CONT_REQUESTED =    1,
+       FWP_CONT_REJECTED =     2,
+       FWP_CONT_NEGOTIATED =   3,
+       FWP_CONT_ACCEPTED =     4
+} fwp_contract_status_t;*/
+
+typedef enum {
+       FWP_CONT_NOTNEGOTIATED  = 0,
+       FWP_CONT_RESERVED       = 1,    
+       FWP_CONT_NEGOTIATED     = 2
+} fwp_contract_status_t;
+
+typedef struct fwp_contract_data fwp_contract_data_t;
 typedef fwp_vres_id_t fwp_contract_id_t;
 
 /**
@@ -74,8 +81,7 @@ struct fwp_contract_data {
 
        ul_list_node_t                  list_node;
        gavl_node_t                     tree_node;      
-} fwp_contract_data_t;
-
+};
 
 static inline fwp_contract_data_t* fwp_contract_data_new()
 {
@@ -86,11 +92,5 @@ static inline fwp_contract_data_t* fwp_contract_data_new()
 int fwp_contract_reserve(fwp_contract_d_t contractd);
 int fwp_contract_commit(fwp_contract_d_t contractd, fwp_vres_d_t *vresdp);
 
-#endif
-
-fwp_contract_d_t fwp_contract_create(fwp_contract_t *contract);
-int  fwp_contract_negotiate(fwp_contract_d_t contract, fwp_vres_d_t *vresdp);
-int fwp_contract_is_negotiated(fwp_contract_d_t contract);
-
-
+#endif /*_FWP_INTERNALS_ */
 #endif /*_FWP_CONTRACT_H */