-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabaseFunctions.h
More file actions
35 lines (30 loc) · 1.13 KB
/
Copy pathdatabaseFunctions.h
File metadata and controls
35 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef DATAFUNC_H
#define DATAFUNC_H
#include "database.h"
//Global definition of structures that make up the database shared among all clients
extern BillingTable * tableOfBillings;
extern CustomerTable * tableOfCustomers;
extern OrderTable * tableOfOrders;
extern ProductTable * tableOfProducts;
extern SellerTable * tableOfSellers;
extern Seller sellerInfo;
extern Customer customerInfo;
//function stubs from databaseFunction.c
void startupStructures();
void saveStructuresToFiles();
int checkSellerExists(char name[]);
int checkCustomerExists(char name[]);
void newOrder(int productID, int quantity);
void returnOrder(int orderID);
void addProduct(int soc_conn);
void removeProduct(int productID);
void updateProductQuantity(int productID, int quantity);
void updateProductPrice(int productID, int newPrice);
void updateSellerInformation(int soc_conn);
void updateCustomerInformation(int soc_conn);
void viewOrdersAsCustomer(char CustomerAddress[], int soc_conn);
void viewBillingInfo(int customerID, int soc_conn);
void viewProductsAvailable();
void viewProductsForSeller(int soc_conn);
void viewOrdersForProducts(int productID, int soc_conn);
#endif