Tizen Native API
5.5
|
The HTTP Session API provides functions for managing HTTP session.
#include <http.h>
The HTTP Session API provides functions for managing HTTP session. Using the HTTP Session, you can implement features that allow the users of your application to:
Functions | |
int | http_session_create (http_session_mode_e mode, http_session_h *http_session) |
Creates the HTTP session handle. | |
int | http_session_destroy (http_session_h http_session) |
Destroys the HTTP session handle. | |
int | http_session_open_transaction (http_session_h http_session, http_method_e method, http_transaction_h *http_transaction) |
Opens HTTP transaction from the HTTP Session. | |
int | http_session_set_auto_redirection (http_session_h http_session, bool auto_redirection) |
Sets the value to redirect the HTTP request automatically. | |
int | http_session_get_auto_redirection (http_session_h http_session, bool *auto_redirect) |
Gets the auto redirection for the HTTP request. | |
int | http_session_get_active_transaction_count (http_session_h http_session, int *active_transaction_count) |
Gets the number of active transactions in the current session. | |
int | http_session_get_max_transaction_count (http_session_h http_session, int *transaction_count) |
Gets the maximum number of transactions for the current session. | |
int | http_session_destroy_all_transactions (http_session_h http_session) |
Destroys all transactions. |
enum http_session_mode_e |
int http_session_create | ( | http_session_mode_e | mode, |
http_session_h * | http_session | ||
) |
Creates the HTTP session handle.
[in] | mode | The HTTP session mode |
[out] | http_session | The HTTP session handle |
0
on success, otherwise negative error value HTTP_ERROR_NONE | Successful |
HTTP_ERROR_INVALID_PARAMETER | Invalid parameter |
HTTP_ERROR_INVALID_OPERATION | Invalid operation |
HTTP_ERROR_OUT_OF_MEMORY | Out of memory |
HTTP_ERROR_NOT_SUPPORTED | Not Supported |
int http_session_destroy | ( | http_session_h | http_session | ) |
Destroys the HTTP session handle.
[in] | http_session | The HTTP session handle |
0
on success, otherwise negative error value HTTP_ERROR_NONE | Successful |
HTTP_ERROR_INVALID_PARAMETER | Invalid parameter |
HTTP_ERROR_INVALID_OPERATION | Invalid operation |
HTTP_ERROR_NOT_SUPPORTED | Not Supported |
int http_session_destroy_all_transactions | ( | http_session_h | http_session | ) |
Destroys all transactions.
[in] | http_session | The HTTP session handle |
0
on success, otherwise negative error value HTTP_ERROR_NONE | Successful |
HTTP_ERROR_INVALID_PARAMETER | Invalid parameter |
HTTP_ERROR_INVALID_OPERATION | Invalid operation |
HTTP_ERROR_OPERATION_FAILED | Operation failed |
HTTP_ERROR_NOT_SUPPORTED | Not Supported |
int http_session_get_active_transaction_count | ( | http_session_h | http_session, |
int * | active_transaction_count | ||
) |
Gets the number of active transactions in the current session.
[in] | http_session | The HTTP session handle |
[out] | active_transaction_count | The number of activated transactions |
0
on success, otherwise negative error value HTTP_ERROR_NONE | Successful |
HTTP_ERROR_INVALID_PARAMETER | Invalid parameter |
HTTP_ERROR_INVALID_OPERATION | Invalid operation |
HTTP_ERROR_NOT_SUPPORTED | Not Supported |
int http_session_get_auto_redirection | ( | http_session_h | http_session, |
bool * | auto_redirect | ||
) |
Gets the auto redirection for the HTTP request.
[in] | http_session | The HTTP session handle |
[out] | auto_redirect | The value of auto redirect |
0
on success, otherwise negative error value HTTP_ERROR_NONE | Successful |
HTTP_ERROR_INVALID_PARAMETER | Invalid parameter |
HTTP_ERROR_INVALID_OPERATION | Invalid operation |
HTTP_ERROR_NOT_SUPPORTED | Not Supported |
int http_session_get_max_transaction_count | ( | http_session_h | http_session, |
int * | transaction_count | ||
) |
Gets the maximum number of transactions for the current session.
[in] | http_session | The HTTP session handle |
[out] | transaction_count | The maximum transaction count |
0
on success, otherwise negative error value HTTP_ERROR_NONE | Successful |
HTTP_ERROR_INVALID_PARAMETER | Invalid parameter |
HTTP_ERROR_INVALID_OPERATION | Invalid operation |
HTTP_ERROR_NOT_SUPPORTED | Not Supported |
int http_session_open_transaction | ( | http_session_h | http_session, |
http_method_e | method, | ||
http_transaction_h * | http_transaction | ||
) |
Opens HTTP transaction from the HTTP Session.
[in] | http_session | The HTTP session handle |
[in] | method | The HTTP request method |
[out] | http_transaction | The HTTP transaction handle |
0
on success, otherwise negative error value HTTP_ERROR_NONE | Successful |
HTTP_ERROR_INVALID_PARAMETER | Invalid parameter |
HTTP_ERROR_INVALID_OPERATION | Invalid operation |
HTTP_ERROR_OUT_OF_MEMORY | Out of memory |
HTTP_ERROR_NOT_SUPPORTED | Not Supported |
int http_session_set_auto_redirection | ( | http_session_h | http_session, |
bool | auto_redirection | ||
) |
Sets the value to redirect the HTTP request automatically.
[in] | http_session | The HTTP session handle |
[in] | auto_redirection | The value which determines whether allow redirection or not |
0
on success, otherwise negative error value HTTP_ERROR_NONE | Successful |
HTTP_ERROR_INVALID_PARAMETER | Invalid parameter |
HTTP_ERROR_INVALID_OPERATION | Invalid operation |
HTTP_ERROR_NOT_SUPPORTED | Not Supported |