build: honour CMake install prefix in hardcoded paths
[project/rpcd.git] / include / rpcd / plugin.h
index 6b3d244106b1aca5e8669ad5ca3101e6ce370886..b795f0ee355498ebd8f9ca3d0295fc8280ddbf4b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * rpcd - UBUS RPC server
  *
- *   Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
+ *   Copyright (C) 2013-2014 Jo-Philipp Wich <jow@openwrt.org>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 
 #include <libubox/blobmsg_json.h>
 #include <libubus.h>
+#include <json-c/json.h>
 
-#include "exec.h"
-#include "session.h"
+#include <rpcd/exec.h>
+#include <rpcd/session.h>
 
 /* location of plugin executables */
-#define RPC_PLUGIN_DIRECTORY        "/usr/libexec/rpcd"
+#define RPC_PLUGIN_DIRECTORY   INSTALL_PREFIX "/libexec/rpcd"
 
 /* location of plugin libraries */
-#define RPC_LIBRARY_DIRECTORY       "/usr/lib/rpcd"
+#define RPC_LIBRARY_DIRECTORY  INSTALL_PREFIX "/lib/rpcd"
 
 struct rpc_daemon_ops {
     bool (*session_access)(const char *sid, const char *scope,
@@ -53,6 +54,7 @@ struct rpc_daemon_ops {
                 rpc_exec_read_cb_t err, rpc_exec_done_cb_t end,
                 void *priv, struct ubus_context *ctx,
                 struct ubus_request_data *req);
+    int *exec_timeout;
 };
 
 struct rpc_plugin {