From 67a7728f02701c1f0b8f9f7a71554ff222e46de6 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, 13 Jul 2021 19:53:38 +0800 Subject: Sicepat handler So far only to retrieve services tariffs information. --- pikul.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pikul.c') diff --git a/pikul.c b/pikul.c index 1ccf717..d0ef912 100644 --- a/pikul.c +++ b/pikul.c @@ -13,6 +13,10 @@ extern void anteraja_init(char *[], struct shipping *); extern void anteraja_services(const char *, const char *, double, struct shipping *, char **, char **); extern size_t anteraja_services_handle(const char *, size_t, size_t, struct pikul_services **); +extern void sicepat_init(char *[], struct shipping *); +extern void sicepat_services(const char *, const char *, double, struct shipping *, char **); +extern size_t sicepat_services_handle(const char *, size_t, size_t, struct pikul_services **); + void pikul_init(enum pikul_company company, char *provisions[]) { curl_global_init(CURL_GLOBAL_SSL); @@ -25,6 +29,9 @@ void pikul_init(enum pikul_company company, char *provisions[]) case PIKUL_ANTERAJA: anteraja_init(provisions, &shipping); break; + case PIKUL_SICEPAT: + sicepat_init(provisions, &shipping); + break; default: break; } @@ -54,6 +61,10 @@ struct pikul_services *pikul_services(const char *origin, const char *destinatio anteraja_services(origin, destination, weight, &shipping, &url, &post); handler = anteraja_services_handle; break; + case PIKUL_SICEPAT: + sicepat_services(origin, destination, weight, &shipping, &url); + handler = sicepat_services_handle; + break; default: break; } -- cgit v1.2.3