## E2kContext (private) E2kContext (private) — private E2kContext methods |

## Synopsis

    SoupMessage *       e2k_soup_message_new                (E2kContext *ctx,
                                                             const gchar *uri,
                                                             const gchar *method);
    SoupMessage *       e2k_soup_message_new_full           (E2kContext *ctx,
                                                             const gchar *uri,
                                                             const gchar *method,
                                                             const gchar *content_type,
                                                             SoupMemoryUse use,
                                                             const gchar *body,
                                                             gsize length);
    void                e2k_context_queue_message           (E2kContext *ctx,
                                                             SoupMessage *msg,
                                                             SoupSessionCallback callback,
                                                             gpointer user_data);
    E2kHTTPStatus       e2k_context_send_message            (E2kContext *ctx,
                                                             E2kOperation *op,
                                                             SoupMessage *msg);

    gboolean            e2k_context_fba                     (E2kContext *ctx,
                                                             SoupMessage *failed_msg);
    time_t              e2k_context_get_last_timestamp      (E2kContext *ctx);

## Description

These are the important libexchange-internal E2kContext methods. (In fact, `e2k_soup_message_new()` and `e2k_context_send_message()` are currently also used by mail-stub-exchange.c.)

## Details

### e2k_soup_message_new ()

    SoupMessage *       e2k_soup_message_new                (E2kContext *ctx,
                                                             const gchar *uri,
                                                             const gchar *method);

Creates a new `SoupMessage` for `ctx`.

`ctx` : | the context
`uri` : | the URI
`method` : | the HTTP method
Returns : | a new `SoupMessage`, set up for connector use

### e2k_soup_message_new_full ()

    SoupMessage *       e2k_soup_message_new_full           (E2kContext *ctx,
                                                             const gchar *uri,
                                                             const gchar *method,
                                                             const gchar *content_type,
                                                             SoupMemoryUse use,
                                                             const gchar *body,
                                                             gsize length);

Creates a new `SoupMessage` with the given body.

`ctx` : | the context
`uri` : | the URI
`method` : | the HTTP method
`content_type` : | MIME Content-Type of `body`
`use` : | use policy of `body`
`body` : | request body
`length` : | length of `body`
Returns : | a new `SoupMessage` with a request body, set up for connector use

### e2k_context_queue_message ()

    void                e2k_context_queue_message           (E2kContext *ctx,
                                                             SoupMessage *msg,
                                                             SoupSessionCallback callback,
                                                             gpointer user_data);

Asynchronously queues `msg` in `ctx`'s session.

`ctx` : | the context
`msg` : | the message to queue
`callback` : | callback to invoke when `msg` is done
`user_data` : | data for `callback`

### e2k_context_send_message ()

    E2kHTTPStatus       e2k_context_send_message            (E2kContext *ctx,
                                                             E2kOperation *op,
                                                             SoupMessage *msg);

Synchronously sends `msg` in `ctx`'s session.

`ctx` : | the context
`op` : | an E2kOperation to use for cancellation
`msg` : | the message to send
Returns : | the HTTP status of the message

### e2k_context_fba ()

    gboolean            e2k_context_fba                     (E2kContext *ctx,
                                                             SoupMessage *failed_msg);

Attempts to synchronously perform Exchange 2003 forms-based authentication.

`ctx` : | the context
`failed_msg` : | a message that received a 440 status code
Returns : | `FALSE` if authentication failed, `TRUE` if it succeeded, in which case `failed_msg` can be requeued.

### e2k_context_get_last_timestamp ()

    time_t              e2k_context_get_last_timestamp      (E2kContext *ctx);

Returns a `time_t` corresponding to the last "Date" header received from the server.

`ctx` : | the context
Returns : | the timestamp

## See Also

E2kContext