This repository has been archived by the owner on Jan 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
API Overview
hojo edited this page Sep 28, 2012
·
1 revision
The Droplet library includes common operations and three separate API layers for different application protocols.
General Droplet library operations include:
- Common context operations
- Basic pricing operations
- dpl_init() Initializes the Droplet library.
- dpl_free() Releases the library.
- dpl_ctx_new() Initializes a new context.
- dpl_ctx_free() Releases a context.
- dpl_status_str() Retuns an error or success message.
- droplet_dir The droplet directory.
- profile_name The droplet profile name.
- ctx The droplet context.
dpl_status_t
dpl_init(void);
void
dpl_free(void);
dpl_ctx_t
*dpl_ctx_new(const char *droplet_dir, const char *profile_name);
void
dpl_ctx_free(dpl_ctx_t *ctx);
- dpl_price_storage() Returns the price for a specified amount of storage based on rates defined in the pricing file.
- dpl_price_storage_str() Returns the price for a specified amount of storage as a string for easier display purposes.
- size Amount of storage in bytes.
double
dpl_price_storage(dpl_ctx_t *ctx,
size_t size);
char
*dpl_price_storage_str(dpl_ctx_t *ctx,
size_t size);
The Droplet library API is split into 3 layers: