ne_session.h | ne_session.h | |||
---|---|---|---|---|
skipping to change at line 107 | skipping to change at line 107 | |||
* NOTE: Use of this interface is mutually exclusive with the use of | * NOTE: Use of this interface is mutually exclusive with the use of | |||
* ne_set_notifier(). A call to ne_set_progress() removes the | * ne_set_notifier(). A call to ne_set_progress() removes the | |||
* notifier callback, and vice versa. */ | * notifier callback, and vice versa. */ | |||
void ne_set_progress(ne_session *sess, ne_progress progress, void *userdata ); | void ne_set_progress(ne_session *sess, ne_progress progress, void *userdata ); | |||
/* Store an opaque context for the session, 'priv' is returned by a | /* Store an opaque context for the session, 'priv' is returned by a | |||
* call to ne_session_get_private with the same ID. */ | * call to ne_session_get_private with the same ID. */ | |||
void ne_set_session_private(ne_session *sess, const char *id, void *priv); | void ne_set_session_private(ne_session *sess, const char *id, void *priv); | |||
void *ne_get_session_private(ne_session *sess, const char *id); | void *ne_get_session_private(ne_session *sess, const char *id); | |||
/* Status event type. */ | /* Status event type. NOTE: More event types may be added in | |||
* subsequent releases, so callers must ignore unknown status types | ||||
* for forwards-compatibility. */ | ||||
typedef enum { | typedef enum { | |||
ne_status_lookup = 0, /* looking up hostname */ | ne_status_lookup = 0, /* looking up hostname */ | |||
ne_status_connecting, /* connecting to host */ | ne_status_connecting, /* connecting to host */ | |||
ne_status_connected, /* connected to host */ | ne_status_connected, /* connected to host */ | |||
ne_status_sending, /* sending a request body */ | ne_status_sending, /* sending a request body */ | |||
ne_status_recving, /* receiving a response body */ | ne_status_recving, /* receiving a response body */ | |||
ne_status_disconnected /* disconnected from host */ | ne_status_disconnected /* disconnected from host */ | |||
} ne_session_status; | } ne_session_status; | |||
/* Status event information union; the relevant structure within | /* Status event information union; the relevant structure within | |||
skipping to change at line 138 | skipping to change at line 140 | |||
* attempt is being made: */ | * attempt is being made: */ | |||
const char *hostname; | const char *hostname; | |||
const ne_inet_addr *address; | const ne_inet_addr *address; | |||
} ci; | } ci; | |||
struct /* ne_status_connected, ne_status_disconnected */ { | struct /* ne_status_connected, ne_status_disconnected */ { | |||
/* The hostname to which a connection has just been | /* The hostname to which a connection has just been | |||
* established or closed: */ | * established or closed: */ | |||
const char *hostname; | const char *hostname; | |||
} cd; | } cd; | |||
struct /* ne_status_sending and ne_status_recving */ { | struct /* ne_status_sending and ne_status_recving */ { | |||
/* Request/response body transfer progress; if total == 0, the | /* Request/response body transfer progress; if total == -1, the | |||
* total size is unknown; else 0 <= progress <= total: */ | * total size is unknown; else 0 <= progress <= total: */ | |||
ne_off_t progress, total; | ne_off_t progress, total; | |||
} sr; | } sr; | |||
} ne_session_status_info; | } ne_session_status_info; | |||
/* Callback invoked to notify a new session status event, given by the | /* Callback invoked to notify a new session status event, given by the | |||
* 'status' argument. On invocation, the contents of exactly one of | * 'status' argument. On invocation, the contents of exactly one of | |||
* the structures in the info union will be valid, as indicated | * the structures in the info union will be valid, as indicated | |||
* above. */ | * above. */ | |||
typedef void (*ne_notify_status)(void *userdata, ne_session_status status, | typedef void (*ne_notify_status)(void *userdata, ne_session_status status, | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 4 lines changed or added | |||