aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-08-28 20:28:28 +1200
committerDavid Phillips <david@sighup.nz>2018-08-28 20:28:28 +1200
commitc265ee2fec37c27e4077b63e1e745f45397d6e97 (patch)
tree2a533246ad048725515e5ecf8de7291bb052852a /lib
parentfa9bfdbde9a8a38c0dc953052e77b60e677e8da3 (diff)
downloadalarmd-c265ee2fec37c27e4077b63e1e745f45397d6e97.tar.xz
Add method docs to python binding
Diffstat (limited to 'lib')
-rw-r--r--lib/python/alarms.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/python/alarms.c b/lib/python/alarms.c
index 1ac42af..2c42d52 100644
--- a/lib/python/alarms.c
+++ b/lib/python/alarms.c
@@ -14,12 +14,12 @@
#include "pyalarmd_proto.h"
static PyMethodDef ExportedMethods[] = {
- {"connect" , pyalarmd_connect , METH_VARARGS, "FIXME"},
- {"disconnect" , pyalarmd_disconnect, METH_VARARGS, "FIXME"},
- {"register_alarm" , pyalarmd_register , METH_VARARGS, "FIXME"},
- {"deregister_alarm", pyalarmd_deregister, METH_VARARGS, "FIXME"},
- {"raise_alarm" , pyalarmd_raise , METH_VARARGS, "FIXME"},
- {"clear_alarm" , pyalarmd_clear , METH_VARARGS, "FIXME"},
+ {"connect" , pyalarmd_connect , METH_VARARGS, "Open a connection to the named socket at the given path, returning the fd associated with it."},
+ {"disconnect" , pyalarmd_disconnect, METH_VARARGS, "Close a socket fd previously returned by connect(path)."},
+ {"register_alarm" , pyalarmd_register , METH_VARARGS, "Send a request over the given socket to register an alarm with the given name. Returns the UUID of the new alarm as a string"},
+ {"deregister_alarm", pyalarmd_deregister, METH_VARARGS, "Send a request over the given socket to deregister an alarm with the given UUID."},
+ {"raise_alarm" , pyalarmd_raise , METH_VARARGS, "Send a request over the given socket to raise the alarm with the given UUID."},
+ {"clear_alarm" , pyalarmd_clear , METH_VARARGS, "Send a request over the given socket to clear/lower the alarm with the given UUID."},
{NULL , NULL , 0 , NULL }
};
@@ -27,7 +27,7 @@ static PyMethodDef ExportedMethods[] = {
static struct PyModuleDef alarm_python = {
PyModuleDef_HEAD_INIT,
"alarms", /* module name */
- NULL, /* FIXME reference doc */
+ NULL,
-1, /* storage size -1 since state kept in global variables. */
ExportedMethods
};