--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+shared_LIBRARIES = frsh
+
+frsh_SOURCES = contract.c
+frsh_CLIENT_IDL = contract-idl.idl
+
+include_GEN_HEADERS = contract-idl.h
--- /dev/null
+/**
+ * @file contract-idl.idl
+ * @author Michal Sojka <sojkam1@fel.cvut.cz>
+ * @date Sun Sep 7 17:24:37 2008
+ *
+ * @brief Definitions of data types and constants for FRESCOR contracts.
+ *
+ */
+
+module frsh {
+ struct timespec {
+ long tv_sec;
+ long tv_nsec;
+ };
+
+ // TODO: Try to use native types
+ typedef timespec fosa_rel_time_t;
+ typedef timespec fosa_abs_time_t;
+
+ enum frsh_contract_type_t {
+ FRSH_CT_REGULAR,
+ FRSH_CT_BACKGROUND,
+ FRSH_CT_DUMMY
+ };
+
+
+ native contract_t;
+ native contract_handle_t;
+
+
+ module contract {
+
+ /// Contains parameters of contracts grouped by
+ /// modules. Any other module can add their own
+ /// parameters.
+ module params {
+
+ /// IDs of all (even externally defined) parameters
+ enum id {
+ BASIC_PARAMS,
+ SPARE_CAPACITY_PARAMS
+ };
+ struct basic {
+ fosa_rel_time_t budget;
+ fosa_rel_time_t period;
+ frsh_contract_type_t contract_type;
+ };
+
+ enum granularity_t { DISCRETE, CONTINUOUS };
+ struct spare_capacity {
+ fosa_rel_time_t stability_time;
+ granularity_t granularity;
+ };
+ };
+ };
+};