14#ifndef STOCKCONTROL_PRODUCT_H
15#define STOCKCONTROL_PRODUCT_H
20#define XSTR(VALUE) STR(VALUE)
21#define STR(VALUE) #VALUE
26#define MAX_NAME_LENGTH 63
int product_report_serialise(const struct Product *const this, FILE *const buffer)
struct Product * product_create(const unsigned int id, const char *const name, const unsigned int quantity)
int product_file_serialise(const struct Product *const this, FILE *const buffer)
void product_delete(struct Product **this)
int product_ptr_compare(const void *const product_lhs, const void *const product_rhs)
bool product_modify_quantity(struct Product *this, const int modifier)
The Product represents a single product with a unique numerical identifier, human-readable name,...
char name[MAX_NAME_LENGTH+1]
NULL-terminated human-readable name of the Product.
unsigned int quantity
Non-negative number of Product items in stock.