ubus/libubus-internal.h
Felix Fietkau d366a6de83 watch add/remove -> subscribe/unsubscribe:
rename the ADD_WATCH/REMOVE_WATCH messages to SUBSCRIBE/UNSUBSCRIBE and change
the message format and libubus API in preparation for adding object notifications

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-13 19:35:38 +01:00

31 lines
1.2 KiB
C

/*
* Copyright (C) 2011-2012 Felix Fietkau <nbd@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1
* as published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __LIBUBUS_IO_H
#define __LIBUBUS_IO_H
#define __hidden __attribute__((visibility ("hidden")))
extern struct blob_buf b;
struct blob_attr **ubus_parse_msg(struct blob_attr *msg);
void ubus_handle_data(struct uloop_fd *u, unsigned int events);
int ubus_send_msg(struct ubus_context *ctx, uint32_t seq,
struct blob_attr *msg, int cmd, uint32_t peer);
void ubus_process_msg(struct ubus_context *ctx, struct ubus_msghdr *hdr);
void ubus_process_invoke(struct ubus_context *ctx, struct ubus_msghdr *hdr);
int __hidden ubus_start_request(struct ubus_context *ctx, struct ubus_request *req,
struct blob_attr *msg, int cmd, uint32_t peer);
void ubus_process_unsubscribe(struct ubus_context *ctx, struct ubus_msghdr *hdr);
#endif