summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-29 20:39:48 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-29 20:39:48 +0800
commita9c230a80abfb78f09980efad809666050c702b6 (patch)
treec193394fb1d0b8ec10029ae83a04521620d7508b
parentf9ccf11dab8e7ffef363c774c94c660c144f8efb (diff)
Reorder results parameters
-rw-r--r--client.c5
-rw-r--r--icclient/client.h8
2 files changed, 7 insertions, 6 deletions
diff --git a/client.c b/client.c
index 20859ed..7eab0c9 100644
--- a/client.c
+++ b/client.c
@@ -39,9 +39,10 @@ bool icclient_init(const char *url, const char *certificate)
return (bool)curl;
}
-void icclient_results(size_t (*handler)(void *contents, size_t size,
+void icclient_results(const char *prodgroup,
+ size_t (*handler)(void *contents, size_t size,
size_t nmemb, void *userdata),
- struct icclient_catalog **catalogptr, const char *prodgroup)
+ struct icclient_catalog **catalogptr)
{
char nonspaced[strlen(prodgroup) + 1];
strcpy(nonspaced, prodgroup);
diff --git a/icclient/client.h b/icclient/client.h
index f81f567..1779aa9 100644
--- a/icclient/client.h
+++ b/icclient/client.h
@@ -20,14 +20,14 @@ extern "C" {
/*!
* \brief For fetching data about products that belong a specific group.
+ * \param prodgroup The name of the product group.
* \param handler A pointer to a cURL write function callback.
* \param catalogptr A pointer to pointer to the catalog to store the data.
- * \param prodgroup The name of the product group.
*/
- void icclient_results(size_t (*handler)(void *contents, size_t size,
+ void icclient_results(const char *prodgroup,
+ size_t (*handler)(void *contents, size_t size,
size_t nmemb, void *userdata),
- struct icclient_catalog **catalogptr,
- const char *prodgroup);
+ struct icclient_catalog **catalogptr);
/*!
* \brief For fetching data about all active products.