API Guide Home (Online version only) |

# HS_HTTPLib68K.h File Reference

## Detailed Description

Public 68k include file for the HTTP Library.

Version:
  2.0

Date:

Definition in file HS_HTTPLib68K.h.

Include dependency graph for HS_HTTPLib68K.h:

Go to the source code of this file.

## Data Structures

- struct HS_HTTPLibSplit_
- struct HS_HTTPLibTime_
- struct HS_HTTPLibAuthInfo_
- struct HttpUASelectionRule

## Typedefs

- typedef HS_HTTPLibSplit_ HS_HTTPLibSplit
- typedef HS_HTTPLibTime_ HS_HTTPLibTime
- typedef void * HS_HTTPLibDataHandle
- typedef void * HS_HTTPLibVHandle
- typedef void * HS_HTTPLibString
- typedef void * HS_HTTPLibFixedString
- typedef void * HS_HTTPLibURLString
- typedef HS_HTTPLibAuthInfo_ HS_HTTPLibAuthInfo
- typedef void * HS_HTTPLibStream
- typedef void * HS_HTTPLibSSL
- typedef void * HS_HTTPLibCookies
- typedef void * HS_HTTPLibCertPtr
- typedef void * HS_HTTPLibCertList
- typedef void * HS_HTTPLibClientCertList
- typedef void * HS_HTTPLibSSLClassPtr
- typedef Int32(*) HS_HTTPLibCookieConfirmProc (HS_HTTPLibCookies in_cookie, HS_HTTPLibURLString in_url, Char *in_header, Int32 in_header_len, HS_HTTPLibOpaque in_aux)
- typedef Int32(*) HS_HTTPLibServerCertConfirmProc (HS_HTTPLibSSL in_ssl, Int32 in_verify_result, HS_HTTPLibCertList in_list, HS_HTTPLibOpaque in_aux)
- typedef Int32(*) HS_HTTPLibClientCertSelectProc (HS_HTTPLibSSL in_ssl, HS_HTTPLibClientCertList in_list, HS_HTTPLibOpaque in_aux)
- typedef Int32(*) HS_HTTPLibTunnelingCallbackProc (HS_HTTPLibStream stream, Char *buf, Int32 len, void *in_aux)
- typedef void(*) HS_HTTPLibWakeUpCallbackProc (HS_HTTPLibOpaque in_aux)

## Enumerations

- enum {
  httpUASelectTypeHost,
  httpUASelectTypePath
  }

## Functions

- Err HS_HTTPLibOpen (UInt16 refnum)
    This function opens the HTTP library and increments the open count. This function will create and initialize the library’s common data at first opening.
- Err HS_HTTPLibClose (UInt16 refnum, UInt16 *usecountP)
    This function decrements open count and finalizes the library’s common data at the last close.
- Err HS_HTTPLibSleep (UInt16 refnum)
    Standard library sleep function.
- Err HS_HTTPLibWake (UInt16 refnum)
    Standard library wake function.
- UInt16 HS_HTTPLibOpenCount (UInt16 refnum)
    This function returns the open count of this library.
- HS_HTTPLibHandle HS_HTTPLibInitialize (UInt16 refnum, HS_HTTPLibAppInfo *appInfoP, HS_HTTPLibNetLibInfo *netLibInfoP, HS_HTTPLibPeer *peerP)
    This function initializes the library instance and sets application dependent information in the global variables. The return value is the handle of library instance. If an error occurs during the initialization, the return value is NULL.
- void HS_HTTPLibFinalize (UInt16 refnum, HS_HTTPLibHandle libH)
    This function finalizes the library instance.
- HS_HTTPLibSSLClassPtr HS_HTTPLibSSLClass (UInt16 refnum, HS_HTTPLibHandle libH)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibRegisterSSLClass (UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibSSLClassPtr sslClassP)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibClearDNSCache (UInt16 refnum, HS_HTTPLibHandle libH)
    This function clears the DNS cache information.
- void HS_HTTPLibCloseAllKeepAlive (UInt16 refnum, HS_HTTPLibHandle libH)
    This function closes the all idle keep alive sockets relating this application. Nonidle sockets are not closed by this function.
- void HS_HTTPLibMakeProxy (UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibFixedString *out_proxy_host, Int32 *out_proxy_http_port, Int32 *out_proxy_https_port, HS_HTTPLibString *out_no_proxy_hosts)
    Set the proxy information of this application to out_proxy_host, out_proxy_http_port, out_proxy_https_port, out_no_proxy_hosts. If out_proxy_host is NULL, the value of *out_proxy_http_port, *out_proxy_https_port, *out_no_proxy_hosts are not set, otherwise the values of *out_proxy_http_port, *out_proxy_https are set. If out_no_proxy_hosts is NULL, *out_no_proxy_hosts is not set. The format of out_no_proxy_hosts is the list separated by “,”. The responsibility of delete *out_proxy_host, *out_no_proxy_hosts is caller.
- void HS_HTTPLibSetHTTPPort (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_port)
    This function sets the default HTTP port number. If there is no indication in URL, this port number is used for TCP connection.
- void HS_HTTPLibSetHTTPSPort (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_port)
    This function sets the default HTTPS port number. If there is no indication in https URL, this port number is used for TCP connection.
- void HS_HTTPLibSetMaxRequestHeader (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_size)
    This function sets the maximal size of Request-Line. If in_size is -1, the maximal size is unlimited. Note that this function does not set the maximal size of Request- Header. See RFC2616 for the definitions of Request-Line and Request-Header.
- void HS_HTTPLibSetMaxRequestBody (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_size)
    This function sets the maximal size of Request-Body. If in_size is -1, the maximal size is unlimited.
- Boolean HS_HTTPLibSetProxy (UInt16 refnum, HS_HTTPLibHandle libH, Char *in_proxy_host, Int32 in_proxy_host_len, Int32 in_proxy_http_port, Int32 in_proxy_https_port, Char *in_no_proxy_hosts, Int32 in_no_proxy_hosts_len)
    This function sets the proxy server setting for this application. If in_proxy_host is NULL, in_proxy_host, in_proxy_http_port, in_proxy_https_port are not set. If in_no_proxy_hosts is NULL, in_no_proxy_hosts is not set. The format of in_no_proxy_hosts is comma (“,”) separated list.
- Boolean HS_HTTPLibSetUserAgent (UInt16 refnum, HS_HTTPLibHandle libH, Char *in_useragent, Int32 in_useragent_len)
    This function sets the UserAgent string for the application. If in_useragent is NULL, setting is cleared.
- Boolean HS_HTTPLibSetDefaultHeaders (UInt16 refnum, HS_HTTPLibHandle libH, Char *in_default_headers, Int32 in_default_headers_len)
    This function sets the default header, i.e. this string is added to the Request-header of the Request created at HS_HTTPLibStreamCreateRequest. If in_default_headers is NULL, the setting is cleared.
- void HS_HTTPLibSetUseProxy (UInt16 refnum, HS_HTTPLibHandle libH, Boolean in_bool)
    This function sets whether this application uses proxy server.
- void HS_HTTPLibSetHTTP11OverProxy (UInt16 refnum, HS_HTTPLibHandle libH, Boolean in_bool)
    This function sets whether this application permits HTTP1.1 over proxy server. If false is set, the application use HTTP/1.0.
- void HS_HTTPLibSetSendReferer (UInt16 refnum, HS_HTTPLibHandle libH, Boolean in_bool)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibSetSendProxyKeepAlive (UInt16 refnum, HS_HTTPLibHandle libH, Boolean in_bool)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibSetSendCookie (UInt16 refnum, HS_HTTPLibHandle libH, Boolean in_bool)
    This function sets whether this application sends Cookie.
- void HS_HTTPLibSetConnectTimeOut (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_msec)
    This function sets the limit of Connection timeout. If in_msec is -1, no timeout is set. The condition of timeout is in_msec has passed from TCP connect without HTTP connection established.
- void HS_HTTPLibSetReqTimeOut (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_msec)
    This function sets the limit of sending Request timeout. If in_msec is -1, no timeout is set. The condition of timeout is in_msec has passed from the start of Request sending without sending done.
- void HS_HTTPLibSetRspTimeOut (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_msec)
    This function sets the limit of receiving Response timeout. If in_msec is -1, no timeout is set. The condition of timeout is in_msec has passed from the end of sending request without receiving Response. Or in_msec has passed from the last receiving a part of Response without receiving any part of Response.
- void HS_HTTPLibSetTunnelingCallback (UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibTunnelingCallbackProc in_cb, void *in_aux)
    Parameters:

      | refnum,: | IN:

- Boolean HS_HTTPLibIsUseProxy (UInt16 refnum, HS_HTTPLibHandle libH)
    This function returns whether this application uses proxy.
- Boolean HS_HTTPLibIsHTTP11OverProxy (UInt16 refnum, HS_HTTPLibHandle libH)
    This function returns whether this application permits HTTP/1.1 over proxy.
- Boolean HS_HTTPLibIsSendReferer (UInt16 refnum, HS_HTTPLibHandle libH)
    Parameters:

      | refnum,: | IN:

- Boolean HS_HTTPLibIsSendCookie (UInt16 refnum, HS_HTTPLibHandle libH)
    This function returns whether this application sends Cookie.
- HS_HTTPLibStream HS_HTTPLibStreamNew (UInt16 refnum, HS_HTTPLibHandle libH)
    This function creates a new stream and returns the handle of stream instance. At this time, TCP/SSL socket is not opened.
- void HS_HTTPLibStreamDelete (UInt16 refnum, HS_HTTPLibStream stream)
    This function deletes the stream instance. If this function is called without calling HS_HTTPLibStreamClose, this function closes the TCP/SSL socket by calling HS_HTTPLibStreamClose, however if the socket is in keep-alive, it is not closed.
- Int32 HS_HTTPLibStreamCreateRequest (UInt16 refnum, HS_HTTPLibStream stream, Int32 in_method, Char *in_url, UInt32 in_url_len, Char *in_header, UInt32 in_header_len, Char *in_referer, UInt32 in_referer_len, Int32 in_version, Boolean in_no_cache, Boolean in_pipeline, Int32 in_ssl_flag)
    This function creates a request. If using proxy and SSL connection, CONNECT request message is made. If there are cached authenticate informations, add authenticate header. Add default headers and in_header to Request-Header.
- Int32 HS_HTTPLibStreamCreateRequestWithChunkEncoding (UInt16 refnum, HS_HTTPLibStream stream, Int32 in_method, Char *in_url, UInt32 in_url_len, Char *in_header, UInt32 in_header_len, Char *in_referer, UInt32 in_referer_len, Int32 in_version, Boolean in_no_cache, Boolean in_pipeline, Int32 in_ssl_flag)
    This function creates request for chunk-encoding post. If using proxy and SSL connection, CONNECT request message is made. If there are cached authenticate informations, add authenticate header. Add default headers and in_header to Request-Header. Do not use this API unless you want to create chunk-encoding request. Transfer- Encoding: chunked is added to the request header.
- Int32 HS_HTTPLibStreamSendRequest (UInt16 refnum, HS_HTTPLibStream stream, Int32 *out_sleep)
    This function sends the request. This call opens and connects a TCP connection if not already established. It automatically retries at where pipeline stalled if pipeline is enable.
