From 1264915af1cd1f47a34873360c4e88ae73a1bd33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 20 Jul 2021 00:11:56 +0800 Subject: Function to get list of just the service codes --- pikul.h | 1 + 1 file changed, 1 insertion(+) (limited to 'pikul.h') diff --git a/pikul.h b/pikul.h index fde0483..07c6880 100644 --- a/pikul.h +++ b/pikul.h @@ -24,6 +24,7 @@ extern "C" { void pikul_init(enum pikul_company company, char *provisions[]); struct pikul_services *pikul_services(const char *origin, const char *destination, double weight); void pikul_free_services(struct pikul_services *services); +char **pikul_codes(const char *origin, const char *destination, double weight); double pikul_cost(const char *origin, const char *destination, double weight, const char *service); char *pikul_order(const char *order_number, const char *service, const char *sender_name, const char *sender_phone, const char *origin, const char *sender_address, -- cgit v1.2.3 From d7a0867335f3aef16baad0fe138f1d09ef29d928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 20 Jul 2021 22:33:29 +0800 Subject: Function for listing services ready in HTML --- pikul.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pikul.h') diff --git a/pikul.h b/pikul.h index 07c6880..7d46197 100644 --- a/pikul.h +++ b/pikul.h @@ -24,6 +24,9 @@ extern "C" { void pikul_init(enum pikul_company company, char *provisions[]); struct pikul_services *pikul_services(const char *origin, const char *destination, double weight); void pikul_free_services(struct pikul_services *services); +char *pikul_html(const char *origin, const char *destination, double weight, + const char *widget, const char *extra, const char *name, const char *value, + char *code_prefixes[], char *name_prefixes[]); char **pikul_codes(const char *origin, const char *destination, double weight); double pikul_cost(const char *origin, const char *destination, double weight, const char *service); char *pikul_order(const char *order_number, const char *service, const char *sender_name, -- cgit v1.2.3 From f686ef14951df5f4c2a82bc6075bfd520e05c3de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Thu, 22 Jul 2021 17:04:07 +0800 Subject: pikul_codes shouldn't be needed --- pikul.h | 1 - 1 file changed, 1 deletion(-) (limited to 'pikul.h') diff --git a/pikul.h b/pikul.h index 7d46197..3581695 100644 --- a/pikul.h +++ b/pikul.h @@ -27,7 +27,6 @@ void pikul_free_services(struct pikul_services *services); char *pikul_html(const char *origin, const char *destination, double weight, const char *widget, const char *extra, const char *name, const char *value, char *code_prefixes[], char *name_prefixes[]); -char **pikul_codes(const char *origin, const char *destination, double weight); double pikul_cost(const char *origin, const char *destination, double weight, const char *service); char *pikul_order(const char *order_number, const char *service, const char *sender_name, const char *sender_phone, const char *origin, const char *sender_address, -- cgit v1.2.3 From 2ccf1c19b5182bd99b7d717008204737d9cfccd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Thu, 22 Jul 2021 18:49:43 +0800 Subject: No special services struct --- pikul.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'pikul.h') diff --git a/pikul.h b/pikul.h index 3581695..696b055 100644 --- a/pikul.h +++ b/pikul.h @@ -12,18 +12,13 @@ struct pikul_service { double cost; }; -struct pikul_services { - size_t length; - struct pikul_service *list[]; -}; - #ifdef __cplusplus extern "C" { #endif void pikul_init(enum pikul_company company, char *provisions[]); -struct pikul_services *pikul_services(const char *origin, const char *destination, double weight); -void pikul_free_services(struct pikul_services *services); +struct pikul_service **pikul_services(const char *origin, const char *destination, double weight); +void pikul_free_services(struct pikul_service **services); char *pikul_html(const char *origin, const char *destination, double weight, const char *widget, const char *extra, const char *name, const char *value, char *code_prefixes[], char *name_prefixes[]); -- cgit v1.2.3 From 218418f3623da5f07cf8428d1d8687b9d5fbc4ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sat, 24 Jul 2021 12:26:02 +0800 Subject: Each shipping info is retained in its own slot Slot/enum 0 is reserved for Pikul. libcurl WRITEFUNCTION callback userData parameter is now used for the shipping instance, but may also be used for something else in turns. --- pikul.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'pikul.h') diff --git a/pikul.h b/pikul.h index 696b055..8e41762 100644 --- a/pikul.h +++ b/pikul.h @@ -2,7 +2,9 @@ #define PIKUL_H enum pikul_company { - PIKUL_ANTERAJA + PIKUL, + PIKUL_ANTERAJA, + PIKUL_END }; struct pikul_service { @@ -17,16 +19,19 @@ extern "C" { #endif void pikul_init(enum pikul_company company, char *provisions[]); -struct pikul_service **pikul_services(const char *origin, const char *destination, double weight); +struct pikul_service **pikul_services(enum pikul_company company, + const char *origin, const char *destination, double weight); void pikul_free_services(struct pikul_service **services); -char *pikul_html(const char *origin, const char *destination, double weight, +char *pikul_html(char *origins[], char *destinations[], double weight, const char *widget, const char *extra, const char *name, const char *value, char *code_prefixes[], char *name_prefixes[]); -double pikul_cost(const char *origin, const char *destination, double weight, const char *service); -char *pikul_order(const char *order_number, const char *service, const char *sender_name, - const char *sender_phone, const char *origin, const char *sender_address, - const char *sender_postal, const char *receiver_name, const char *receiver_phone, - const char *destination, const char *receiver_address, const char *receiver_postal, +double pikul_cost(enum pikul_company company, const char *service, + const char *origin, const char *destination, double weight); +char *pikul_order(enum pikul_company company, const char *order_number, const char *service, + const char *sender_name, const char *sender_phone, const char *origin, + const char *sender_address, const char *sender_postal, + const char *receiver_name, const char *receiver_phone, const char *destination, + const char *receiver_address, const char *receiver_postal, int nitems, char **items[], double subtotal); void pikul_cleanup(); -- cgit v1.2.3