-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnet_clnt.c
More file actions
145 lines (125 loc) · 3.39 KB
/
net_clnt.c
File metadata and controls
145 lines (125 loc) · 3.39 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
135
136
137
138
139
140
141
142
143
144
145
/*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#include <memory.h> /* for memset */
#include "net.h"
/* Default timeout can be changed using clnt_control() */
static struct timeval TIMEOUT = { 25, 0 };
struct Utilisateur *
inscription_1(struct Utilisateur *argp, CLIENT *clnt)
{
static struct Utilisateur clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, INSCRIPTION,
(xdrproc_t) xdr_Utilisateur, (caddr_t) argp,
(xdrproc_t) xdr_Utilisateur, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
struct Abonnement *
ajout_abonnement_1(struct Abonnement *argp, CLIENT *clnt)
{
static struct Abonnement clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, AJOUT_ABONNEMENT,
(xdrproc_t) xdr_Abonnement, (caddr_t) argp,
(xdrproc_t) xdr_Abonnement, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
struct Slot *
creation_slot_1(struct Slot *argp, CLIENT *clnt)
{
static struct Slot clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, CREATION_SLOT,
(xdrproc_t) xdr_Slot, (caddr_t) argp,
(xdrproc_t) xdr_Slot, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
struct Slot *
recherche_slot_1(struct Utilisateur *argp, CLIENT *clnt)
{
static struct Slot clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, RECHERCHE_SLOT,
(xdrproc_t) xdr_Utilisateur, (caddr_t) argp,
(xdrproc_t) xdr_Slot, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
struct Paiement *
paiement_slot_1(struct Paiement *argp, CLIENT *clnt)
{
static struct Paiement clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, PAIEMENT_SLOT,
(xdrproc_t) xdr_Paiement, (caddr_t) argp,
(xdrproc_t) xdr_Paiement, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
bool_t *
supprimer_compte_1(struct Utilisateur *argp, CLIENT *clnt)
{
static bool_t clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, SUPPRIMER_COMPTE,
(xdrproc_t) xdr_Utilisateur, (caddr_t) argp,
(xdrproc_t) xdr_bool, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
struct Abonnement *
modifier_abonnement_1(struct Abonnement *argp, CLIENT *clnt)
{
static struct Abonnement clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, MODIFIER_ABONNEMENT,
(xdrproc_t) xdr_Abonnement, (caddr_t) argp,
(xdrproc_t) xdr_Abonnement, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
struct Slot *
modifier_slot_1(struct Slot *argp, CLIENT *clnt)
{
static struct Slot clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, MODIFIER_SLOT,
(xdrproc_t) xdr_Slot, (caddr_t) argp,
(xdrproc_t) xdr_Slot, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&clnt_res);
}
void *
historique_paiements_1(struct Utilisateur *argp, CLIENT *clnt)
{
static char clnt_res;
memset((char *)&clnt_res, 0, sizeof(clnt_res));
if (clnt_call (clnt, HISTORIQUE_PAIEMENTS,
(xdrproc_t) xdr_Utilisateur, (caddr_t) argp,
(xdrproc_t) xdr_void, (caddr_t) &clnt_res,
TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return ((void *)&clnt_res);
}