summaryrefslogtreecommitdiff
path: root/pikul.h
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-24 14:09:07 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-24 14:09:07 +0800
commit43bccf79db07e0480b99842615e77183cf2949eb (patch)
treea1e5cedfbb2f6c48438f358b74163a40e38af4c5 /pikul.h
parentacd4ab68d1f9521983390bfff88dce3980633038 (diff)
parentb960919d909c75dc9c483846c2acec5315a0b7db (diff)
Merge branch 'master' into sicepat
Diffstat (limited to 'pikul.h')
-rw-r--r--pikul.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/pikul.h b/pikul.h
index aa54cca..26cfc4c 100644
--- a/pikul.h
+++ b/pikul.h
@@ -2,8 +2,10 @@
#define PIKUL_H
enum pikul_company {
+ PIKUL,
PIKUL_ANTERAJA,
- PIKUL_SICEPAT
+ PIKUL_SICEPAT,
+ PIKUL_END
};
struct pikul_service {
@@ -13,23 +15,24 @@ 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);
-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,
+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(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(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();