Browse Source

plugins: cleanup shared headers between dynamic and static plugins

travis-debug
darosior 5 years ago
committed by Rusty Russell
parent
commit
73bbf4f6a3
  1. 12
      lightningd/plugin.c
  2. 13
      lightningd/plugin.h
  3. 10
      lightningd/plugin_control.c
  4. 2
      lightningd/plugin_control.h

12
lightningd/plugin.c

@ -1,21 +1,10 @@
#include <ccan/array_size/array_size.h>
#include <ccan/list/list.h>
#include <ccan/opt/opt.h>
#include <ccan/pipecmd/pipecmd.h>
#include <ccan/tal/path/path.h>
#include <ccan/tal/str/str.h>
#include <ccan/utf8/utf8.h>
#include <common/json_command.h>
#include <common/jsonrpc_errors.h>
#include <common/memleak.h>
#include <common/param.h>
#include <common/timeout.h>
#include <common/version.h>
#include <dirent.h>
#include <errno.h>
#include <lightningd/io_loop_with_timers.h>
#include <lightningd/json.h>
#include <lightningd/lightningd.h>
#include <lightningd/notification.h>
#include <lightningd/options.h>
#include <lightningd/plugin.h>
@ -23,7 +12,6 @@
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
/* How many seconds may the plugin take to reply to the `getmanifest
* call`? This is the maximum delay to `lightningd --help` and until

13
lightningd/plugin.h

@ -3,10 +3,23 @@
#include "config.h"
#include <ccan/intmap/intmap.h>
#include <ccan/io/io.h>
#include <ccan/pipecmd/pipecmd.h>
#include <ccan/take/take.h>
#include <ccan/tal/path/path.h>
#include <ccan/tal/tal.h>
#include <common/json_command.h>
#include <common/jsonrpc_errors.h>
#include <common/memleak.h>
#include <common/param.h>
#include <common/timeout.h>
#include <dirent.h>
#include <errno.h>
#include <lightningd/io_loop_with_timers.h>
#include <lightningd/jsonrpc.h>
#include <lightningd/lightningd.h>
#include <lightningd/log.h>
#include <unistd.h>
enum plugin_state {
UNCONFIGURED,

10
lightningd/plugin_control.c

@ -1,15 +1,5 @@
#include <ccan/pipecmd/pipecmd.h>
#include <ccan/tal/path/path.h>
#include <common/json_command.h>
#include <common/jsonrpc_errors.h>
#include <common/param.h>
#include <common/timeout.h>
#include <dirent.h>
#include <errno.h>
#include <lightningd/io_loop_with_timers.h>
#include <lightningd/plugin_control.h>
#include <lightningd/plugin_hook.h>
#include <unistd.h>
/* A dummy structure used to give multiple arguments to callbacks. */
struct dynamic_plugin {

2
lightningd/plugin_control.h

@ -1,7 +1,7 @@
#ifndef LIGHTNING_LIGHTNINGD_PLUGIN_CONTROL_H
#define LIGHTNING_LIGHTNINGD_PLUGIN_CONTROL_H
#include "config.h"
#include <lightningd/lightningd.h>
#include <lightningd/plugin.h>
#endif /* LIGHTNING_LIGHTNINGD_PLUGIN_CONTROL_H */

Loading…
Cancel
Save