]> rtime.felk.cvut.cz Git - frescor/fwp.git/blob - frsh/frsh_contract.h
Modifications of frsh
[frescor/fwp.git] / frsh / frsh_contract.h
1 /**
2  * \file frsh_contract.h
3  *
4  */
5
6 #ifndef _FRSH_CONTRACT_H
7 #define _FRSH_CONTRACT_H
8
9 typedef struct frsh_contract {
10         frsh_budget_t   budget;
11         frsh_period_t   period;
12 }
13
14 typedef frsh_contract_t* frsh_contract_d_t;
15
16 typedef struct frsh_contract_ops {
17         frsh_contract_t* (*create)(frsh_resource_t* resource);
18         int              (*reserve)(frsh_contract_t* contract);
19         int              (*commit)(frsh_contract_t* contract);
20         /* just for compability, combination of previous */
21         int              (*negotiate)(frsh_contract_t* contract);
22 }
23
24 #endif /* _FRSH_CONTRACT_H */