- Int32 HS_HTTPLibStreamSendRequestWithPostData (UInt16 refnum, HS_HTTPLibStream stream, Char *in_buf, Int32 in_len, Int32 *out_len, Int32 *out_sleep)
    This function sends the POST request. This call opens and connects a TCP connection if not already established. It automatically retries at where pipeline stalled if pipeline is enable.
- Int32 HS_HTTPLibStreamSendRequestWithChunkEncoding (UInt16 refnum, HS_HTTPLibStream stream, Char *in_buf, Int32 in_offset, Int32 in_len, Boolean isFinish, Int32 *out_len, Int32 *out_sleep)
    This function sends chunk encoding data. This call opens and connects a TCP connection if not already established. It automatically retries at where pipeline stalled if pipeline is enable. The sequence of chunked data sending is 1. call HS_HTTPLibStreamCreateRequestWithChunkEncoding() 2. call HS_HTTPLibStreamSendRequestWithChunkEncoding() while return value is not httpErrorOK or error. 3. If there remains data, goto 2. 4. end If only one chunked data is sent, this API returns httpErrorOK. The address of data for one chunk is in_buf + in_offset, this value should not be changed while sending only one chunked data. isFinish is used to indicate the chunked data is the last chunk.
- Int32 HS_HTTPLibStreamReceiveResponse (UInt16 refnum, HS_HTTPLibStream stream, Char *out_buf, Int32 in_len, Int32 *out_len, Int32 *out_sleep)
    This function receives response. It automatically retries at where pipeline stalled if pipeline is enable.
- Int32 HS_HTTPLibStreamGetFlag (UInt16 refnum, HS_HTTPLibStream stream)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibStreamSuspendTimer (UInt16 refnum, HS_HTTPLibStream stream)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibStreamResumeTimer (UInt16 refnum, HS_HTTPLibStream stream)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibStreamClose (UInt16 refnum, HS_HTTPLibStream stream)
    This function closes the HTTP stream. If the TCP/SSL socket is in keep-alive, it is not closed.
- Boolean HS_HTTPLibStreamIsHeaderReceived (UInt16 refnum, HS_HTTPLibStream stream)
    This function returns whether the response header is completely received.
- Int32 HS_HTTPLibStreamSetPostData (UInt16 refnum, HS_HTTPLibStream stream, Int32 in_encoding, Char *in_data, Int32 in_len)
    This function sets the POST data.
- Int32 HS_HTTPLibStreamGetScheme (UInt16 refnum, HS_HTTPLibStream stream)
    This function returns the scheme given at the HS_HTTPLibStreamCreateRequest.
- Int32 HS_HTTPLibStreamGetState (UInt16 refnum, HS_HTTPLibStream stream)
    This function returns the state of the stream. The state changes follow the below sequence (but skipping the states that are not relevant to the current request).
- Int32 HS_HTTPLibStreamGetStatusCode (UInt16 refnum, HS_HTTPLibStream stream)
    This function returns the Status Code.
- Int32 HS_HTTPLibStreamGetResponseHeaderLength (UInt16 refnum, HS_HTTPLibStream stream)
    This function returns the size of the response header.
- HS_HTTPLibVHandle HS_HTTPLibStreamGetResponseHeader (UInt16 refnum, HS_HTTPLibStream stream)
    This function returns the handle of the response header. The responsibility to delete the handle is library, the application can not delete this return value. To lock/unlock the handle, the application should use the APIs,.
- Int32 HS_HTTPLibStreamGetContentLength (UInt16 refnum, HS_HTTPLibStream stream)
    This function returns the content’s size (byte).
- Int32 HS_HTTPLibStreamGetEntityLength (UInt16 refnum, HS_HTTPLibStream stream)
    This function returns the size of response body (byte).
- Boolean HS_HTTPLibStreamAddHeaderLine (UInt16 refnum, HS_HTTPLibStream stream, Char *in_str, Int32 in_len)
    This function adds the line to the Request header. If there is already the same kind of header line, old one is deleted.
- Boolean HS_HTTPLibStreamAddHeader (UInt16 refnum, HS_HTTPLibStream stream, Int32 in_type, Char *in_str, Int32 in_len)
    This function sets the value of corresponding header. If there is already the same kind of header line, old one is deleted.
- Boolean HS_HTTPLibStreamGetHeader (UInt16 refnum, HS_HTTPLibStream stream, Int32 in_type, Int32 *out_off, Int32 *out_len)
    This function returns the offset and length of corresponding header value.
- HS_HTTPLibCertList HS_HTTPLibMakeCertList (UInt16 refnum, HS_HTTPLibStream stream)
    This function returns the Server certification used for SSL. The responsibility to delete the return handle is the application. To delete the return value, the application should use HS_HTTPLibCertListDelete.
- Boolean HS_HTTPLibHeaderSplitByX (UInt16 refnum, HS_HTTPLibSplit *inout_ss, Int32 in_id, Char *in_cs)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibAuthInfoTidy (UInt16 refnum, HS_HTTPLibAuthInfo *in_info, Boolean in_new)
    This function initialize/finalize the HS_HTTPLibAuthInfo struct. The application should call this function setting in_new = true before using HS_HTTPLibAuthInfo. The application should call this function setting in_new = false after using HS_HTTPLibAuthInfo.
- Boolean HS_HTTPLibSetUserPass (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_type, Int32 in_target, HS_HTTPLibSplit *in_challenge, HS_HTTPLibSplit *in_realm, Char *in_user, Int32 in_user_len, Char *in_pass, Int32 in_pass_len, Char *in_url, Int32 in_url_len, Char *in_host, Int32 in_host_len, Int32 in_port)
    This function sets the authentication information.
- Boolean HS_HTTPLibFindAuthInfo (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_target, Char *in_url, Int32 in_url_len, Char *in_host, Int32 in_host_len, Int32 in_port, HS_HTTPLibSplit *in_realm, HS_HTTPLibAuthInfo *out_info)
    Parameters:

      | refnum,: | IN:

- Boolean HS_HTTPLibMakeAuthInfo (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_target, Char *in_url, Int32 in_url_len, Char *in_host, Int32 in_host_len, Int32 in_port, HS_HTTPLibSplit *in_realm, HS_HTTPLibAuthInfo *out_info)
    This function returns the authentication information to the out_info. Before calling this API, the application should intialize HS_HTTPLibAuthInfo by HS_HTTPLibAuthInfoTidy(out_info, true).
- HS_HTTPLibString HS_HTTPLibAuthInfoUser (UInt16 refnum, HS_HTTPLibAuthInfo *in_info)
    This function returns the User Name. The application should not delete this return value.
- HS_HTTPLibString HS_HTTPLibAuthInfoPass (UInt16 refnum, HS_HTTPLibAuthInfo *in_info)
    This function returns the Password. The application should not delete this return value.
- HS_HTTPLibString HS_HTTPLibAuthInfoRealm (UInt16 refnum, HS_HTTPLibAuthInfo *in_info)
    This function returns the Realm. The application should not delete this return value.
- Boolean HS_HTTPLibAuthCacheGetChallengeTokenSS (UInt16 refnum, HS_HTTPLibSplit *in_challenge_ss, Char *in_token, HS_HTTPLibSplit *out_ss)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibSetCookieMode (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_mode, HS_HTTPLibCookieConfirmProc in_cb, HS_HTTPLibOpaque in_opaque)
    This function sets the Cookie mode.
- void HS_HTTPLibSetCookieMax (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_max_total_cookies, Int32 in_max_cookies_per_domain, Int32 in_max_len_per_cookie)
    This function sets the max size of Cookie entries.
- Int32 HS_HTTPLibSetCookie (UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibURLString in_url, Char *in_header, Int32 in_header_len)
    This function sets the Cookie abiding with the confirmation mode set by HS_HTTPLibSetCookieMode. The application should not use this API in callback function. The API HS_HTTPLibSetCookieX is designed for use in callback.
- Int32 HS_HTTPLibSetCookieX (UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibURLString in_url, Char *in_header, Int32 in_header_len)
    This function sets the Cookie. This function is designed for callback confirm function.
- HS_HTTPLibString HS_HTTPLibMakeCookiesString (UInt16 refnum, HS_HTTPLibHandle libH, Char *in_url, Int32 in_urllen, Boolean in_secure, Int32 *out_len)
    Parameters:

      | refnum,: | IN:

- HS_HTTPLibString HS_HTTPLibSaveCookiesEntries (UInt16 refnum, HS_HTTPLibHandle libH, Int32 *out_len)
    Parameters:

      | refnum,: | IN:

- Boolean HS_HTTPLibLoadCookiesEntries (UInt16 refnum, HS_HTTPLibHandle libH, Char *in_s, Int32 in_slen)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibCookieMakeEmpty (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_flag)
    This function clears Cookies.
- void HS_HTTPLibSetDNSMaxRetry (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_retry)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibSetDNSRetryInterval (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_interval)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibSetSSLVersionFlag (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_flag, Boolean in_on)
    Set the SSL version.
- Int32 HS_HTTPLibSSLTimeout (UInt16 refnum, HS_HTTPLibHandle libH)
    Set the timeout period for SSL use.
- Int32 HS_HTTPLibSSLOpenCertDB (UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibCertList *out_list)
    TBD.
- void HS_HTTPLibSSLCloseCertDB (UInt16 refnum, HS_HTTPLibHandle libH)
    TBD.
- HS_HTTPLibCertList HS_HTTPLibCertListNew (UInt16 refnum, Int32 in_type)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibCertListDelete (UInt16 refnum, HS_HTTPLibCertList in_list)
    TBD.
- HS_HTTPLibCertList HS_HTTPLibCertListClone (UInt16 refnum, HS_HTTPLibCertList in_list)
    TBD.
- void * HS_HTTPLibCertListLock (UInt16 refnum, HS_HTTPLibCertList in_list)
    Lock the certificate list and return its pointer.
- void HS_HTTPLibCertListUnlock (UInt16 refnum, HS_HTTPLibCertList in_list)
    Unlock the certificate list.
- Int32 HS_HTTPLibCertListType (UInt16 refnum, HS_HTTPLibCertList in_list)
    TBD.
- Int32 HS_HTTPLibCertListLength (UInt16 refnum, HS_HTTPLibCertList in_list)
    TBD.
- Int32 HS_HTTPLibCertListBeginDecode (UInt16 refnum, HS_HTTPLibCertList in_list, Int32 in_index, HS_HTTPLibCertPtr *out_cert)
    TBD.
- void HS_HTTPLibCertListEndDecode (UInt16 refnum, HS_HTTPLibCertList in_list, HS_HTTPLibCertPtr in_cert)
    TBD.
- Int32 HS_HTTPLibCertListImportCert (UInt16 refnum, HS_HTTPLibCertList in_list, void *in_info, Boolean in_over_write)
    TBD.
