-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnet.h
More file actions
134 lines (116 loc) · 4.04 KB
/
net.h
File metadata and controls
134 lines (116 loc) · 4.04 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#ifndef _NET_H_RPCGEN
#define _NET_H_RPCGEN
#include <rpc/rpc.h>
#ifdef __cplusplus
extern "C" {
#endif
struct Utilisateur {
char nom[40];
char prenom[40];
char email[50];
char mot_de_passe[50];
};
typedef struct Utilisateur Utilisateur;
struct Abonnement {
int id;
char type[20];
int prix_total;
int nb_slots;
int slots_disponibles;
};
typedef struct Abonnement Abonnement;
struct Slot {
int id;
int id_abonnement;
char nom_utilisateur[40];
float prix_slot;
};
typedef struct Slot Slot;
struct Paiement {
int id;
int id_slot;
char date[10];
float montant;
};
typedef struct Paiement Paiement;
#define SPLIIIT_PROG 0x20000001
#define SPLIIIT_V1 1
#if defined(__STDC__) || defined(__cplusplus)
#define INSCRIPTION 1
extern struct Utilisateur * inscription_1(struct Utilisateur *, CLIENT *);
extern struct Utilisateur * inscription_1_svc(struct Utilisateur *, struct svc_req *);
#define AJOUT_ABONNEMENT 2
extern struct Abonnement * ajout_abonnement_1(struct Abonnement *, CLIENT *);
extern struct Abonnement * ajout_abonnement_1_svc(struct Abonnement *, struct svc_req *);
#define CREATION_SLOT 3
extern struct Slot * creation_slot_1(struct Slot *, CLIENT *);
extern struct Slot * creation_slot_1_svc(struct Slot *, struct svc_req *);
#define RECHERCHE_SLOT 4
extern struct Slot * recherche_slot_1(struct Utilisateur *, CLIENT *);
extern struct Slot * recherche_slot_1_svc(struct Utilisateur *, struct svc_req *);
#define PAIEMENT_SLOT 5
extern struct Paiement * paiement_slot_1(struct Paiement *, CLIENT *);
extern struct Paiement * paiement_slot_1_svc(struct Paiement *, struct svc_req *);
#define SUPPRIMER_COMPTE 6
extern bool_t * supprimer_compte_1(struct Utilisateur *, CLIENT *);
extern bool_t * supprimer_compte_1_svc(struct Utilisateur *, struct svc_req *);
#define MODIFIER_ABONNEMENT 7
extern struct Abonnement * modifier_abonnement_1(struct Abonnement *, CLIENT *);
extern struct Abonnement * modifier_abonnement_1_svc(struct Abonnement *, struct svc_req *);
#define MODIFIER_SLOT 8
extern struct Slot * modifier_slot_1(struct Slot *, CLIENT *);
extern struct Slot * modifier_slot_1_svc(struct Slot *, struct svc_req *);
#define HISTORIQUE_PAIEMENTS 9
extern void * historique_paiements_1(struct Utilisateur *, CLIENT *);
extern void * historique_paiements_1_svc(struct Utilisateur *, struct svc_req *);
extern int spliiit_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
#else /* K&R C */
#define INSCRIPTION 1
extern struct Utilisateur * inscription_1();
extern struct Utilisateur * inscription_1_svc();
#define AJOUT_ABONNEMENT 2
extern struct Abonnement * ajout_abonnement_1();
extern struct Abonnement * ajout_abonnement_1_svc();
#define CREATION_SLOT 3
extern struct Slot * creation_slot_1();
extern struct Slot * creation_slot_1_svc();
#define RECHERCHE_SLOT 4
extern struct Slot * recherche_slot_1();
extern struct Slot * recherche_slot_1_svc();
#define PAIEMENT_SLOT 5
extern struct Paiement * paiement_slot_1();
extern struct Paiement * paiement_slot_1_svc();
#define SUPPRIMER_COMPTE 6
extern bool_t * supprimer_compte_1();
extern bool_t * supprimer_compte_1_svc();
#define MODIFIER_ABONNEMENT 7
extern struct Abonnement * modifier_abonnement_1();
extern struct Abonnement * modifier_abonnement_1_svc();
#define MODIFIER_SLOT 8
extern struct Slot * modifier_slot_1();
extern struct Slot * modifier_slot_1_svc();
#define HISTORIQUE_PAIEMENTS 9
extern void * historique_paiements_1();
extern void * historique_paiements_1_svc();
extern int spliiit_prog_1_freeresult ();
#endif /* K&R C */
/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
extern bool_t xdr_Utilisateur (XDR *, Utilisateur*);
extern bool_t xdr_Abonnement (XDR *, Abonnement*);
extern bool_t xdr_Slot (XDR *, Slot*);
extern bool_t xdr_Paiement (XDR *, Paiement*);
#else /* K&R C */
extern bool_t xdr_Utilisateur ();
extern bool_t xdr_Abonnement ();
extern bool_t xdr_Slot ();
extern bool_t xdr_Paiement ();
#endif /* K&R C */
#ifdef __cplusplus
}
#endif
#endif /* !_NET_H_RPCGEN */