summaryrefslogtreecommitdiff
path: root/cesar/cp2/cco/bw/bw_lib_alloc.h
diff options
context:
space:
mode:
authorlaranjeiro2008-05-22 15:54:59 +0000
committerlaranjeiro2008-05-22 15:54:59 +0000
commitc145ca10efe6b177c2ca5f0e6cab03be63304f6b (patch)
tree0b7ba25da860068d5fb21bf9ad10f3aff6b54e34 /cesar/cp2/cco/bw/bw_lib_alloc.h
parent61322ccc315fc5e23260f039189c197f1b30f335 (diff)
bw: Add a library to manage the allocation for the beacon module.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@2074 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp2/cco/bw/bw_lib_alloc.h')
-rw-r--r--cesar/cp2/cco/bw/bw_lib_alloc.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/cesar/cp2/cco/bw/bw_lib_alloc.h b/cesar/cp2/cco/bw/bw_lib_alloc.h
new file mode 100644
index 0000000000..0004afb4f3
--- /dev/null
+++ b/cesar/cp2/cco/bw/bw_lib_alloc.h
@@ -0,0 +1,62 @@
+#ifndef cp2_ccp_cco_bw_bw_lib_alloc_h
+#define cp2_ccp_cco_bw_bw_lib_alloc_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp2/cco/bw/bw_lib_alloc.h
+ * \brief schedules allocation.
+ * \ingroup cp2_cco_bw
+ *
+ */
+#include "cp2/cco/bw/bw.h"
+
+/** Initialise the SET.
+ * \param set the set to initialise.
+ */
+void
+cp_cco_bw_schedules_init (set_t *set);
+
+/** Uninitialise the SET.
+ * \param set the set to initialise.
+ */
+void
+cp_cco_bw_schedules_uninit (set_t *set);
+
+/** Add an allocation.
+ * \param set the set to add the allocation.
+ * \param node the node to add.
+ */
+void
+cp_cco_bw_schedules_add (set_t *set, cp_cco_bw_alloc_conn_t *alloc);
+
+/** Get the first allocation.
+ * \param set the set.
+ * \return the first allocation of the set.
+ */
+cp_cco_bw_alloc_conn_t*
+cp_cco_bw_schedules_get_first (set_t *set);
+
+/** Get the next allocation.
+ * \param set the set.
+ * \return the first allocation of the set.
+ */
+cp_cco_bw_alloc_conn_t*
+cp_cco_bw_schedules_get_next (set_t *set, cp_cco_bw_alloc_conn_t* alloc);
+
+/**
+ * Compare two nodes.
+ * \param left Left node.
+ * \param right Right node.
+ * \return true if the left node is lesser than the right one
+ */
+bool
+cp_cco_bw_schedules_allocation_less (set_node_t * left,
+ set_node_t * right);
+
+
+#endif /* cp2_ccp_cco_bw_bw_lib_alloc_h */