]> rtime.felk.cvut.cz Git - frescor/fwp.git/blobdiff - frsh/frsh_contract.h
Modifications of frsh
[frescor/fwp.git] / frsh / frsh_contract.h
index 90ac9c08b118bea6c0a7decc408550f18a1a4cd0..421fc7ebf55e06c7608ab28f356baed37b9b1e8d 100644 (file)
@@ -6,6 +6,19 @@
 #ifndef _FRSH_CONTRACT_H
 #define _FRSH_CONTRACT_H
 
+typedef struct frsh_contract {
+       frsh_budget_t   budget;
+       frsh_period_t   period;
+}
 
+typedef frsh_contract_t* frsh_contract_d_t;
+
+typedef struct frsh_contract_ops {
+       frsh_contract_t* (*create)(frsh_resource_t* resource);
+       int              (*reserve)(frsh_contract_t* contract);
+       int              (*commit)(frsh_contract_t* contract);
+       /* just for compability, combination of previous */
+       int              (*negotiate)(frsh_contract_t* contract);
+}
 
 #endif /* _FRSH_CONTRACT_H */