-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.h
54 lines (44 loc) · 964 Bytes
/
utils.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef UTILS
#define UTILS
#define RED "\x1B[31m"
#define GRN "\x1B[32m"
#define YEL "\x1B[33m"
#define BLU "\x1B[34m"
#define MAG "\x1B[35m"
#define CYN "\x1B[36m"
#define WHT "\x1B[37m"
#define RESET "\x1B[0m"
#define NB_FILTERS_MAX 10
#define NB_BACKENDS_MAX 10
#define NB_IMPRIMANTES_MAX 10
#define CHEMIN_CONFIGURATION "configuration"
typedef struct{
char nomImprimante[50];
int typeImprimante;
} Imprimante;
typedef struct {
char nomServeur[50];
int numServeur;
} Serveur;
typedef enum {
IMPRESSION, ETAT_IMPRESSION, ANNULATION_IMPRESSION, ETAT_IMPRIMANTE
} TypeRequete;
typedef enum {
ATTENTE, EN_COURS, TERMINEE
} EtatImpression;
typedef enum {
IMPRESSIONS_EN_COURS, VIDE, PLEINE
} EtatImprimante;
typedef struct {
pid_t emetteur;
int idRequete;
TypeRequete type;
char* fichier;
char* typeFichier;
long tailleFichier;
char nomImprimante[50];
char* nomFichier;
int nbCopies;
int rectoVerso;
} Requete;
#endif