- Int32 HS_HTTPLibCertPeekVersion (UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    Parameters:

      | refnum,: | IN:

- Int32 HS_HTTPLibCertPeekSerialNumber (UInt16 refnum, HS_HTTPLibCertPtr in_cert, Char **out_str)
    Parameters:

      | refnum,: | IN:

- Int32 HS_HTTPLibCertPeekSignAlgo (UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    Parameters:

      | refnum,: | IN:

- Boolean HS_HTTPLibCertBeginPeekIssuerRDN (UInt16 refnum, HS_HTTPLibCertPtr in_cert, Int32 in_attr)
    Parameters:

      | refnum,: | IN:

- Int32 HS_HTTPLibCertPeekIssuerRDN (UInt16 refnum, HS_HTTPLibCertPtr in_cert, Char **out_str)
    Parameters:

      | refnum,: | IN:

- Int32 HS_HTTPLibCertPeekIssuerRDNStrType (UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibCertEndPeekIssuerRDN (UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    Parameters:

      | refnum,: | IN:

- Boolean HS_HTTPLibCertBeginPeekSubjectRDN (UInt16 refnum, HS_HTTPLibCertPtr in_cert, Int32 in_attr)
    Parameters:

      | refnum,: | IN:

- Int32 HS_HTTPLibCertPeekSubjectRDN (UInt16 refnum, HS_HTTPLibCertPtr in_cert, Char **out_str)
    Parameters:

      | refnum,: | IN:

- Int32 HS_HTTPLibCertPeekSubjectRDNStrType (UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibCertEndPeekSubjectRDN (UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibCertPeekValidityStart (UInt16 refnum, HS_HTTPLibCertPtr in_cert, HS_HTTPLibTime *in_time)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibCertPeekValidityEnd (UInt16 refnum, HS_HTTPLibCertPtr in_cert, HS_HTTPLibTime *in_time)
    Parameters:

      | refnum,: | IN:

- Int32 HS_HTTPLibCertPeekRSAPublicKeyBits (UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    Parameters:

      | refnum,: | IN:

- HS_HTTPLibClientCertList HS_HTTPLibClientCertListNew (UInt16 refnum)
    Parameters:

      | refnum,: | IN:

- HS_HTTPLibClientCertList HS_HTTPLibClientCertListClone (UInt16 refnum, HS_HTTPLibClientCertList in_list)
    TBD.
- void HS_HTTPLibClientCertListDelete (UInt16 refnum, HS_HTTPLibClientCertList in_list)
    Parameters:

      | refnum,: | IN:

- Int32 HS_HTTPLibClientCertListLength (UInt16 refnum, HS_HTTPLibClientCertList in_list)
    TBD.
- Boolean HS_HTTPLibClientCertListIsValid (UInt16 refnum, HS_HTTPLibClientCertList in_list, Int32 in_index)
    TBD.
- void HS_HTTPLibClientCertListSetValid (UInt16 refnum, HS_HTTPLibClientCertList in_list, Int32 in_index, Boolean in_valid)
    TBD.
- void HS_HTTPLibSetSSLServerCertConfirmProc (UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibServerCertConfirmProc in_cb, HS_HTTPLibOpaque in_opaque)
    This function sets the server certificate callback function for this application.
- void HS_HTTPLibServerCertConfirm (UInt16 refnum, HS_HTTPLibSSL in_ssl, Int32 in_verify_result, Boolean in_confirm)
    This function sets the result of confirmation. This function should be called in the callback function.
- void HS_HTTPLibSetSSLClientCertSelectProc (UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibClientCertSelectProc in_cb, HS_HTTPLibOpaque in_opaque)
    This function sets the client certification select callback function.For now, there is no corresponding function in SSL library, the callback will not be called.
- void HS_HTTPLibClientCertSelect (UInt16 refnum, HS_HTTPLibSSL in_ssl, Int32 in_index)
    This function sets the selected certification. For now, there is no corresponding function in SSL library, the callback will not be called.
- void HS_HTTPLibSetNetLibProc (UInt16 refnum, HS_HTTPLibHandle libH, UInt16 netLibRefnum, HS_HTTPLibNetLibOpenProc in_open, HS_HTTPLibNetLibCloseProc in_close, HS_HTTPLibNetLibOnlineProc in_online, HS_HTTPLibNetLibOfflineProc in_offline)
    This function sets the callback functions concerning NetLib. But for now, there is no call to callback functions from Peer layer.
- Int32 HS_HTTPLibDataHandle_Length (UInt16 refnum, HS_HTTPLibDataHandle in_handle)
    Parameters:

      | refnum,: | IN:

- void * HS_HTTPLibDataHandle_Lock (UInt16 refnum, HS_HTTPLibDataHandle in_handle)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibDataHandle_Unlock (UInt16 refnum, HS_HTTPLibDataHandle in_handle)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibDataHandle_Delete (UInt16 refnum, HS_HTTPLibDataHandle in_handle)
    Parameters:

      | refnum,: | IN:

- Int32 HS_HTTPLibVHandle_Length (UInt16 refnum, HS_HTTPLibVHandle in_vhandle)
    This function returns the length of the handle (byte).
- void * HS_HTTPLibVHandle_Lock (UInt16 refnum, HS_HTTPLibVHandle in_vhandle)
    This function locks the handle of type HS_HTTPLibVHandle.
- void HS_HTTPLibVHandle_Unlock (UInt16 refnum, HS_HTTPLibVHandle in_vhandle)
    This function unlocks the handle of type HS_HTTPLibVHandle.
- void HS_HTTPLibVHandle_Delete (UInt16 refnum, HS_HTTPLibVHandle in_vhandle)
    This function deletes the handle of type HS_HTTPLibVHandle.
- Int32 HS_HTTPLibString_Length (UInt16 refnum, HS_HTTPLibString in_str)
    This function returns the length of the handle (byte).
- HS_HTTPLibString HS_HTTPLibStringNew (UInt16 refnum, Char *in_str, Int32 in_len)
    This function creates a new handle of type HS_HTTPLibString.
- void * HS_HTTPLibString_Lock (UInt16 refnum, HS_HTTPLibString in_str)
    This function locks the handle of type HS_HTTPLibString.
- void HS_HTTPLibString_Unlock (UInt16 refnum, HS_HTTPLibString in_str)
    This function unlocks the handle of type HS_HTTPLibString.
- void HS_HTTPLibString_Delete (UInt16 refnum, HS_HTTPLibString in_str)
    This function deletes the handle of type HS_HTTPLibString.
- Int32 HS_HTTPLibFixedString_Length (UInt16 refnum, HS_HTTPLibFixedString in_str)
    This function returns the length of the handle (byte).
- HS_HTTPLibFixedString HS_HTTPLibFixedStringNew (UInt16 refnum, Char *in_str, Int32 in_len)
    This function creates a new handle of type HS_HTTPLibFixedString.
- void * HS_HTTPLibFixedString_Lock (UInt16 refnum, HS_HTTPLibFixedString in_str)
    This function locks the handle of type HS_HTTPLibFixedString.
- void HS_HTTPLibFixedString_Unlock (UInt16 refnum, HS_HTTPLibFixedString in_str)
    This function unlocks the handle of type HS_HTTPLibFixedString.
- void HS_HTTPLibFixedString_Delete (UInt16 refnum, HS_HTTPLibFixedString in_str)
    This function deletes the handle of type HS_HTTPLibFixedString.
- Int32 HS_HTTPLibURLString_Length (UInt16 refnum, HS_HTTPLibURLString in_str)
    This function returns the length of the handle (byte).
- HS_HTTPLibURLString HS_HTTPLibURLStringNew (UInt16 refnum, Char *in_str, Int32 in_len)
    This function creates a new handle of type HS_HTTPLibURLString.
- void * HS_HTTPLibURLString_Lock (UInt16 refnum, HS_HTTPLibURLString in_str)
    This function locks the handle of type HS_HTTPLibURLString.
- void HS_HTTPLibURLString_Unlock (UInt16 refnum, HS_HTTPLibURLString in_str)
    This function unlocks the handle of type HS_HTTPLibURLString.
- void HS_HTTPLibURLString_Delete (UInt16 refnum, HS_HTTPLibURLString in_str)
    This function deletes the handle of type HS_HTTPLibURLString.
- void * HS_HTTPLibCertListGetCipherInfo (UInt16 refnum, void *iself)
    This returns the cipher info. SslCipherSuiteInfo is the structure defined in SslLib.h.
- void HS_HTTPLibSetMaxKeepAliveTimeout (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_msec)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibStreamGetRequestSent (UInt16 refnum, HS_HTTPLibStream stream, Int32 *out_total, Int32 *out_sent)
    Parameters:

      | refnum,: | IN:

- Boolean HS_HTTPLibStreamGetHeaderWithOffset (UInt16 refnum, HS_HTTPLibStream stream, Int32 in_type, Int32 in_ofs, Int32 *out_off, Int32 *out_len)
    Parameters:

      | refnum,: | IN:

- Boolean HS_HTTPLibSetUserPassX (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_type, Int32 in_target, HS_HTTPLibSplit *in_challenge, HS_HTTPLibSplit *in_realm, Char *in_user, Int32 in_user_len, Char *in_pass, Int32 in_pass_len, Char *in_url, Int32 in_url_len, Char *in_host, Int32 in_host_len, Int32 in_port, Boolean in_keep_user, Boolean in_keep_pass)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibFindAuthCandidate (UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_target, Char *in_url, Int32 in_url_len, Char *in_host, Int32 in_host_len, Int32 in_port, Char *in_realm, Int32 in_realm_len, HS_HTTPLibString *out_user, HS_HTTPLibString *out_pass, Boolean *out_keep_user, Boolean *out_keep_pass)
    Parameters:

      | refnum,: | IN:

- void HS_HTTPLibSetWakeUpCallback (UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibWakeUpCallbackProc in_proc, HS_HTTPLibOpaque in_opaque)
    Parameters:

      | refnum,: | IN:

- Boolean HS_HTTPLibSetUseragentSelectionRule (UInt16 refnum, HS_HTTPLibHandle libH, HttpUASelectionRule *rules, Int32 len)
    Parameters:

      | refnum,: | IN:

## Typedef Documentation

typedef struct HS_HTTPLibAuthInfo_ HS_HTTPLibAuthInfo

Definition at line 79 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibCertList

Definition at line 105 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibCertPtr

Definition at line 104 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibClientCertList

Definition at line 106 of file HS_HTTPLib68K.h.

typedef Int32(*) HS_HTTPLibClientCertSelectProc(HS_HTTPLibSSL in_ssl, HS_HTTPLibClientCertList in_list, HS_HTTPLibOpaque in_aux)

Definition at line 111 of file HS_HTTPLib68K.h.

typedef Int32(*) HS_HTTPLibCookieConfirmProc(HS_HTTPLibCookies in_cookie, HS_HTTPLibURLString in_url, Char *in_header, Int32 in_header_len, HS_HTTPLibOpaque in_aux)

Definition at line 109 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibCookies

Definition at line 103 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibDataHandle

Definition at line 62 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibFixedString

Definition at line 65 of file HS_HTTPLib68K.h.

typedef Int32(*) HS_HTTPLibServerCertConfirmProc(HS_HTTPLibSSL in_ssl, Int32 in_verify_result, HS_HTTPLibCertList in_list, HS_HTTPLibOpaque in_aux)

Definition at line 110 of file HS_HTTPLib68K.h.

typedef struct HS_HTTPLibSplit_ HS_HTTPLibSplit

Definition at line 54 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibSSL

Definition at line 102 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibSSLClassPtr

Definition at line 107 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibStream

Definition at line 101 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibString

Definition at line 64 of file HS_HTTPLib68K.h.

typedef struct HS_HTTPLibTime_ HS_HTTPLibTime

Definition at line 60 of file HS_HTTPLib68K.h.

typedef Int32(*) HS_HTTPLibTunnelingCallbackProc(HS_HTTPLibStream stream, Char *buf, Int32 len, void *in_aux)

Definition at line 112 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibURLString

Definition at line 66 of file HS_HTTPLib68K.h.

typedef void* HS_HTTPLibVHandle

Definition at line 63 of file HS_HTTPLib68K.h.

typedef void(*) HS_HTTPLibWakeUpCallbackProc(HS_HTTPLibOpaque in_aux)

Definition at line 113 of file HS_HTTPLib68K.h.

## Enumeration Type Documentation

anonymous enum

This sets the rules for HttpLib to use to select useragent for each request. The rule should be set as little as possible so that it does not slow down browser performance.

Enumerator:

  httpUASelectTypeHost |
  httpUASelectTypePath |

Definition at line 86 of file HS_HTTPLib68K.h.

    00086      {
    00087     httpUASelectTypeHost,       /**<        */
    00088     httpUASelectTypePath        /**<        */
    00089 };

## Function Documentation

Boolean HS_HTTPLibAuthCacheGetChallengeTokenSS | ( | UInt16 | refnum,
|  | HS_HTTPLibSplit * | in_challenge_ss,
|  | Char * | in_token,
|  | HS_HTTPLibSplit * | out_ss |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | *in_challenge_ss,: | IN:
  | *in_token,: | IN:
  | *out_ss,: | IN:

Return values:

  | Err | error code.

HS_HTTPLibString HS_HTTPLibAuthInfoPass | ( | UInt16 | refnum,
|  | HS_HTTPLibAuthInfo * | in_info |
| ) |  |  |

This function returns the Password. The application should not delete this return value.

Parameters:

  | refnum,: | IN: Library reference number.
  | *in_info,: | IN: The pointer to the authentication information.

Returns:
  The handle of password.

HS_HTTPLibString HS_HTTPLibAuthInfoRealm | ( | UInt16 | refnum,
|  | HS_HTTPLibAuthInfo * | in_info |
| ) |  |  |

This function returns the Realm. The application should not delete this return value.

Parameters:

  | refnum,: | IN: Library reference number.
  | *in_info,: | IN: The pointer to the authentication information.

Returns:
  The handle of Realm.

void HS_HTTPLibAuthInfoTidy | ( | UInt16 | refnum,
|  | HS_HTTPLibAuthInfo * | in_info,
|  | Boolean | in_new |
| ) |  |  |

This function initialize/finalize the HS_HTTPLibAuthInfo struct. The application should call this function setting in_new = true before using HS_HTTPLibAuthInfo. The application should call this function setting in_new = false after using HS_HTTPLibAuthInfo.

Parameters:

  | refnum,: | IN: Library reference number.
  | *in_info,: | IN: The pointer to the authenticate information struct.
  | in_new,: | IN: True if initialize the member. False if initialize the member after deleting.

Returns:
  None.

HS_HTTPLibString HS_HTTPLibAuthInfoUser | ( | UInt16 | refnum,
|  | HS_HTTPLibAuthInfo * | in_info |
| ) |  |  |

This function returns the User Name. The application should not delete this return value.

Parameters:

  | refnum,: | IN: Library reference number.
  | *in_info,: | IN: The pointer to the authentication information.

Returns:
  The handle of User Name.

Boolean HS_HTTPLibCertBeginPeekIssuerRDN | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert,
|  | Int32 | in_attr |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:
  | in_attr,: | IN:

Return values:

  | Err | error code.

Boolean HS_HTTPLibCertBeginPeekSubjectRDN | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert,
|  | Int32 | in_attr |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:
  | in_attr,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibCertEndPeekIssuerRDN | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibCertEndPeekSubjectRDN | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:

Return values:

  | Err | error code.

Int32 HS_HTTPLibCertListBeginDecode | ( | UInt16 | refnum,
|  | HS_HTTPLibCertList | in_list,
|  | Int32 | in_index,
|  | HS_HTTPLibCertPtr * | out_cert |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_list,: | IN: The handle of the server’s certification list.
  | in_index,: | IN: -
  | *out_cert,: | OUT: -

Return values:

  | Int32 |

HS_HTTPLibCertList HS_HTTPLibCertListClone | ( | UInt16 | refnum,
|  | HS_HTTPLibCertList | in_list |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_list,: | IN: The handle of the server’s certification list.

Returns:
  Handle to the clone of the certification list.

void HS_HTTPLibCertListDelete | ( | UInt16 | refnum,
|  | HS_HTTPLibCertList | in_list |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_list,: | IN: The handle of the server’s certification list.

Returns:
  None.

void HS_HTTPLibCertListEndDecode | ( | UInt16 | refnum,
|  | HS_HTTPLibCertList | in_list,
|  | HS_HTTPLibCertPtr | in_cert |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_list,: | IN: The handle of the server’s certification list.
  | in_cert,: | IN: -

Returns:
  None.

void* HS_HTTPLibCertListGetCipherInfo | ( | UInt16 | refnum,
|  | void * | iself |
| ) |  |  |

This returns the cipher info. SslCipherSuiteInfo is the structure defined in SslLib.h.

The implementation of this API in ARM native version is mere macro.

Parameters:

  | refnum,: | IN: Library reference number.
  | *iself,: | IN: -

Return values:

  | nothing |

Int32 HS_HTTPLibCertListImportCert | ( | UInt16 | refnum,
|  | HS_HTTPLibCertList | in_list,
|  | void * | in_info,
|  | Boolean | in_over_write |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_list,: | IN: The handle of the server’s certification list.
  | *in_info,: | IN: -
  | in_over_write,: | IN: -

Return values:

  | Int32 |

Int32 HS_HTTPLibCertListLength | ( | UInt16 | refnum,
|  | HS_HTTPLibCertList | in_list |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_list,: | IN: The handle of the server’s certification list.

Return values:

  | Int32 |

void* HS_HTTPLibCertListLock | ( | UInt16 | refnum,
|  | HS_HTTPLibCertList | in_list |
| ) |  |  |

Lock the certificate list and return its pointer.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_list,: | IN: The handle of the server's certification list.

Returns:
  Pointer to the certificate list.

HS_HTTPLibCertList HS_HTTPLibCertListNew | ( | UInt16 | refnum,
|  | Int32 | in_type |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_type,: | IN:

Returns:

Int32 HS_HTTPLibCertListType | ( | UInt16 | refnum,
|  | HS_HTTPLibCertList | in_list |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_list,: | IN: The handle of the server’s certification list.

Return values:

  | Int32 |

void HS_HTTPLibCertListUnlock | ( | UInt16 | refnum,
|  | HS_HTTPLibCertList | in_list |
| ) |  |  |

Unlock the certificate list.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_list,: | IN: The handle of the server’s certification list.

Returns:
  None.

Int32 HS_HTTPLibCertPeekIssuerRDN | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert,
|  | Char ** | out_str |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:
  | **out_str,: | IN:

Return values:

  | Err | error code.

Int32 HS_HTTPLibCertPeekIssuerRDNStrType | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:

Return values:

  | Err | error code.

Int32 HS_HTTPLibCertPeekRSAPublicKeyBits | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:

Return values:

  | Err | error code.

Int32 HS_HTTPLibCertPeekSerialNumber | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert,
|  | Char ** | out_str |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:
  | **out_str,: | IN:

Return values:

  | Err | error code.

Int32 HS_HTTPLibCertPeekSignAlgo | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:

Return values:

  | Err | error code.

Int32 HS_HTTPLibCertPeekSubjectRDN | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert,
|  | Char ** | out_str |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:
  | **out_str,: | IN:

Return values:

  | Err | error code.

Int32 HS_HTTPLibCertPeekSubjectRDNStrType | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibCertPeekValidityEnd | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert,
|  | HS_HTTPLibTime * | in_time |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:
  | *in_time,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibCertPeekValidityStart | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert,
|  | HS_HTTPLibTime * | in_time |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:
  | *in_time,: | IN:

Return values:

  | Err | error code.

Int32 HS_HTTPLibCertPeekVersion | ( | UInt16 | refnum,
|  | HS_HTTPLibCertPtr | in_cert |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_cert,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibClearDNSCache | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

This function clears the DNS cache information.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance

Returns:
  None.

HS_HTTPLibClientCertList HS_HTTPLibClientCertListClone | ( | UInt16 | refnum,
|  | HS_HTTPLibClientCertList | in_list |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN:
  | in_list,: | IN:

Return values:

  | HS_HTTPLibClientCertList |

void HS_HTTPLibClientCertListDelete | ( | UInt16 | refnum,
|  | HS_HTTPLibClientCertList | in_list |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_list,: | IN:

Return values:

  | nothing |

Boolean HS_HTTPLibClientCertListIsValid | ( | UInt16 | refnum,
|  | HS_HTTPLibClientCertList | in_list,
|  | Int32 | in_index |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN:
  | in_list,: | IN:
  | in_index,: | IN:

Return values:

  | Boolean |

Int32 HS_HTTPLibClientCertListLength | ( | UInt16 | refnum,
|  | HS_HTTPLibClientCertList | in_list |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN:
  | in_list,: | IN:

Return values:

  | Nothing |

HS_HTTPLibClientCertList HS_HTTPLibClientCertListNew | ( | UInt16 | refnum | ) |

Parameters:

  | refnum,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibClientCertListSetValid | ( | UInt16 | refnum,
|  | HS_HTTPLibClientCertList | in_list,
|  | Int32 | in_index,
|  | Boolean | in_valid |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN:
  | in_list,: | IN:
  | in_index,: | IN:
  | in_valid,: | IN:

Return values:

  | Nothing |

void HS_HTTPLibClientCertSelect | ( | UInt16 | refnum,
|  | HS_HTTPLibSSL | in_ssl,
|  | Int32 | in_index |
| ) |  |  |

This function sets the selected certification. For now, there is no corresponding function in SSL library, the callback will not be called.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_ssl,: | IN: -
  | in_index,: | IN: -

Returns:
  None.

Err HS_HTTPLibClose | ( | UInt16 | refnum,
|  | UInt16 * | usecountP |
| ) |  |  |

This function decrements open count and finalizes the library’s common data at the last close.

Parameters:

  | refnum,: | IN: Library reference number
  | usecountP,: | OUT: Open count

Returns:
  Error code.

void HS_HTTPLibCloseAllKeepAlive | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

This function closes the all idle keep alive sockets relating this application. Nonidle sockets are not closed by this function.

This call should be made at library finalization if keep-alive sockets are active.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance

Returns:
  None.

void HS_HTTPLibCookieMakeEmpty | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_flag |
| ) |  |  |

This function clears Cookies.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.
  | in_flag,: | IN: httpCookieClearAll clear all Cookies httpCookieClearSessionCookiesOnly clear session Cookies only

Returns:
  None.

void HS_HTTPLibDataHandle_Delete | ( | UInt16 | refnum,
|  | HS_HTTPLibDataHandle | in_handle |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_handle,: | IN:

Return values:

  | Err | error code.

Int32 HS_HTTPLibDataHandle_Length | ( | UInt16 | refnum,
|  | HS_HTTPLibDataHandle | in_handle |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_handle,: | IN:

Return values:

  | Err | error code.

void* HS_HTTPLibDataHandle_Lock | ( | UInt16 | refnum,
|  | HS_HTTPLibDataHandle | in_handle |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_handle,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibDataHandle_Unlock | ( | UInt16 | refnum,
|  | HS_HTTPLibDataHandle | in_handle |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | in_handle,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibFinalize | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

This function finalizes the library instance.

This call should be made when the application is finished using the library.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance

Returns:
  None.

void HS_HTTPLibFindAuthCandidate | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_target,
|  | Char * | in_url,
|  | Int32 | in_url_len,
|  | Char * | in_host,
|  | Int32 | in_host_len,
|  | Int32 | in_port,
|  | Char * | in_realm,
|  | Int32 | in_realm_len,
|  | HS_HTTPLibString * | out_user,
|  | HS_HTTPLibString * | out_pass,
|  | Boolean * | out_keep_user,
|  | Boolean * | out_keep_pass |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | in_target,: | IN:
  | *in_url,: | IN:
  | in_url_len,: | IN:
  | *in_host,: | IN:
  | in_host_len,: | IN:
  | in_port,: | IN:
  | *in_realm,: | IN:
  | in_realm_len,: | IN:
  | *out_user,: | IN:
  | *out_pass,: | IN:
  | *out_keep_user,: | IN:
  | *out_keep_pass,: | IN:
  | libH,: | IN:

Return values:

  | Err | error code.

Boolean HS_HTTPLibFindAuthInfo | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_target,
|  | Char * | in_url,
|  | Int32 | in_url_len,
|  | Char * | in_host,
|  | Int32 | in_host_len,
|  | Int32 | in_port,
|  | HS_HTTPLibSplit * | in_realm,
|  | HS_HTTPLibAuthInfo * | out_info |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | in_target,: | IN:
  | *in_url,: | IN:
  | in_url_len,: | IN:
  | *in_host,: | IN:
  | in_host_len,: | IN:
  | in_port,: | IN:
  | *in_realm,: | IN:
  | *out_info,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibFixedString_Delete | ( | UInt16 | refnum,
|  | HS_HTTPLibFixedString | in_str |
| ) |  |  |

This function deletes the handle of type HS_HTTPLibFixedString.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | nothing |

Int32 HS_HTTPLibFixedString_Length | ( | UInt16 | refnum,
|  | HS_HTTPLibFixedString | in_str |
| ) |  |  |

This function returns the length of the handle (byte).

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | Int32 |

void* HS_HTTPLibFixedString_Lock | ( | UInt16 | refnum,
|  | HS_HTTPLibFixedString | in_str |
| ) |  |  |

This function locks the handle of type HS_HTTPLibFixedString.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | void | *

void HS_HTTPLibFixedString_Unlock | ( | UInt16 | refnum,
|  | HS_HTTPLibFixedString | in_str |
| ) |  |  |

This function unlocks the handle of type HS_HTTPLibFixedString.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | nothing |

HS_HTTPLibFixedString HS_HTTPLibFixedStringNew | ( | UInt16 | refnum,
|  | Char * | in_str,
|  | Int32 | in_len |
| ) |  |  |

This function creates a new handle of type HS_HTTPLibFixedString.

Parameters:

  | refnum,: | IN: Library reference number.
  | *in_str,: | IN: The pointer to the string.
  | in_len,: | IN: The length of in_str.

Return values:

  | HS_HTTPLibFixedString |

Boolean HS_HTTPLibHeaderSplitByX | ( | UInt16 | refnum,
|  | HS_HTTPLibSplit * | inout_ss,
|  | Int32 | in_id,
|  | Char * | in_cs |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | *inout_ss,: | IN:
  | in_id,: | IN:
  | *in_cs,: | IN:

Return values:

  | Err | error code.

HS_HTTPLibHandle HS_HTTPLibInitialize | ( | UInt16 | refnum,
|  | HS_HTTPLibAppInfo * | appInfoP,
|  | HS_HTTPLibNetLibInfo * | netLibInfoP,
|  | HS_HTTPLibPeer * | peerP |
| ) |  |  |

This function initializes the library instance and sets application dependent information in the global variables. The return value is the handle of library instance. If an error occurs during the initialization, the return value is NULL.

This call should be made after the application has called HS_HTTPLibOpen and assigned the HS_HTTPLibAppInfo, HS_HTTPLibNetLibInfo, and HS_HTTPLibPeer global variables with the application’s parameters. A reciprocal call to HS_HTTPLibFinalize should be made when the application is finished using the library.

Parameters:

  | refnum,: | IN: Library reference number
  | *appInfoP,: | IN:
  | *netLibInfoP,: | IN:
  | *peerP,: | IN:

Return values:

  | HS_HTTPLibHandle | non NULL if successful. NULL if failed

Boolean HS_HTTPLibIsHTTP11OverProxy | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

This function returns whether this application permits HTTP/1.1 over proxy.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance

Returns:
  True if this application permits HTTP/1.1 over proxy. False if this application does not permit HTTP/1.1 over proxy.

Boolean HS_HTTPLibIsSendCookie | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

This function returns whether this application sends Cookie.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance

Returns:
  True if this application sends Cookie. False if this application does not send Cookie.

Boolean HS_HTTPLibIsSendReferer | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:

Return values:

  | Err | error code.

Boolean HS_HTTPLibIsUseProxy | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

This function returns whether this application uses proxy.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance

Returns:
  True if this application uses proxy. False if this application does not uses proxy.

Boolean HS_HTTPLibLoadCookiesEntries | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Char * | in_s,
|  | Int32 | in_slen |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | *in_s,: | IN:
  | in_slen,: | IN:

Return values:

  | Err | error code.

Boolean HS_HTTPLibMakeAuthInfo | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_target,
|  | Char * | in_url,
|  | Int32 | in_url_len,
|  | Char * | in_host,
|  | Int32 | in_host_len,
|  | Int32 | in_port,
|  | HS_HTTPLibSplit * | in_realm,
|  | HS_HTTPLibAuthInfo * | out_info |
| ) |  |  |

This function returns the authentication information to the out_info. Before calling this API, the application should intialize HS_HTTPLibAuthInfo by HS_HTTPLibAuthInfoTidy(out_info, true).

After using the authentication information, the application should finalize HS_HTTPLibAuthInfoTidy by HS_HTTPLibAuthInfoTidy(out_info, false).

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.
  | in_target,: | IN: The authentication target. httpAuthTargetPage Authentication Information for Page httpAuthTargetProxy Authentication Information for Proxy
  | *in_url,: | IN: The pointer to the URL (httpAuthTargetPage only).
  | in_url_len,: | IN: The length of in_url.
  | *in_host,: | IN: The pointer to the proxy host name (httpAuthTargetProxy only).
  | in_host_len,: | IN: The length of in_host.
  | in_port,: | IN: The port of proxy (httpAuthTargetProxy only).
  | *in_realm,: | IN: The realm.
  | *out_info,: | OUT: The pointer to the authentication information.

Returns:
  True if setting successful. False if failed (no information in cache or memory shortage).

HS_HTTPLibCertList HS_HTTPLibMakeCertList | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function returns the Server certification used for SSL. The responsibility to delete the return handle is the application. To delete the return value, the application should use HS_HTTPLibCertListDelete.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.

Returns:
  The handle of SSL server certification chain. NULL if no server certification or memory shortage.

HS_HTTPLibString HS_HTTPLibMakeCookiesString | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Char * | in_url,
|  | Int32 | in_urllen,
|  | Boolean | in_secure,
|  | Int32 * | out_len |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | *in_url,: | IN:
  | in_urllen,: | IN:
  | in_secure,: | IN:
  | *out_len,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibMakeProxy | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | HS_HTTPLibFixedString * | out_proxy_host,
|  | Int32 * | out_proxy_http_port,
|  | Int32 * | out_proxy_https_port,
|  | HS_HTTPLibString * | out_no_proxy_hosts |
| ) |  |  |

Set the proxy information of this application to out_proxy_host, out_proxy_http_port, out_proxy_https_port, out_no_proxy_hosts. If out_proxy_host is NULL, the value of *out_proxy_http_port, *out_proxy_https_port, *out_no_proxy_hosts are not set, otherwise the values of *out_proxy_http_port, *out_proxy_https are set. If out_no_proxy_hosts is NULL, *out_no_proxy_hosts is not set. The format of out_no_proxy_hosts is the list separated by “,”. The responsibility of delete *out_proxy_host, *out_no_proxy_hosts is caller.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | *out_proxy_host,: | OUT: The pointer to handle of proxy host string
  | *out_proxy_http_port,: | OUT: The pointer to HTTP port number
  | *out_proxy_https_port,: | OUT: The pointer to HTTPS port number
  | *out_no_proxy_hosts,: | OUT: The pointer to handle of the list string of hosts connect without using proxy server.

Returns:
  None.

Err HS_HTTPLibOpen | ( | UInt16 | refnum | ) |

This function opens the HTTP library and increments the open count. This function will create and initialize the library’s common data at first opening.

Parameters:

  | refnum,: | IN: Library reference number

Returns:
  Error code.

UInt16 HS_HTTPLibOpenCount | ( | UInt16 | refnum | ) |

This function returns the open count of this library.

Parameters:

  | refnum,: | IN: Library reference number

Returns:
  Open count.

void HS_HTTPLibRegisterSSLClass | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | HS_HTTPLibSSLClassPtr | sslClassP |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | sslClassP,: | IN:

Return values:

  | Err | error code.

HS_HTTPLibString HS_HTTPLibSaveCookiesEntries | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 * | out_len |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | *out_len,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibServerCertConfirm | ( | UInt16 | refnum,
|  | HS_HTTPLibSSL | in_ssl,
|  | Int32 | in_verify_result,
|  | Boolean | in_confirm |
| ) |  |  |

This function sets the result of confirmation. This function should be called in the callback function.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_ssl,: | IN: -
  | in_verify_result,: | IN: -
  | in_confirm,: | IN: -

Returns:
  None.

void HS_HTTPLibSetConnectTimeOut | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_msec |
| ) |  |  |

This function sets the limit of Connection timeout. If in_msec is -1, no timeout is set. The condition of timeout is in_msec has passed from TCP connect without HTTP connection established.

With this function the different connection timeouts can be set at library initialization.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | in_msec,: | IN: Time Limit (msec)

Return values:

  | Nothing |

Int32 HS_HTTPLibSetCookie | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | HS_HTTPLibURLString | in_url,
|  | Char * | in_header,
|  | Int32 | in_header_len |
| ) |  |  |

This function sets the Cookie abiding with the confirmation mode set by HS_HTTPLibSetCookieMode. The application should not use this API in callback function. The API HS_HTTPLibSetCookieX is designed for use in callback.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.
  | in_url,: | IN: The handle of URL.
  | *in_header,: | IN: The pointer to the header string.
  | in_header_len,: | IN: The length of in_header.

Returns:
  httpErrorOK Cookie is set. httpErrorNoMem memory shortage httpErrorInval failed by other reason

void HS_HTTPLibSetCookieMax | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_max_total_cookies,
|  | Int32 | in_max_cookies_per_domain,
|  | Int32 | in_max_len_per_cookie |
| ) |  |  |

This function sets the max size of Cookie entries.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.
  | in_max_total_cookies,: | IN: The size of max Cookie entries.
  | in_max_cookies_per_domain,: | IN: The size of Cookie entries per one domain.
  | in_max_len_per_cookie,: | IN: The max size of one Cookie.

Returns:
  None.

void HS_HTTPLibSetCookieMode | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_mode,
|  | HS_HTTPLibCookieConfirmProc | in_cb,
|  | HS_HTTPLibOpaque | in_opaque |
| ) |  |  |

This function sets the Cookie mode.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.
  | in_mode,: | IN: The mode of receiving Cookie. httpCookieNotifyBeforeSet Confirm before Cookie set httpCookieAlwaysSet Cookie is always set httpCookieNeverSet Cookie is not set
  | in_cb,: | IN: The confirm callback function.
  | in_opaque,:,: | IN: The opaque which is given to the callback function.

Returns:
  None.

Int32 HS_HTTPLibSetCookieX | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | HS_HTTPLibURLString | in_url,
|  | Char * | in_header,
|  | Int32 | in_header_len |
| ) |  |  |

This function sets the Cookie. This function is designed for callback confirm function.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.
  | in_url,: | IN: The handle of URL.
  | *in_header,: | IN: The pointer to the header string.
  | in_header_len,: | IN: The length of in_header.

Returns:
  httpErrorOK Cookie is set. httpErrorNoMem memory shortage httpErrorInval failed by other reason

Boolean HS_HTTPLibSetDefaultHeaders | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Char * | in_default_headers,
|  | Int32 | in_default_headers_len |
| ) |  |  |

This function sets the default header, i.e. this string is added to the Request-header of the Request created at HS_HTTPLibStreamCreateRequest. If in_default_headers is NULL, the setting is cleared.

This call allows the application to set the application defined standard headers without having the populate each request with HS_HTTPLibStreamAddHeader.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | *in_default_headers,: | IN: The string of default header
  | in_default_headers_len,: | IN: The length of in_default_headers

Returns:
  True if setting is successful. False if failed. (The main reason is memory shortage.)

void HS_HTTPLibSetDNSMaxRetry | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_retry |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | in_retry,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibSetDNSRetryInterval | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_interval |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | in_interval,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibSetHTTP11OverProxy | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Boolean | in_bool |
| ) |  |  |

This function sets whether this application permits HTTP1.1 over proxy server. If false is set, the application use HTTP/1.0.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | in_bool,: | IN: True if permitting HTTP/1.1 over proxy server False if not permitting HTTP/1.1 over proxy server

Returns:
  None.

void HS_HTTPLibSetHTTPPort | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_port |
| ) |  |  |

This function sets the default HTTP port number. If there is no indication in URL, this port number is used for TCP connection.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | in_port,: | IN: The HTTP port number

Returns:
  None.

void HS_HTTPLibSetHTTPSPort | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_port |
| ) |  |  |

This function sets the default HTTPS port number. If there is no indication in https URL, this port number is used for TCP connection.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | in_port,: | IN: The HTTPS port number

Returns:
  None.

void HS_HTTPLibSetMaxKeepAliveTimeout | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_msec |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | in_msec,:,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibSetMaxRequestBody | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_size |
| ) |  |  |

This function sets the maximal size of Request-Body. If in_size is -1, the maximal size is unlimited.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | in_size,: | IN: The maximal size (byte)

Returns:
  None.

void HS_HTTPLibSetMaxRequestHeader | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_size |
| ) |  |  |

This function sets the maximal size of Request-Line. If in_size is -1, the maximal size is unlimited. Note that this function does not set the maximal size of Request- Header. See RFC2616 for the definitions of Request-Line and Request-Header.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | in_size,: | IN: The maximal size (byte)

Returns:
  None.

void HS_HTTPLibSetNetLibProc | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | UInt16 | netLibRefnum,
|  | HS_HTTPLibNetLibOpenProc | in_open,
|  | HS_HTTPLibNetLibCloseProc | in_close,
|  | HS_HTTPLibNetLibOnlineProc | in_online,
|  | HS_HTTPLibNetLibOfflineProc | in_offline |
| ) |  |  |

This function sets the callback functions concerning NetLib. But for now, there is no call to callback functions from Peer layer.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN:
  | netLibRefnum,: | IN:
  | in_open,: | IN:
  | in_close,: | IN:
  | in_online,: | IN:
  | in_offline,: | IN:

Returns:
  None.

Boolean HS_HTTPLibSetProxy | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Char * | in_proxy_host,
|  | Int32 | in_proxy_host_len,
|  | Int32 | in_proxy_http_port,
|  | Int32 | in_proxy_https_port,
|  | Char * | in_no_proxy_hosts,
|  | Int32 | in_no_proxy_hosts_len |
| ) |  |  |

This function sets the proxy server setting for this application. If in_proxy_host is NULL, in_proxy_host, in_proxy_http_port, in_proxy_https_port are not set. If in_no_proxy_hosts is NULL, in_no_proxy_hosts is not set. The format of in_no_proxy_hosts is comma (“,”) separated list.

This call can be grouped with other proxy setting calls if the application is making the same type of request for all the requests.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | *in_proxy_host,: | IN: The proxy host name
  | in_proxy_host_len,: | IN: The length of in_proxy_host string
  | in_proxy_http_port,: | IN: The HTTP port of proxy server
  | in_proxy_https_port,: | IN: The HTTPS port of proxy server
  | *in_no_proxy_hosts,: | IN: The list of hosts not using proxy
  | in_no_proxy_hosts_len,: | IN: The length of in_no_proxy_hosts

Returns:
  True if setting is succeed. False if failed.(the main reason is memory shortage)

void HS_HTTPLibSetReqTimeOut | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_msec |
| ) |  |  |

This function sets the limit of sending Request timeout. If in_msec is -1, no timeout is set. The condition of timeout is in_msec has passed from the start of Request sending without sending done.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | in_msec,: | IN: Time Limit (msec)

Returns:
  None.

void HS_HTTPLibSetRspTimeOut | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_msec |
| ) |  |  |

This function sets the limit of receiving Response timeout. If in_msec is -1, no timeout is set. The condition of timeout is in_msec has passed from the end of sending request without receiving Response. Or in_msec has passed from the last receiving a part of Response without receiving any part of Response.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | in_msec,: | IN: Time Limit (msec)

Return values:

  | Nothing |

void HS_HTTPLibSetSendCookie | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Boolean | in_bool |
| ) |  |  |

This function sets whether this application sends Cookie.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | in_bool,: | IN: True if sending Cookie False if not sending Cookie

Returns:
  None.

void HS_HTTPLibSetSendProxyKeepAlive | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Boolean | in_bool |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | in_bool,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibSetSendReferer | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Boolean | in_bool |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | in_bool,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibSetSSLClientCertSelectProc | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | HS_HTTPLibClientCertSelectProc | in_cb,
|  | HS_HTTPLibOpaque | in_opaque |
| ) |  |  |

This function sets the client certification select callback function.For now, there is no corresponding function in SSL library, the callback will not be called.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: -
  | in_cb,: | IN: -
  | in_opaque,: | IN: -

Returns:
  None.

void HS_HTTPLibSetSSLServerCertConfirmProc | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | HS_HTTPLibServerCertConfirmProc | in_cb,
|  | HS_HTTPLibOpaque | in_opaque |
| ) |  |  |

This function sets the server certificate callback function for this application.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: -
  | in_cb,: | IN: -
  | in_opaque,: | IN: -

Returns:
  Nothing

void HS_HTTPLibSetSSLVersionFlag | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_flag,
|  | Boolean | in_on |
| ) |  |  |

Set the SSL version.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.
  | in_flag,: | IN: -
  | in_on,: | IN: -

Returns:
  None.

void HS_HTTPLibSetTunnelingCallback | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | HS_HTTPLibTunnelingCallbackProc | in_cb,
|  | void * | in_aux |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | in_cb,: | IN:
  | *in_aux,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibSetUseProxy | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Boolean | in_bool |
| ) |  |  |

This function sets whether this application uses proxy server.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | in_bool,: | IN: True if using proxy server. False if not using proxy server.

Returns:
  None.

Boolean HS_HTTPLibSetUserAgent | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Char * | in_useragent,
|  | Int32 | in_useragent_len |
| ) |  |  |

This function sets the UserAgent string for the application. If in_useragent is NULL, setting is cleared.

This call allows the application to set the user agent identfication in the requests.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance
  | *in_useragent,: | IN: The string of User Agent
  | in_useragent_len,: | IN: The length of in_useragent

Returns:
  True if setting is successful. False if failed.(The main reason is memory shortage.)

Boolean HS_HTTPLibSetUseragentSelectionRule | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | HttpUASelectionRule * | rules,
|  | Int32 | len |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | *rules,: | IN:
  | len,: | IN:

Return values:

  | Err | error code.

Boolean HS_HTTPLibSetUserPass | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_type,
|  | Int32 | in_target,
|  | HS_HTTPLibSplit * | in_challenge,
|  | HS_HTTPLibSplit * | in_realm,
|  | Char * | in_user,
|  | Int32 | in_user_len,
|  | Char * | in_pass,
|  | Int32 | in_pass_len,
|  | Char * | in_url,
|  | Int32 | in_url_len,
|  | Char * | in_host,
|  | Int32 | in_host_len,
|  | Int32 | in_port |
| ) |  |  |

This function sets the authentication information.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.
  | in_type,: | IN: The authentication type. httpAuthTypeBasic Basic authentication httpAuthTypeDigest Digest Authentication
  | in_target,: | IN: The authentication target. httpAuthTargetPage Authentication Information for Page httpAuthTargetProxy Authentication Information for Proxy
  | *in_challenge,: | IN: The challenge.
  | *in_realm,: | IN: The realm.
  | *in_user,: | IN: The pointer to the User ID.
  | in_user_len,: | IN: The length of in_user.
  | *in_pass,: | IN: The pointer to the Password.
  | in_pass_len,: | IN: The length of in_pass.
  | *in_url,: | IN: The pointer to the URL (httpAuthTargetPage only).
  | in_url_len,: | IN: The length of in_url.
  | *in_host,: | IN: The pointer to the proxy host name (httpAuthTargetProxy only).
  | in_host_len,: | IN: The length of in_host.
  | in_port,: | IN: The port of proxy (httpAuthTargetProxy only).

Returns:
  True if setting successful. False if failed (memory shortage).

Boolean HS_HTTPLibSetUserPassX | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | Int32 | in_type,
|  | Int32 | in_target,
|  | HS_HTTPLibSplit * | in_challenge,
|  | HS_HTTPLibSplit * | in_realm,
|  | Char * | in_user,
|  | Int32 | in_user_len,
|  | Char * | in_pass,
|  | Int32 | in_pass_len,
|  | Char * | in_url,
|  | Int32 | in_url_len,
|  | Char * | in_host,
|  | Int32 | in_host_len,
|  | Int32 | in_port,
|  | Boolean | in_keep_user,
|  | Boolean | in_keep_pass |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | in_type,: | IN:
  | in_target,: | IN:
  | *in_challenge,: | IN:
  | *in_realm,: | IN:
  | *in_user,: | IN:
  | in_user_len,: | IN:
  | *in_pass,: | IN:
  | in_pass_len,: | IN:
  | *in_url,: | IN:
  | in_url_len,: | IN:
  | *in_host,: | IN:
  | in_host_len,: | IN:
  | in_port,: | IN:
  | in_keep_user,: | IN:
  | in_keep_pass,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibSetWakeUpCallback | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | HS_HTTPLibWakeUpCallbackProc | in_proc,
|  | HS_HTTPLibOpaque | in_opaque |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:
  | in_proc,: | IN:
  | in_opaque,: | IN:

Return values:

  | Err | error code.

Err HS_HTTPLibSleep | ( | UInt16 | refnum | ) |

Standard library sleep function.

Parameters:

  | refnum,: | IN: Library reference number

Returns:
  Error code.

HS_HTTPLibSSLClassPtr HS_HTTPLibSSLClass | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | libH,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibSSLCloseCertDB | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.

Returns:
  None.

Int32 HS_HTTPLibSSLOpenCertDB | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH,
|  | HS_HTTPLibCertList * | out_list |
| ) |  |  |

TBD.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.
  | *out_list,: | OUT: -

Return values:

  | Int32 |

Int32 HS_HTTPLibSSLTimeout | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

Set the timeout period for SSL use.

Parameters:

  | refnum,: | IN: Library reference number.
  | libH,: | IN: The handle of HTTP library instance.

Returns:
  Timeout.

Boolean HS_HTTPLibStreamAddHeader | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Int32 | in_type,
|  | Char * | in_str,
|  | Int32 | in_len |
| ) |  |  |

