CrimsonCare
CrimsonCare is a C project designed to provide a robust solution for blood management.
 
Loading...
Searching...
No Matches
admin_manager.h
Go to the documentation of this file.
1
31#ifndef ADMIN_MANAGER_H
32#define ADMIN_MANAGER_H
33
34#include <stdbool.h>
35#include <stdint.h>
36#include <stdio.h>
37#include <stdlib.h>
38#include <string.h>
39#include <errno.h>
40
46#define MAX_USERNAME_LENGTH 20
47
53#define MAX_PASSWORD_LENGTH 20
54
65
81void saveAdminCredentials(void);
82
101void loadAdminCredentials(void);
102
120bool adminExists(const char* username);
121
140bool validateAdmin(const char* username, const char* password);
141
171bool addAdmin(const char* username, const char* password, const char* currentAdminUsername, const char* currentAdminPassword);
172
197bool deleteAdmin(const char* username, const char* currentAdminUsername, const char* currentAdminPassword);
198
222bool changeAdminPassword(const char* username, const char* oldPassword, const char* newPassword);
223
232void displayAdmin(void);
233
241void freeAdmin(void);
242
243#endif
244
#define MAX_PASSWORD_LENGTH
Maximum password length.
#define MAX_USERNAME_LENGTH
Maximum username length.
Admin structure.
char username[MAX_USERNAME_LENGTH]
struct Admin * next
char password[MAX_PASSWORD_LENGTH]