1/**
2 * \file
3 * \brief Publish/Subscribe header file
4 */
5
6/*
7 * Copyright (c) 2011, ETH Zurich.
8 * All rights reserved.
9 *
10 * This file is distributed under the terms in the attached LICENSE file.
11 * If you do not find this file, copies can be found by writing to:
12 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
13 */
14
15#ifndef OCTOPUS_PUBSUB_H_
16#define OCTOPUS_PUBSUB_H_
17
18#include <stdint.h>
19
20typedef uint64_t subscription_t;
21typedef void(*subscription_handler_fn)(octopus_mode_t mode, const char* record, void* state);
22
23errval_t oct_subscribe(subscription_handler_fn, const void*, subscription_t*,
24        const char*, ...);
25errval_t oct_unsubscribe(subscription_t);
26errval_t oct_publish(const char*, ...);
27
28#endif /* OCTOPUS_PUBSUB_H_ */
29