This function sets the value of corresponding header. If there is already the same kind of header line, old one is deleted.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.
  | in_type,: | IN: The type of header (See httpHeaderIDEnum).
  | *in_str,: | IN: The pointer to the header value string.
  | in_len,: | IN: The length of in_str.

Returns:
  True if successful False failed (memory shortage)

Boolean HS_HTTPLibStreamAddHeaderLine | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Char * | in_str,
|  | Int32 | in_len |
| ) |  |  |

This function adds the line to the Request header. If there is already the same kind of header line, old one is deleted.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.
  | *in_str,: | IN: The pointer to the header strong to add.
  | in_len,: | IN: The length of in_str.

Returns:
  True if successful. False failed (memory shortage)

void HS_HTTPLibStreamClose | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function closes the HTTP stream. If the TCP/SSL socket is in keep-alive, it is not closed.

Parameters:

  | refnum,: | IN: Library reference number
  | stream,: | IN: The handle of stream instance.

Returns:
  None.

Int32 HS_HTTPLibStreamCreateRequest | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Int32 | in_method,
|  | Char * | in_url,
|  | UInt32 | in_url_len,
|  | Char * | in_header,
|  | UInt32 | in_header_len,
|  | Char * | in_referer,
|  | UInt32 | in_referer_len,
|  | Int32 | in_version,
|  | Boolean | in_no_cache,
|  | Boolean | in_pipeline,
|  | Int32 | in_ssl_flag |
| ) |  |  |

