From 2ada8954ecd3601d115a22696c4c3ab90858cec3 Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Sun, 17 Nov 2019 00:07:12 +0100 Subject: [HICN-379] Add face priority support in face manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If4f75d44fc66414a4a70135de7827f5082b97112 Signed-off-by: Jordan Augé --- hicn-light/src/hicn/io/ioOperations.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'hicn-light/src/hicn/io/ioOperations.h') diff --git a/hicn-light/src/hicn/io/ioOperations.h b/hicn-light/src/hicn/io/ioOperations.h index c8a107199..ee8720e77 100644 --- a/hicn-light/src/hicn/io/ioOperations.h +++ b/hicn-light/src/hicn/io/ioOperations.h @@ -89,6 +89,10 @@ struct io_ops { void (*setState)(IoOperations *ops, connection_state_t state); connection_state_t (*getAdminState)(const IoOperations *ops); void (*setAdminState)(IoOperations *ops, connection_state_t admin_state); +#ifdef WITH_POLICY + uint32_t (*getPriority)(const IoOperations *ops); + void (*setPriority)(IoOperations *ops, uint32_t priority); +#endif /* WITH_POLICY */ const char * (*getInterfaceName)(const IoOperations *ops); }; @@ -416,6 +420,25 @@ connection_state_t ioOperations_GetAdminState(const IoOperations *ops); */ void ioOperations_SetAdminState(IoOperations *ops, connection_state_t admin_state); +#ifdef WITH_POLICY +/** + * Returns the priority of the connection + * + * @param [in] ops The connection implementation. + * + * @return Connection state (uint32_t). + */ +uint32_t ioOperations_GetPriority(const IoOperations *ops); + +/** + * Sets the priority of the connection + * + * @param [in] ops The connection implementation. + * @param [in] state New state to set (uint32_t). + */ +void ioOperations_SetPriority(IoOperations *ops, uint32_t priority); +#endif /* WITH_POLICY */ + /** * Sets the interface name associated to the connection. * -- cgit 1.2.3-korg