summaryrefslogtreecommitdiff
path: root/src/client/Disfluid-0.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Disfluid-0.h')
-rw-r--r--src/client/Disfluid-0.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/client/Disfluid-0.h b/src/client/Disfluid-0.h
index 52afe0c..05ce0c4 100644
--- a/src/client/Disfluid-0.h
+++ b/src/client/Disfluid-0.h
@@ -35,7 +35,7 @@ typedef struct DisfluidApi DisfluidApi;
*
* The type of function that is called with the API loaded.
*/
-typedef void *(*DisfluidUser) (const struct DisfluidApi * api, void *data);
+typedef void *(*DisfluidUser) (const DisfluidApi * api, void *data);
/**
* disfluid_api_init:
@@ -60,20 +60,19 @@ struct DisfluidClient;
typedef struct DisfluidClient DisfluidClient;
/**
- * disfluid_client_make:
+ * disfluid_api_make_client:
* @api: the context loaded with @disfluid_init.
+ * @client: (out) (transfer full): where to store the allocated client.
* @client_id: the URI serving a client manifest on the web.
* @redirect_uri: the URI where we can get back an authorization code.
* @jwk: the JWK encoding of the key pair used by the client.
*
* Create a new client.
- *
- * Returns: (transfer full): the allocated client.
*/
-struct DisfluidClient *disfluid_client_make (const struct DisfluidApi *api,
- const char *client_id,
- const char *redirect_uri,
- const char *jwk);
+void disfluid_api_make_client (const DisfluidApi * api,
+ DisfluidClient ** client,
+ const char *client_id,
+ const char *redirect_uri, const char *jwk);
/**
* disfluid_client_free:
@@ -81,46 +80,46 @@ struct DisfluidClient *disfluid_client_make (const struct DisfluidApi *api,
*
* Delete @client.
*/
-void disfluid_client_free (struct DisfluidClient *client);
+void disfluid_client_free (DisfluidClient * client);
/**
* disfluid_client_get_id:
- * @api: the context API.
* @client: the client whose ID to lookup.
+ * @api: the context API.
* @start: how many URL prefix bytes to skip.
* @max: how many URL bytes to copy after the skipped prefix.
* @id: (array length=max) (element-type char): where to copy the URL bytes.
* Returns: the total number of bytes in the URL.
*/
-size_t disfluid_client_get_id (const struct DisfluidApi *api,
- const struct DisfluidClient *client,
+size_t disfluid_client_get_id (const DisfluidClient * client,
+ const DisfluidApi * api,
size_t start, size_t max, char *id);
/**
* disfluid_client_get_redirect_uri:
- * @api: the context API.
* @client: the client whose redirection URI to lookup.
+ * @api: the context API.
* @start: how many URL prefix bytes to skip.
* @max: how many URL bytes to copy after the skipped prefix.
* @redirect_uri: (array length=max) (element-type char): where to copy the URL bytes.
* Returns: the total number of bytes in the URL.
*/
-size_t disfluid_client_get_redirect_uri (const struct DisfluidApi *api,
- const struct DisfluidClient *client,
+size_t disfluid_client_get_redirect_uri (const DisfluidClient * client,
+ const DisfluidApi * api,
size_t start, size_t max,
char *redirect_uri);
/**
* disfluid_client_get_key_pair:
- * @api: the context API.
* @client: the client whose key pair to dump.
+ * @api: the context API.
* @start: how many JWK prefix bytes to skip.
* @max: how many JWK bytes to copy after the skipped prefix.
* @jwk: (array length=max) (element-type char): where to copy the JWK bytes.
* Returns: the total number of bytes in the JWK.
*/
-size_t disfluid_client_get_key_pair (const struct DisfluidApi *api,
- const struct DisfluidClient *client,
+size_t disfluid_client_get_key_pair (const DisfluidClient * client,
+ const DisfluidApi * api,
size_t start, size_t max, char *jwk);
#endif