This function creates a request. If using proxy and SSL connection, CONNECT request message is made. If there are cached authenticate informations, add authenticate header. Add default headers and in_header to Request-Header.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.
  | in_method,: | IN: The HTTP method httpMethodGET GET httpMethodPOST POST
  | *in_url,: | IN: The URL string.
  | in_url_len,: | IN: The length of in_url.
  | *in_header,: | IN: The header string to add the Request-Header. Each line is terminated by <CR><LF>.
  | in_header_len,: | IN: The length of in_header.
  | *in_referer,: | IN: The referer string.
  | in_referer_len,: | IN: The length of in_referer.
  | in_version,: | IN: The version httpVersion_0_9 HTTP/0.9 httpVersion_1_0 HTTP/1.0 httpVersion_1_1 HTTP/1.1
  | in_no_cache,: | IN: True if no-cache is added to the header False if no-cache is not added to the header
  | in_pipeline,: | IN: True if doing pipeline False if not doing pipeline
  | in_ssl_flag,: | IN: The flag sent to SSL instance. httpSSLFlagConnV2 connect by v2 protocol httpSSLFlagConnV3 connect by v3 protocol httpSSLFlagConnTLS connect by TLS(v3.1) protocol httpSSLFlagConnV2V3 autoselect within v2,v3 httpSSLFlagConnV2TLS autoselect within v2,tls httpSSLFlagConnV3TLS autoselect within v3,tls httpSSLFlagConnV2V3TLS autoselect within v2,v3,tls

