1DPM_GETSTATUS_GETREQ(3) DPM Library Functions DPM_GETSTATUS_GETREQ(3)
2
3
4
6 dpm_getstatus_getreq - get status for a dpm_get request
7
9 #include <sys/types.h>
10 #include "dpm_api.h"
11
12 int dpm_getstatus_getreq (char *r_token, int nbfromsurls, char **from‐
13 surls, int *nbreplies, struct dpm_getfilestatus **filestatuses)
14
16 dpm_getstatus_getreq gets status for a dpm_get request.
17
18 The input arguments are:
19
20 r_token
21 specifies the token returned by a previous get request.
22
23 nbfromsurls
24 specifies the number of files for which the status is requested.
25 If zero, the status of all files in the get request is returned.
26
27 fromsurls
28 specifies the array of file names.
29
30 The output arguments are:
31
32 nbreplies
33 will be set to the number of replies in the array of file sta‐
34 tuses.
35
36 filestatuses
37 will be set to the address of an array of dpm_getfilestatus
38 structures allocated by the API. The client application is
39 responsible for freeing the array when not needed anymore.
40
41 struct dpm_getfilestatus {
42 char *from_surl;
43 char *turl;
44 u_signed64 filesize;
45 int status;
46 char *errstring;
47 time_t pintime;
48 };
49
51 This routine returns 0 if the operation was successful or -1 if the
52 operation failed. In the latter case, serrno is set appropriately.
53
55 EFAULT nbfromsurls is strictly positive and fromsurls is NULL or
56 r_token, nbreplies or filestatuses is a NULL pointer.
57
58 ENOMEM Memory could not be allocated for marshalling the request.
59
60 EINVAL nbfromsurls is not positive, the token is invalid/unknown
61 or all file requests have errors.
62
63 SENOSHOST Host unknown.
64
65 SEINTERNAL Database error.
66
67 SECOMERR Communication error.
68
69
70
71LCG $Date: 2006/03/23 06:12:41 $ DPM_GETSTATUS_GETREQ(3)