aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/json_rpc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/json_rpc.h')
-rw-r--r--src/json_rpc.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/json_rpc.h b/src/json_rpc.h
index 0d6d34d..a341835 100644
--- a/src/json_rpc.h
+++ b/src/json_rpc.h
@@ -18,15 +18,19 @@ struct jsonrpc_request;
int jsonrpc_generate_request_id(void);
-int jsonrpc_request_create(struct jsonrpc_request**,
- int id,
- const char* method,
- struct json_object* params);
+int jsonrpc_request_create(
+ struct jsonrpc_request**,
+ int id,
+ const char* method,
+ struct json_object* params
+);
void jsonrpc_request_destroy(struct jsonrpc_request*);
-int jsonrpc_notification_create(struct jsonrpc_request**,
- const char* method,
- struct json_object* params);
+int jsonrpc_notification_create(
+ struct jsonrpc_request**,
+ const char* method,
+ struct json_object* params
+);
int jsonrpc_request_is_notification(const struct jsonrpc_request*);
int jsonrpc_request_send(const struct jsonrpc_request*, int fd);
@@ -43,15 +47,19 @@ struct jsonrpc_response;
const char* jsonrpc_response_to_string(const struct jsonrpc_response*);
-int jsonrpc_response_create(struct jsonrpc_response**,
- const struct jsonrpc_request*,
- struct json_object* result);
+int jsonrpc_response_create(
+ struct jsonrpc_response**,
+ const struct jsonrpc_request*,
+ struct json_object* result
+);
void jsonrpc_response_destroy(struct jsonrpc_response*);
-int jsonrpc_error_create(struct jsonrpc_response**,
- struct jsonrpc_request*,
- int code,
- const char* message);
+int jsonrpc_error_create(
+ struct jsonrpc_response**,
+ struct jsonrpc_request*,
+ int code,
+ const char* message
+);
int jsonrpc_response_is_error(const struct jsonrpc_response*);
int jsonrpc_response_send(const struct jsonrpc_response*, int fd);