summaryrefslogtreecommitdiff
path: root/pikul.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-13 19:53:38 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-13 19:53:38 +0800
commit67a7728f02701c1f0b8f9f7a71554ff222e46de6 (patch)
tree953c2e14456752c438eba7c99a0df8eb6cdc154a /pikul.c
parent55aa9be96a1561e07f36da03e28eb6d1dd051274 (diff)
Sicepat handler
So far only to retrieve services tariffs information.
Diffstat (limited to 'pikul.c')
-rw-r--r--pikul.c11
1 files changed, 11 insertions, 0 deletions
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;
}