Returns:
  httpErrorOK succeed httpErrorNoMem memory shortage httpErrorReqHeaderSizeOver if Request header size is over the maximal setting. If the Request-Line size is set to unlimited, httpErrorReqHeaderSizeOver is not returned.

Int32 HS_HTTPLibStreamCreateRequestWithChunkEncoding | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Int32 | in_method,
|  | Char * | in_url,
|  | UInt32 | in_url_len,
|  | Char * | in_header,
|  | UInt32 | in_header_len,
|  | Char * | in_referer,
|  | UInt32 | in_referer_len,
|  | Int32 | in_version,
|  | Boolean | in_no_cache,
|  | Boolean | in_pipeline,
|  | Int32 | in_ssl_flag |
| ) |  |  |

This function creates request for chunk-encoding post. If using proxy and SSL connection, CONNECT request message is made. If there are cached authenticate informations, add authenticate header. Add default headers and in_header to Request-Header. Do not use this API unless you want to create chunk-encoding request. Transfer- Encoding: chunked is added to the request header.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.
  | in_method,: | IN: The HTTP method httpMethodGET GET httpMethodPOST POST
  | *in_url,: | IN: The URL string.
  | in_url_len,: | IN: The length of in_url.
  | *in_header,: | IN: The header string to add the Request-Header. Each line is terminated by <CR><LF>.
  | in_header_len,: | IN: The length of in_header.
  | *in_referer,: | IN: The referer string.
  | in_referer_len,: | IN: The length of in_referer.
  | in_version,: | IN: The version httpVersion_0_9 HTTP/0.9 httpVersion_1_0 HTTP/1.0 httpVersion_1_1 HTTP/1.1
  | in_no_cache,: | IN: True if no-cache is added to the header False if no-cache is not added to the header
  | in_pipeline,: | IN: True if doing pipeline False if not doing pipeline
  | in_ssl_flag,: | IN: The flag sent to SSL instance. httpSSLFlagConnV2 connect by v2 protocol httpSSLFlagConnV3 connect by v3 protocol httpSSLFlagConnTLS connect by TLS(v3.1) protocol httpSSLFlagConnV2V3 autoselect within v2,v3 httpSSLFlagConnV2TLS autoselect within v2,tls httpSSLFlagConnV3TLS autoselect within v3,tls httpSSLFlagConnV2V3TLS autoselect within v2,v3,tls

