## E2kResult

E2kResult — WebDAV Multi-Status results

## Synopsis

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

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

## Description

## Details

### E2kResult

    typedef struct {
    	gchar *href;
    	gint status;
    	E2kProperties *props;
    } E2kResult;

### e2k_results_free ()

    void                e2k_results_free                    (E2kResult *results,
                                                             gint nresults);

Frees the data in `results`.

`results` : | a results array
`nresults` : | the length of `results`

### E2kResultIter

    typedef struct E2kResultIter E2kResultIter;

### 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 ()

    gint                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 ()

    gint                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