Christian Decker
e03acd9663
libplugin: Add features to plugin_main and getmanifest
2020-04-16 18:03:35 +09:30
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.
2020-02-12 11:45:07 +10:30
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.
2020-02-10 09:49:15 +10:30
darosior
4772025b5d
libplugin don't expose the plugin struct
2020-02-05 17:05:56 +10:30
darosior
02fe34ed95
libplugin: don't expose the rpc_conn struct
2020-02-04 13:24:32 +10:30
darosior
b31e3b1541
libplugin: pass a pointer to plugin to send_outreq
...
autoclean needs to send outreqs from a timer cb, hence with cmd == NULL.
2020-02-04 13:24:32 +10:30
darosior
765626875e
libplugin: use ccan/io for notifications
2020-02-04 13:24:32 +10:30
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.
2020-02-04 13:24:32 +10:30
darosior
499dce1c38
libplugin: include the rpc conn into the global state
...
And rename the struct name, as it's now only used for RPC.
2020-02-04 13:24:32 +10:30
darosior
fcbd11f0c5
plugins/libplugin: hook support
...
Changelog-Added: plugins: libplugin now supports writing plugins which register to hooks
2019-12-09 16:18:28 +01:00
darosior
3371f0cf78
plugins/libplugin: notifications support
...
Changelog-Added: plugins: libplugin now supports writing plugin which registers to notifications
2019-12-09 16:18:28 +01:00
trueptolemy
2d1a153975
plugins: Return command_param_failed()
if param()
fail
2019-09-19 01:07:11 +00:00
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
2019-08-03 13:15:40 +02:00
darosior
017ee7c916
libplugin: Add 'getmanifest' 'dynamic' field
2019-08-03 13:15:40 +02:00
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>
2019-06-12 02:00:15 +00:00
darosior
4640d18ef0
Plugins: allow to specify plugin option type in libplugin.c, then specify it to autoclean options
2019-06-03 00:06:12 +00:00
darosior
9d34121ec5
libplugin.c: Handle command categories then set them in pay and autoclean
2019-06-03 00:02:25 +00:00
ZmnSCPxj
30ad98a3ea
plugins/autoclean.c: Remove unnecessary inclusions.
2019-05-23 03:02:05 +00:00
Rusty Russell
4370ffa978
autoclean: make this a plugin.
...
No change in behavior.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-22 00:18:29 +02:00