Man Linux: Main Page and Category List

NAME

       dpm_getreqsummary - get summary for a set of requests

SYNOPSIS

       #include <sys/types.h>
       #include "dpm_api.h"

       int  dpm_getreqsummary  (int nbtokens, char **r_tokens, int *nbreplies,
       struct dpm_reqsummary **summaries)

DESCRIPTION

       dpm_getreqsummary gets summary for a set of requests.

       The input arguments are:

       nbtokens
              specifies the number of tokens in the request.

       r_tokens
              specifies an array of tokens returned by  previous  get/put/copy
              requests.

       The output arguments are:

       nbreplies
              will  be  set  to  the number of replies in the array of request
              summaries.

       summaries
              will be set  to  the  address  of  an  array  of  dpm_reqsummary
              structures  allocated  by  the  API.  The  client application is
              responsible for freeing the array when not needed anymore.

       struct dpm_reqsummary {
            char      r_token[CA_MAXDPMTOKENLEN+1];
            char      r_type;
            int       nb_reqfiles;
            int       nb_queued;
            int       nb_finished;
            int       nb_progress;
       };

RETURN VALUE

       This routine returns 0 if the operation was successful  or  -1  if  the
       operation failed. In the latter case, serrno is set appropriately.

ERRORS

       EFAULT       r_tokens , nbreplies or summaries is a NULL pointer.

       ENOMEM       Memory could not be allocated for storing the reply.

       EINVAL       nbtokens  is not strictly positive or the specified tokens
                    are invalid/unknown.

       SENOSHOST    Host unknown.

       SEINTERNAL   Database error.

       SECOMERR     Communication error.