summaryrefslogtreecommitdiff
path: root/taler_wallet_core_lib.h
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-12-21 15:39:54 +0100
committerFlorian Dold <florian@dold.me>2022-12-21 15:39:54 +0100
commit67e1d6709faa82837ae8dbfce914466c9c373d18 (patch)
tree4135a43176ba18e5391ddf762376fe31b199d21a /taler_wallet_core_lib.h
parentf1df0ebc62537953b1d93d45594de7c81f583583 (diff)
downloadquickjs-tart-67e1d6709faa82837ae8dbfce914466c9c373d18.tar.gz
quickjs-tart-67e1d6709faa82837ae8dbfce914466c9c373d18.tar.bz2
quickjs-tart-67e1d6709faa82837ae8dbfce914466c9c373d18.zip
wallet core header
Diffstat (limited to 'taler_wallet_core_lib.h')
-rw-r--r--taler_wallet_core_lib.h52
1 files changed, 6 insertions, 46 deletions
diff --git a/taler_wallet_core_lib.h b/taler_wallet_core_lib.h
index dbc36ce..1e42cfb 100644
--- a/taler_wallet_core_lib.h
+++ b/taler_wallet_core_lib.h
@@ -36,13 +36,13 @@ struct TALER_WALLET_Handle;
* @param handler_p opaque closure for the message handler
* @param message message from wallet-core as a JSON string
*/
-typedef void TALER_WALLET_MessageHandlerFn(void *handler_p, char *message);
+typedef void (*TALER_WALLET_MessageHandlerFn)(void *handler_p, char *message);
/**
* Create a new wallet-core handle.
*/
struct TALER_WALLET_Handle *
-TALER_WALLET_create();
+TALER_WALLET_create(void);
/**
* Set a handler for notification and response messages.
@@ -57,53 +57,12 @@ TALER_WALLET_set_handler(struct TALER_WALLET_Handle *h,
/**
- * Enable or disable message queueing mode of the wallet.
- *
- * Queueing is disabled by default.
- */
-void
-TALER_WALLET_set_queueing (struct TALER_WALLET_Handle *h,
- int yesno);
-
-/**
- * Get a pipe file descriptor that signals the availability
- * of new messages in the message queue.
- *
- * One byte of data will be written to the pipe for every available message.
- * The client is responsible for ensuring that every call
- * to #TALER_WALLET_discard_message is paired with a 1-byte
- * read from the pipe.
- *
- * Returns -1 if on error, for example when the platform
- * doesn't support pipes.
- */
-int
-TALER_WALLET_get_eventpipe (struct TALER_WALLET_Handle *h);
-
-/**
- * Look at the message at the head of the message queue.
- *
- * Only works when queueing is enabled.
- *
- * @returns message from wallet-core as a JSON string, valid until
- * #TALER_WALLET_discard_message is called
- */
-const char *
-TALER_WALLET_peek_message (struct TALER_WALLET_Handle *h);
-
-/**
- * Discard the message at the head of the message queue.
- */
-void
-TALER_WALLET_discard_message (struct TALER_WALLET_Handle *h);
-
-/**
* Set/override the JS file with the wallet-core implementation.
* Must be called before the wallet runs.
*/
void
TALER_WALLET_set_jsfile(struct TALER_WALLET_Handle *h,
- char *filename);
+ const char *filename);
/**
* Send a message to wallet-core.
@@ -112,7 +71,8 @@ TALER_WALLET_set_jsfile(struct TALER_WALLET_Handle *h,
* set with #TALER_WALLET_set_handler.
*/
void
-TALER_WALLET_send_message (struct TALER_WALLET_Handle *h);
+TALER_WALLET_send_message (struct TALER_WALLET_Handle *h,
+ const char *msg);
/**
* Run wallet-core in a thread.
@@ -120,7 +80,7 @@ TALER_WALLET_send_message (struct TALER_WALLET_Handle *h);
* This function creates a new thread and returns immediately.
*/
void
-TALER_WALLET_run ();
+TALER_WALLET_run (struct TALER_WLLET_Handle *h);
/**
* Destroy the wallet handle and free resources associated with it.