*
*/
-#ifndef _FRSH_CONTRACT_H
-#define _FRSH_CONTRACT_H
+#ifndef FRSH_CONTRACT_H
+#define FRSH_CONTRACT_H
-typedef struct frsh_contract {
+typedef struct frsh_contract_params {
frsh_budget_t budget;
frsh_period_t period;
-}
+} frsh_contract_params_t;
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);
+ /*frsh_contract_d_t* (*create)(frsh_resource_t* resource);*/
+ int (*reserve)(frsh_contract_params_t* params,
+ frsh_contract_d_t* contractdp);
+ int (*commit)(frsh_contract_d_t contractd);
+ /* just for compability, combination of previous functions */
+ int (*negotiate)(frsh_contract_params_t* params,
+ frsh_contract_d_t* contractdp);
+ int (*create_vres)(frsh_contract_d_t contractd, frsh_vresd_t* vresdp);
}
-#endif /* _FRSH_CONTRACT_H */
+#endif /* FRSH_CONTRACT_H */