Returns:
  httpErrorOK succeed httpErrorNoMem memory shortage httpErrorReqHeaderSizeOver if the Request header size is over the maximal setting. If the Request-Line size is set to unlimited, httpErrorReqHeaderSizeOver is not returned.

void HS_HTTPLibStreamDelete | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function deletes the stream instance. If this function is called without calling HS_HTTPLibStreamClose, this function closes the TCP/SSL socket by calling HS_HTTPLibStreamClose, however if the socket is in keep-alive, it is not closed.

Parameters:

  | refnum,: | IN: Library reference number
  | stream,: | IN: The handle of stream instance.

Returns:
  None.

Int32 HS_HTTPLibStreamGetContentLength | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function returns the content’s size (byte).

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.

Returns:
  The Content-Length (byte) -1 if not received

Int32 HS_HTTPLibStreamGetEntityLength | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function returns the size of response body (byte).

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.

Returns:
  The size of response body (byte) -1 if not received

Int32 HS_HTTPLibStreamGetFlag | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | stream,: | IN:

Return values:

  | Err | error code.

Boolean HS_HTTPLibStreamGetHeader | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Int32 | in_type,
|  | Int32 * | out_off,
|  | Int32 * | out_len |
| ) |  |  |

This function returns the offset and length of corresponding header value.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.
  | in_type,: | IN: The type of header (See httpHeaderIDEnum).
  | *out_off,: | IN: The offset to the header value.
  | *out_len,: | IN: The length of corresponding header value.

Returns:
  True if successful False there is no corresponding header

Boolean HS_HTTPLibStreamGetHeaderWithOffset | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Int32 | in_type,
|  | Int32 | in_ofs,
|  | Int32 * | out_off,
|  | Int32 * | out_len |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | stream,: | IN:
  | in_type | IN:
  | in_ofs,: | IN:
  | *out_off,: | IN:
  | *out_len,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibStreamGetRequestSent | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Int32 * | out_total,
|  | Int32 * | out_sent |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | stream,: | IN:
  | *out_total,: | IN:
  | *out_sent,: | IN:

Return values:

  | Err | error code.

HS_HTTPLibVHandle HS_HTTPLibStreamGetResponseHeader | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function returns the handle of the response header. The responsibility to delete the handle is library, the application can not delete this return value. To lock/unlock the handle, the application should use the APIs,.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.

Returns:
  non NULL the handle of header NULL if not received

Int32 HS_HTTPLibStreamGetResponseHeaderLength | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function returns the size of the response header.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.

Returns:
  header size (byte) -1 if not received

Int32 HS_HTTPLibStreamGetScheme | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function returns the scheme given at the HS_HTTPLibStreamCreateRequest.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.

Returns:
  httpSchemeHTTP HTTP httpSchemeHTTPS HTTPS

Int32 HS_HTTPLibStreamGetState | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function returns the state of the stream. The state changes follow the below sequence (but skipping the states that are not relevant to the current request).

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.

Returns:
  httpStreamStateNew The instance is created httpStreamStateDormant The instance is dormant httpStreamStateReqCreated The request is created httpStreamStateReqResolve Name resolve begins httpStreamStateReqResolving Name resolving httpStreamStateReqOpen TCP/SSL open httpStreamStateReqConnect TCP connect begins httpStreamStateReqConnecting TCP connecting httpStreamStateReqProxyConnect Proxy Tunneling begins httpStreamStateReqProxyConnecting Proxy Tunneling httpStreamStateReqSSLHandShaking SSL HandShaking httpStreamStateReqSSLHandShaked SSL handShake done httpStreamStateReqSending Sending the request httpStreamStateReqSent Sending the request done httpStreamStateRspHeaderWaiting Waiting the response header httpStreamStateRspContinue Waiting response receiving done for Status-Code 100 httpStreamStateRspHeaderReceiving Receiving the response header httpStreamStateRspHeaderReceived Receiving the response header done httpStreamStateRspEntityReceiving Receiving the response body

Int32 HS_HTTPLibStreamGetStatusCode | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function returns the Status Code.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.

Returns:
  httpStatusCodeContinue 100 httpStatusCodeSwitchingProtocols 101 httpStatusCodeOK 200 httpStatusCodeCreated 201 httpStatusCodeAccepted 202 httpStatusCodeNonAuthoritativeInformation 203 httpStatusCodeNoContent 204 httpStatusCodeResetContent 205 httpStatusCodePartialContent 206 httpStatusCodeMultipleChoices 300 httpStatusCodeMovedPermanently 301 httpStatusCodeFound 302 httpStatusCodeSeeOther 303 httpStatusCodeNotModified 304 httpStatusCodeUseProxy 305 httpStatusCodeTemporaryRedirect 307 httpStatusCodeBadRequest 400

Boolean HS_HTTPLibStreamIsHeaderReceived | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

This function returns whether the response header is completely received.

This function is typically called after HS_HTTPLibStreamReceiveResponse when receiving the response header.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.

Returns:
  True if header is completely received. False if header is not received.

HS_HTTPLibStream HS_HTTPLibStreamNew | ( | UInt16 | refnum,
|  | HS_HTTPLibHandle | libH |
| ) |  |  |

This function creates a new stream and returns the handle of stream instance. At this time, TCP/SSL socket is not opened.

Parameters:

  | refnum,: | IN: Library reference number
  | libH,: | IN: The handle of HTTP library instance

Returns:
  non NULL if successful. NULL if failed (the main reason is memory shortage).

