From 65a334cf2fe2d7d524c129f0df765463a91f542c 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: Sun, 27 Jun 2021 23:41:31 +0800 Subject: Shipping API client framework with 1 module so far. --- pikul.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pikul.h (limited to 'pikul.h') diff --git a/pikul.h b/pikul.h new file mode 100644 index 0000000..8046d09 --- /dev/null +++ b/pikul.h @@ -0,0 +1,35 @@ +#ifndef PIKUL_H +#define PIKUL_H + +enum pikul_company { + PIKUL_COMPANY_ANTERAJA = 0, + PIKUL_COMPANY_SICEPAT +}; + +struct pikul_service { + char *code; + char *name; + char *etd; + 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); +double pikul_cost(const char *origin, const char *destination, double weight, const char *service); +void pikul_cleanup(); + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.2.3