Christian Decker
e03acd9663
libplugin: Add features to plugin_main and getmanifest
5 years ago
darosior
3eb0f56f87
libplugin: generalize the plugin_timer callback type
We don't take the callback result into account, so it can better be void.
Having a general callback parameter is handy, because for bcli we want
to pass it the struct bcli.
5 years ago
darosior
2bff80e3de
libplugin: use json_stream helpers for RPC calls
This adds helpers to start and send a jsonrpc request using json_stream
in order to benefit from the helpers.
This then simplifies existing plugins RPC requests by using json_stream
helpers.
5 years ago
darosior
4772025b5d
libplugin don't expose the plugin struct
5 years ago
darosior
02fe34ed95
libplugin: don't expose the rpc_conn struct
5 years ago
darosior
b31e3b1541
libplugin: pass a pointer to plugin to send_outreq
autoclean needs to send outreqs from a timer cb, hence with cmd == NULL.
5 years ago
darosior
765626875e
libplugin: use ccan/io for notifications
5 years ago
darosior
9ebfdf0b8c
libplugin: add remaining globals to the global state
But not the outreqs helpers, which will be moved when passing
send_outreq_ to using ccan/io.
5 years ago
darosior
499dce1c38
libplugin: include the rpc conn into the global state
And rename the struct name, as it's now only used for RPC.
5 years ago
darosior
fcbd11f0c5
plugins/libplugin: hook support
Changelog-Added: plugins: libplugin now supports writing plugins which register to hooks
5 years ago
darosior
3371f0cf78
plugins/libplugin: notifications support
Changelog-Added: plugins: libplugin now supports writing plugin which registers to notifications
5 years ago
trueptolemy
2d1a153975
plugins: Return `command_param_failed()` if `param()` fail
5 years ago
darosior
0cd3823c98
libplugin: pass configuration to plugin's 'init' callback
So that a plugin can, for example, know if it has been loaded on startup
5 years ago
darosior
017ee7c916
libplugin: Add 'getmanifest' 'dynamic' field
5 years ago
Rusty Russell
c585f22711
libplugin: update API to use json_out.
We now hand around struct json_out members, rather than using formatted
strings, so plugins need to construct them properly.
There's no automatic conversion between ' and " any more, so those
are eliminated too. pay still uses some manual construction of elements.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
6 years ago
darosior
4640d18ef0
Plugins: allow to specify plugin option type in libplugin.c, then specify it to autoclean options
6 years ago
darosior
9d34121ec5
libplugin.c: Handle command categories then set them in pay and autoclean
6 years ago
ZmnSCPxj
30ad98a3ea
plugins/autoclean.c: Remove unnecessary inclusions.
6 years ago
Rusty Russell
4370ffa978
autoclean: make this a plugin.
No change in behavior.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
6 years ago