E2kResult

E2kResult — WebDAV Multi-Status results

Synopsis




            E2kResult;
void        e2k_results_free                (E2kResult *results,
                                             int nresults);

E2kResult*  e2k_result_iter_next            (E2kResultIter *iter);
int         e2k_result_iter_get_total       (E2kResultIter *iter);
int         e2k_result_iter_get_index       (E2kResultIter *iter);
E2kHTTPStatus e2k_result_iter_free          (E2kResultIter *iter);

Description

Details

E2kResult

typedef struct {
	char *href;
	int status;
	E2kProperties *props;
} E2kResult;

This contains the information from a single <response> element of a WebDAV 207 Multi-Status response.

char *href;the URI that this is the result for
int status;the HTTP status
E2kProperties *props;the properties returned for href

e2k_results_free ()

void        e2k_results_free                (E2kResult *results,
                                             int nresults);

Frees the data in results.

results : a results array
nresults : the length of results

e2k_result_iter_next ()

E2kResult*  e2k_result_iter_next            (E2kResultIter *iter);

Returns the next result in the operation being iterated by iter. If there are no more results, or if an error occurs, it will return NULL. (The return value of e2k_result_iter_free() distinguishes these two cases.)

iter : an E2kResultIter
Returns : the result, or NULL

e2k_result_iter_get_total ()

int         e2k_result_iter_get_total       (E2kResultIter *iter);

Returns the total number of results expected for iter. Note that in some cases, this may change while the results are being iterated (if objects that match the query are added to or removed from the folder).

iter : an E2kResultIter
Returns : the total number of results expected

e2k_result_iter_get_index ()

int         e2k_result_iter_get_index       (E2kResultIter *iter);

Returns the index of the current result in the complete list of results. Note that for a descending search, index will start at total - 1 and count backwards to 0.

iter : an E2kResultIter
Returns : the index of the current result

e2k_result_iter_free ()

E2kHTTPStatus e2k_result_iter_free          (E2kResultIter *iter);

Frees iter and all associated memory, and returns a status code indicating whether it ended successfully or not. (Note that the status may be E2K_HTTP_OK rather than E2K_HTTP_MULTI_STATUS.)

iter : an E2kResultIter
Returns : the final status