* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
#include "file.h"
+#include "plugin.h"
static struct blob_buf buf;
}
-int rpc_file_api_init(struct ubus_context *ctx)
+static int
+rpc_file_api_init(const struct rpc_daemon_ops *o, struct ubus_context *ctx)
{
static const struct ubus_method file_methods[] = {
UBUS_METHOD("read", rpc_file_read, rpc_file_policy),
return ubus_add_object(ctx, &obj);
}
+
+const struct rpc_plugin rpc_plugin = {
+ .init = rpc_file_api_init
+};
#ifndef __RPC_FILE_H
#define __RPC_FILE_H
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <dirent.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
#include <libubus.h>
#include <libubox/blobmsg.h>
#include <libubox/ustream.h>
int stat;
};
-int rpc_file_api_init(struct ubus_context *ctx);
-
#endif
#include <signal.h>
#include "session.h"
-#include "file.h"
#include "uci.h"
#include "luci2.h"
#include "plugin.h"
ubus_add_uloop(ctx);
rpc_session_api_init(ctx);
- rpc_file_api_init(ctx);
rpc_uci_api_init(ctx);
rpc_luci2_api_init(ctx);
rpc_plugin_api_init(ctx);