e2k-result

e2k-result — WebDAV Multi-Status results

Synopsis




struct      E2kResult;
void        e2k_results_from_multistatus    (SoupMessage *msg,
                                             E2kResult **results,
                                             int *nresults);
E2kResult*  e2k_results_copy                (E2kResult *results,
                                             int nresults);
void        e2k_results_free                (E2kResult *results,
                                             int nresults);

GArray*     e2k_results_array_new           (void);
void        e2k_results_array_add_from_multistatus
                                            (GArray *results_array,
                                             SoupMessage *msg);
void        e2k_results_array_free          (GArray *results_array,
                                             gboolean free_results);

Description

Details

struct E2kResult

struct E2kResult {

	char *href;
	int status;
	E2kProperties *props;
};

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

It should not be necessary to call any of these functions from anywhere except e2k-context.c.


e2k_results_from_multistatus ()

void        e2k_results_from_multistatus    (SoupMessage *msg,
                                             E2kResult **results,
                                             int *nresults);

Parses msg and puts the results in *results and *nresults. The caller should free the data with e2k_results_free()

msg : a 207 Multi-Status response
results : pointer to a variable to store an array of E2kResult in
nresults : pointer to a variable to store the length of *results in

e2k_results_copy ()

E2kResult*  e2k_results_copy                (E2kResult *results,
                                             int nresults);

Performs a deep copy of results

results : a results array returned from e2k_results_from_multistatus()
nresults : the length of results
Returns : a copy of results.

e2k_results_free ()

void        e2k_results_free                (E2kResult *results,
                                             int nresults);

Frees the data in results.

results : a results array returned from e2k_results_from_multistatus()
nresults : the length of results

e2k_results_array_new ()

GArray*     e2k_results_array_new           (void);

Creates a new results array

Returns : the array

e2k_results_array_add_from_multistatus ()

void        e2k_results_array_add_from_multistatus
                                            (GArray *results_array,
                                             SoupMessage *msg);

Constructs an E2kResult for each response in msg and appends them to results_array.

results_array : a results array, created by e2k_results_array_new()
msg : a 207 Multi-Status response

e2k_results_array_free ()

void        e2k_results_array_free          (GArray *results_array,
                                             gboolean free_results);

Frees results_array, and optionally its contents

results_array : the array
free_results : whether or not to also free the contents of the array