/** * @file main.h * @brief Header possédant les inclusions de module, déclarations de constante & prototypes de fonction. */ #include #include #include // Fonction sleep // Constantes #define tmaxArticles 500 #define tmaxClients 750 //! GESTION DES ERREURS & CODES void errorHandling(int error); void debugHandling(int code); //! DEBUG void debugMenu(int tabReference[], float tabWeight[], float tabVolume[], float unitPrice[], int clientID[], float cagnotte[], int suspended[], int isAdmin[], int tlogArticle, int tlogClient); //! TRAITEMENT DES FICHIERS void chargeDonnees(int *tLogArticle, int *tLogClient,int reference[], float weight[], float volume[], float unitPrice[], int clientID[], int clientPassword[], float cagnotte[], int suspended[], int isAdmin[]); int chargeArticles(int reference[], float weight[], float volume[], float unitPrice[]); int chargeClients(int clientID[], int clientPassword[], float cagnotte[], int suspended[], int isAdmin[]); void sauvegardeDonnees(int tLogArticle, int tLogClient, int reference[], float weight[], float volume[], float unitPrice[], int clientID[], int clientPassword[], float cagnotte[], int isAdmin[], int suspended[]); void sauvegardeArticles(int reference[], float weight[], float volume[], float unitPrice[], int tLogArticle); void sauvegardeClients(int clientID[], int clientPassword[], float cagnotte[], int suspended[], int isAdmin[], int tLogClient); //! GESTION CLIENTS int inputClient(int clientID[], float cagnotte[], int suspended[], int isAdmin[], int *tlog); void modifyClient(int clientID[], float cagnotte[], int suspended[], int isAdmin[], int tlog); void deleteClient(int clientID[], float cagnotte[], int suspended[], int isAdmin[], int *tlog); //! GESTION STOCKS void inputItem(int tabReference[], float tabWeight[], float tabVolume[], float unitPrice[], int *tlog); void deleteItem(int tabReference[], float tabWeight[], float tabVolume[], float unitPrice[], int *tlog); //! AFFICHAGE DES DONNEES void displayItem(int tabReference[], float weight[], float volume[], float unitPrice[], int tlog); void displayItemList(int reference[], float weight[], float volume[], float unitPrice[], int log); void displayClient(int clientID[], float cagnotte[], int suspended[], int isAdmin[], int tlog); void displayClientList(int clientID[], float cagnotte[], int suspended[], int isAdmin[], int tlog); //! RECHERCHE int searchTab(int targetTab[], int valSearched, int tLog, int *found); //! PANIER void clientConstraint(float *weight, float *volume, float *price); int constraintExceeded(float weightConstraint, float volumeConstraint, float *priceConstraint, float *cagnotte, float tabWeight[], float tabVolume[], float tabPrice[], int tabItemRef[], int tabBasketRef[], int tabBasketQuantity[], int tlogItem, int tlogBasket); int basket_add (int tab_reference[], float weight[], float volume[], float unitPrice[], float *cagnotte, int basket_tab_ref[], int basket_tab_qte[],int tlog, int tlog_basket); void display_basket(int basket_tab_ref[], int basket_qte[], float weight[], float volume[], float unitPrice[], float *cagnotte, int tlog, int tlog_basket); int reinit_basket(int tlog_basket); int basket_del_article( int basket_tab_ref[], int basket_tab_qte[], int tlog_basket); //! LOGIN int login(int clientID[], int clientPassword[], int isAdmin[], int tlog); int signup(int clientID[], int clientPassword[], float cagnotte[], int suspended[], int isAdmin[], int *tlog); //! MOT DE PASSE int encrypt(int password); int decrypt(int password);