Int32 HS_HTTPLibStreamReceiveResponse | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Char * | out_buf,
|  | Int32 | in_len,
|  | Int32 * | out_len,
|  | Int32 * | out_sleep |
| ) |  |  |

This function receives response. It automatically retries at where pipeline stalled if pipeline is enable.

Because the data streaming could block and resume at where the pipeline was stalled, the application can call this function in a loop until the receiving is finished.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.
  | *out_buf,: | OUT: The pointer to the receive buffer.
  | in_len,: | IN: The size of the receive buffer (byte).
  | *out_len,: | OUT: The received size (byte).
  | *out_sleep,: | OUT: The time of the application can sleep (msec) This value is not used for application.

Returns:
  httpErrorOK receiving done httpErrorWouldBlock application can call this function consecutively httpErrorIOSleep application can sleep httpErrorNoMem memory shortage httpErrorTCPRead cannot read TCP httpErrorTCPWrite cannot write TCP httpErrorSSLHandShake cannot SSL handshake httpErrorSSLRead cannot read SSL httpErrorSSLWrite cannot write SSL httpErrorReqTimedout request timeout httpErrorRspTimedout response timeout httpErrorAuthUnknown unknown authentication type httpErrorAuthNoHeader authentication request without authentication header httpErrorAuthFormat wrong format of authentication header httpErrorRedirectFormat wrong format of redirect header httpErrorRedirectCanceled redirect is canceled by user httpErrorRspHeaderSizeOver size over of response header httpErrorReqTooManyContinue it exceeds the limit times of Continue

void HS_HTTPLibStreamResumeTimer | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | stream,: | IN:

Return values:

  | Err | error code.

Int32 HS_HTTPLibStreamSendRequest | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Int32 * | out_sleep |
| ) |  |  |

This function sends the request. This call opens and connects a TCP connection if not already established. It automatically retries at where pipeline stalled if pipeline is enable.

Because the data streaming could block and resume at where the pipeline was stalled, the application can call this function in a loop until the sending is finished.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.
  | *out_sleep,: | OUT: The time of the application can sleep (msec). This value is not used for application.

Returns:
  httpErrorOK sending done httpErrorWouldBlock application can call this function consecutively httpErrorIOSleep application can sleep httpErrorNoMem memory shortage httpErrorDNSInval DNS message invalid httpErrorDNSNoServer DNS server is not found httpErrorDNSTimedout Timeout at DNS resolve httpErrorDNSNotFound DNS server can not find the name httpErrorTCPOpen cannot open TCP httpErrorTCPConnec cannot connect TCP httpErrorTCPRead cannot read TCP httpErrorTCPWrite cannot write TCP httpErrorSSLConnect cannot Proxy Tunneling httpErrorSSLHandShake cannot SSL handshake httpErrorSSLRead cannot SSL read httpErrorSSLWrite cannot SSL write httpErrorReqTimedout request timeout httpErrorRspTimedout response timeout at Proxy Tunneling (SSL only)

Int32 HS_HTTPLibStreamSendRequestWithChunkEncoding | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Char * | in_buf,
|  | Int32 | in_offset,
|  | Int32 | in_len,
|  | Boolean | isFinish,
|  | Int32 * | out_len,
|  | Int32 * | out_sleep |
| ) |  |  |

This function sends chunk encoding data. This call opens and connects a TCP connection if not already established. It automatically retries at where pipeline stalled if pipeline is enable. The sequence of chunked data sending is 1. call HS_HTTPLibStreamCreateRequestWithChunkEncoding() 2. call HS_HTTPLibStreamSendRequestWithChunkEncoding() while return value is not httpErrorOK or error. 3. If there remains data, goto 2. 4. end If only one chunked data is sent, this API returns httpErrorOK. The address of data for one chunk is in_buf + in_offset, this value should not be changed while sending only one chunked data. isFinish is used to indicate the chunked data is the last chunk.

Parameters:

  | refnum,: | IN: Library reference number
  | stream,: | IN: The handle of stream instance.
  | *in_buf,: | IN: The pointer to POST data.
  | in_offset,: | IN: The offset to POST data.
  | in_len,: | IN: The length of in_buf.
  | isFinish,: | IN: True if the send data is the last chunk. False if send data is not the last chunk.
  | *out_len,: | OUT: The size of sending data at this time (byte).
  | *out_sleep,: | OUT: The time of the application can sleep (msec) This value is not used for application.

Returns:
  httpErrorOK sending done httpErrorWouldBlock application can call this function consecutively httpErrorIOSleep application can sleep httpErrorNoMem memory shortage httpErrorDNSInval DNS message invalid httpErrorDNSNoServer DNS server is not found httpErrorDNSTimedout Timeout at DNS resolve httpErrorDNSNotFound DNS server can not find the name httpErrorTCPOpen cannot open TCP httpErrorTCPConnec cannot connect TCP httpErrorTCPRead cannot read TCP httpErrorTCPWrite cannot write TCP httpErrorSSLConnect cannot Proxy Tunneling httpErrorSSLHandShake cannot SSL handshake httpErrorSSLRead cannot read SSL httpErrorSSLWrite cannot write SSL httpErrorReqTimedout request timeout httpErrorRspTimedout response timeout at Proxy Tunneling (SSL only)

Int32 HS_HTTPLibStreamSendRequestWithPostData | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Char * | in_buf,
|  | Int32 | in_len,
|  | Int32 * | out_len,
|  | Int32 * | out_sleep |
| ) |  |  |

This function sends the POST request. This call opens and connects a TCP connection if not already established. It automatically retries at where pipeline stalled if pipeline is enable.

Because the data streaming could block and resume at where the pipeline was stalled, the application can call this function in a loop until the sending is finished.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.
  | *in_buf,: | IN: The pointer to POST data.
  | in_len,: | IN: The length of in_buf.
  | *out_len,: | OUT: The size of sending data at this time (byte).
  | *out_sleep,: | OUT: The time of the application can sleep (msec) This value is not used for application.

Returns:
  httpErrorOK sending done httpErrorWouldBlock application can call this function consecutively httpErrorIOSleep application can sleep httpErrorNoMem memory shortage httpErrorDNSInval DNS message invalid

Int32 HS_HTTPLibStreamSetPostData | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream,
|  | Int32 | in_encoding,
|  | Char * | in_data,
|  | Int32 | in_len |
| ) |  |  |

This function sets the POST data.

Parameters:

  | refnum,: | IN: Library reference number.
  | stream,: | IN: The handle of stream instance.
  | in_encoding,: | IN: The type of encoding. httpPostURLENCODED URL encoding httpPostPLAINTEXT plain text (non encoding) httpPostMULTIPART multi-part encoding
  | *in_data,: | IN: The pointer to the POST data.
  | in_len,: | IN: The length of in_data.

Returns:
  httpErrorOK setting done httpErrorNoMem memory shortage httpErrorReqBodySizeOver the size of request body exceeds limit. If the application does not set the limit by HS_HTTPLibSetMaxRequestBody, httpErrorReqBodySizeOver is not returned.

void HS_HTTPLibStreamSuspendTimer | ( | UInt16 | refnum,
|  | HS_HTTPLibStream | stream |
| ) |  |  |

Parameters:

  | refnum,: | IN:

Parameters:

  | stream,: | IN:

Return values:

  | Err | error code.

void HS_HTTPLibString_Delete | ( | UInt16 | refnum,
|  | HS_HTTPLibString | in_str |
| ) |  |  |

This function deletes the handle of type HS_HTTPLibString.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | Nothing |

Int32 HS_HTTPLibString_Length | ( | UInt16 | refnum,
|  | HS_HTTPLibString | in_str |
| ) |  |  |

This function returns the length of the handle (byte).

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | Int32 |

void* HS_HTTPLibString_Lock | ( | UInt16 | refnum,
|  | HS_HTTPLibString | in_str |
| ) |  |  |

This function locks the handle of type HS_HTTPLibString.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | void | *

void HS_HTTPLibString_Unlock | ( | UInt16 | refnum,
|  | HS_HTTPLibString | in_str |
| ) |  |  |

This function unlocks the handle of type HS_HTTPLibString.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | Nothing |

HS_HTTPLibString HS_HTTPLibStringNew | ( | UInt16 | refnum,
|  | Char * | in_str,
|  | Int32 | in_len |
| ) |  |  |

This function creates a new handle of type HS_HTTPLibString.

Parameters:

  | refnum,: | IN: Library reference number.
  | *in_str,: | IN: The pointer to the string.
  | in_len,: | IN: The length of in_str.

Return values:

  | HS_HTTPLibString |

void HS_HTTPLibURLString_Delete | ( | UInt16 | refnum,
|  | HS_HTTPLibURLString | in_str |
| ) |  |  |

This function deletes the handle of type HS_HTTPLibURLString.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | nothing |

Int32 HS_HTTPLibURLString_Length | ( | UInt16 | refnum,
|  | HS_HTTPLibURLString | in_str |
| ) |  |  |

This function returns the length of the handle (byte).

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | Int32 |

void* HS_HTTPLibURLString_Lock | ( | UInt16 | refnum,
|  | HS_HTTPLibURLString | in_str |
| ) |  |  |

This function locks the handle of type HS_HTTPLibURLString.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | void | *

void HS_HTTPLibURLString_Unlock | ( | UInt16 | refnum,
|  | HS_HTTPLibURLString | in_str |
| ) |  |  |

This function unlocks the handle of type HS_HTTPLibURLString.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_str,: | IN: The handle.

Return values:

  | nothing |

HS_HTTPLibURLString HS_HTTPLibURLStringNew | ( | UInt16 | refnum,
|  | Char * | in_str,
|  | Int32 | in_len |
| ) |  |  |

This function creates a new handle of type HS_HTTPLibURLString.

Parameters:

  | refnum,: | IN: Library reference number.
  | *in_str,: | IN: The pointer to the string.
  | in_len,: | IN: The length of in_str.

Return values:

  | HS_HTTPLibURLString |

void HS_HTTPLibVHandle_Delete | ( | UInt16 | refnum,
|  | HS_HTTPLibVHandle | in_vhandle |
| ) |  |  |

This function deletes the handle of type HS_HTTPLibVHandle.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_vhandle,: | IN: The handle.

Return values:

  | Nothing |

Int32 HS_HTTPLibVHandle_Length | ( | UInt16 | refnum,
|  | HS_HTTPLibVHandle | in_vhandle |
| ) |  |  |

This function returns the length of the handle (byte).

Parameters:

  | refnum,: | IN: Library reference number.
  | in_vhandle,: | IN: The handle.

Return values:

  | Int32 |

void* HS_HTTPLibVHandle_Lock | ( | UInt16 | refnum,
|  | HS_HTTPLibVHandle | in_vhandle |
| ) |  |  |

This function locks the handle of type HS_HTTPLibVHandle.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_vhandle,: | IN: The handle.

Return values:

  | void | *

void HS_HTTPLibVHandle_Unlock | ( | UInt16 | refnum,
|  | HS_HTTPLibVHandle | in_vhandle |
| ) |  |  |

This function unlocks the handle of type HS_HTTPLibVHandle.

Parameters:

  | refnum,: | IN: Library reference number.
  | in_vhandle,: | IN: The handle.

Return values:

  | Nothing |

Err HS_HTTPLibWake | ( | UInt16 | refnum | ) |

Standard library wake function.

Parameters:

  | refnum,: | IN: Library reference number

Returns:
  Error code.

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:59 2008 for Palm API Guide