|
API Guide Home (Online version only) |
![]() |
Definition in file HS_HTTPLib68K.h.
Include dependency graph for HS_HTTPLib68K.h:

Go to the source code of this file.
| 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.
| 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.
Definition at line 86 of file HS_HTTPLib68K.h.
00086 { 00087 httpUASelectTypeHost, /**< */ 00088 httpUASelectTypePath /**< */ 00089 };
| Boolean HS_HTTPLibAuthCacheGetChallengeTokenSS | ( | UInt16 | refnum, | |
| HS_HTTPLibSplit * | in_challenge_ss, | |||
| Char * | in_token, | |||
| HS_HTTPLibSplit * | out_ss | |||
| ) |
| refnum,: | IN: |
| *in_challenge_ss,: | IN: | |
| *in_token,: | IN: | |
| *out_ss,: | IN: |
| 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.
| refnum,: | IN: Library reference number. | |
| *in_info,: | IN: The pointer to the authentication information. |
| HS_HTTPLibString HS_HTTPLibAuthInfoRealm | ( | UInt16 | refnum, | |
| HS_HTTPLibAuthInfo * | in_info | |||
| ) |
This function returns the Realm. The application should not delete this return value.
| refnum,: | IN: Library reference number. | |
| *in_info,: | IN: The pointer to the authentication information. |
| 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.
| 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. |
| HS_HTTPLibString HS_HTTPLibAuthInfoUser | ( | UInt16 | refnum, | |
| HS_HTTPLibAuthInfo * | in_info | |||
| ) |
This function returns the User Name. The application should not delete this return value.
| refnum,: | IN: Library reference number. | |
| *in_info,: | IN: The pointer to the authentication information. |
| Boolean HS_HTTPLibCertBeginPeekIssuerRDN | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert, | |||
| Int32 | in_attr | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: | |
| in_attr,: | IN: |
| Err | error code. |
| Boolean HS_HTTPLibCertBeginPeekSubjectRDN | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert, | |||
| Int32 | in_attr | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: | |
| in_attr,: | IN: |
| Err | error code. |
| void HS_HTTPLibCertEndPeekIssuerRDN | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: |
| Err | error code. |
| void HS_HTTPLibCertEndPeekSubjectRDN | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: |
| Err | error code. |
| Int32 HS_HTTPLibCertListBeginDecode | ( | UInt16 | refnum, | |
| HS_HTTPLibCertList | in_list, | |||
| Int32 | in_index, | |||
| HS_HTTPLibCertPtr * | out_cert | |||
| ) |
TBD.
| refnum,: | IN: Library reference number. | |
| in_list,: | IN: The handle of the server’s certification list. | |
| in_index,: | IN: - | |
| *out_cert,: | OUT: - |
| Int32 |
| HS_HTTPLibCertList HS_HTTPLibCertListClone | ( | UInt16 | refnum, | |
| HS_HTTPLibCertList | in_list | |||
| ) |
TBD.
| refnum,: | IN: Library reference number. | |
| in_list,: | IN: The handle of the server’s certification list. |
| void HS_HTTPLibCertListDelete | ( | UInt16 | refnum, | |
| HS_HTTPLibCertList | in_list | |||
| ) |
TBD.
| refnum,: | IN: Library reference number. | |
| in_list,: | IN: The handle of the server’s certification list. |
| void HS_HTTPLibCertListEndDecode | ( | UInt16 | refnum, | |
| HS_HTTPLibCertList | in_list, | |||
| HS_HTTPLibCertPtr | in_cert | |||
| ) |
TBD.
| refnum,: | IN: Library reference number. | |
| in_list,: | IN: The handle of the server’s certification list. | |
| in_cert,: | IN: - |
| 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.
| refnum,: | IN: Library reference number. | |
| *iself,: | IN: - |
| nothing |
| Int32 HS_HTTPLibCertListImportCert | ( | UInt16 | refnum, | |
| HS_HTTPLibCertList | in_list, | |||
| void * | in_info, | |||
| Boolean | in_over_write | |||
| ) |
TBD.
| refnum,: | IN: Library reference number. | |
| in_list,: | IN: The handle of the server’s certification list. | |
| *in_info,: | IN: - | |
| in_over_write,: | IN: - |
| Int32 |
| Int32 HS_HTTPLibCertListLength | ( | UInt16 | refnum, | |
| HS_HTTPLibCertList | in_list | |||
| ) |
TBD.
| refnum,: | IN: Library reference number. | |
| in_list,: | IN: The handle of the server’s certification list. |
| Int32 |
| void* HS_HTTPLibCertListLock | ( | UInt16 | refnum, | |
| HS_HTTPLibCertList | in_list | |||
| ) |
Lock the certificate list and return its pointer.
| refnum,: | IN: Library reference number. | |
| in_list,: | IN: The handle of the server's certification list. |
| HS_HTTPLibCertList HS_HTTPLibCertListNew | ( | UInt16 | refnum, | |
| Int32 | in_type | |||
| ) |
| refnum,: | IN: |
| in_type,: | IN: |
| Int32 HS_HTTPLibCertListType | ( | UInt16 | refnum, | |
| HS_HTTPLibCertList | in_list | |||
| ) |
TBD.
| refnum,: | IN: Library reference number. | |
| in_list,: | IN: The handle of the server’s certification list. |
| Int32 |
| void HS_HTTPLibCertListUnlock | ( | UInt16 | refnum, | |
| HS_HTTPLibCertList | in_list | |||
| ) |
Unlock the certificate list.
| refnum,: | IN: Library reference number. | |
| in_list,: | IN: The handle of the server’s certification list. |
| Int32 HS_HTTPLibCertPeekIssuerRDN | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert, | |||
| Char ** | out_str | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: | |
| **out_str,: | IN: |
| Err | error code. |
| Int32 HS_HTTPLibCertPeekIssuerRDNStrType | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: |
| Err | error code. |
| Int32 HS_HTTPLibCertPeekRSAPublicKeyBits | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: |
| Err | error code. |
| Int32 HS_HTTPLibCertPeekSerialNumber | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert, | |||
| Char ** | out_str | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: | |
| **out_str,: | IN: |
| Err | error code. |
| Int32 HS_HTTPLibCertPeekSignAlgo | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: |
| Err | error code. |
| Int32 HS_HTTPLibCertPeekSubjectRDN | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert, | |||
| Char ** | out_str | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: | |
| **out_str,: | IN: |
| Err | error code. |
| Int32 HS_HTTPLibCertPeekSubjectRDNStrType | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: |
| Err | error code. |
| void HS_HTTPLibCertPeekValidityEnd | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert, | |||
| HS_HTTPLibTime * | in_time | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: | |
| *in_time,: | IN: |
| Err | error code. |
| void HS_HTTPLibCertPeekValidityStart | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert, | |||
| HS_HTTPLibTime * | in_time | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: | |
| *in_time,: | IN: |
| Err | error code. |
| Int32 HS_HTTPLibCertPeekVersion | ( | UInt16 | refnum, | |
| HS_HTTPLibCertPtr | in_cert | |||
| ) |
| refnum,: | IN: |
| in_cert,: | IN: |
| Err | error code. |
| void HS_HTTPLibClearDNSCache | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH | |||
| ) |
This function clears the DNS cache information.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance |
| HS_HTTPLibClientCertList HS_HTTPLibClientCertListClone | ( | UInt16 | refnum, | |
| HS_HTTPLibClientCertList | in_list | |||
| ) |
TBD.
| refnum,: | IN: | |
| in_list,: | IN: |
| HS_HTTPLibClientCertList |
| void HS_HTTPLibClientCertListDelete | ( | UInt16 | refnum, | |
| HS_HTTPLibClientCertList | in_list | |||
| ) |
| refnum,: | IN: |
| in_list,: | IN: |
| nothing |
| Boolean HS_HTTPLibClientCertListIsValid | ( | UInt16 | refnum, | |
| HS_HTTPLibClientCertList | in_list, | |||
| Int32 | in_index | |||
| ) |
TBD.
| refnum,: | IN: | |
| in_list,: | IN: | |
| in_index,: | IN: |
| Boolean |
| Int32 HS_HTTPLibClientCertListLength | ( | UInt16 | refnum, | |
| HS_HTTPLibClientCertList | in_list | |||
| ) |
TBD.
| refnum,: | IN: | |
| in_list,: | IN: |
| Nothing |
| HS_HTTPLibClientCertList HS_HTTPLibClientCertListNew | ( | UInt16 | refnum | ) |
| refnum,: | IN: |
| Err | error code. |
| void HS_HTTPLibClientCertListSetValid | ( | UInt16 | refnum, | |
| HS_HTTPLibClientCertList | in_list, | |||
| Int32 | in_index, | |||
| Boolean | in_valid | |||
| ) |
TBD.
| refnum,: | IN: | |
| in_list,: | IN: | |
| in_index,: | IN: | |
| in_valid,: | IN: |
| 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.
| refnum,: | IN: Library reference number. | |
| in_ssl,: | IN: - | |
| in_index,: | IN: - |
This function decrements open count and finalizes the library’s common data at the last close.
| refnum,: | IN: Library reference number | |
| usecountP,: | OUT: Open count |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance |
| void HS_HTTPLibCookieMakeEmpty | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Int32 | in_flag | |||
| ) |
This function clears Cookies.
| 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 |
| void HS_HTTPLibDataHandle_Delete | ( | UInt16 | refnum, | |
| HS_HTTPLibDataHandle | in_handle | |||
| ) |
| refnum,: | IN: |
| in_handle,: | IN: |
| Err | error code. |
| Int32 HS_HTTPLibDataHandle_Length | ( | UInt16 | refnum, | |
| HS_HTTPLibDataHandle | in_handle | |||
| ) |
| refnum,: | IN: |
| in_handle,: | IN: |
| Err | error code. |
| void* HS_HTTPLibDataHandle_Lock | ( | UInt16 | refnum, | |
| HS_HTTPLibDataHandle | in_handle | |||
| ) |
| refnum,: | IN: |
| in_handle,: | IN: |
| Err | error code. |
| void HS_HTTPLibDataHandle_Unlock | ( | UInt16 | refnum, | |
| HS_HTTPLibDataHandle | in_handle | |||
| ) |
| refnum,: | IN: |
| in_handle,: | IN: |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance |
| 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 | |||
| ) |
| refnum,: | IN: |
| 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: |
| 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 | |||
| ) |
| refnum,: | IN: |
| 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: |
| Err | error code. |
| void HS_HTTPLibFixedString_Delete | ( | UInt16 | refnum, | |
| HS_HTTPLibFixedString | in_str | |||
| ) |
This function deletes the handle of type HS_HTTPLibFixedString.
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| nothing |
| Int32 HS_HTTPLibFixedString_Length | ( | UInt16 | refnum, | |
| HS_HTTPLibFixedString | in_str | |||
| ) |
This function returns the length of the handle (byte).
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| Int32 |
| void* HS_HTTPLibFixedString_Lock | ( | UInt16 | refnum, | |
| HS_HTTPLibFixedString | in_str | |||
| ) |
This function locks the handle of type HS_HTTPLibFixedString.
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| void | * |
| void HS_HTTPLibFixedString_Unlock | ( | UInt16 | refnum, | |
| HS_HTTPLibFixedString | in_str | |||
| ) |
This function unlocks the handle of type HS_HTTPLibFixedString.
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| nothing |
| HS_HTTPLibFixedString HS_HTTPLibFixedStringNew | ( | UInt16 | refnum, | |
| Char * | in_str, | |||
| Int32 | in_len | |||
| ) |
This function creates a new handle of type HS_HTTPLibFixedString.
| refnum,: | IN: Library reference number. | |
| *in_str,: | IN: The pointer to the string. | |
| in_len,: | IN: The length of in_str. |
| HS_HTTPLibFixedString |
| Boolean HS_HTTPLibHeaderSplitByX | ( | UInt16 | refnum, | |
| HS_HTTPLibSplit * | inout_ss, | |||
| Int32 | in_id, | |||
| Char * | in_cs | |||
| ) |
| refnum,: | IN: |
| *inout_ss,: | IN: | |
| in_id,: | IN: | |
| *in_cs,: | IN: |
| 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.
| refnum,: | IN: Library reference number | |
| *appInfoP,: | IN: | |
| *netLibInfoP,: | IN: | |
| *peerP,: | IN: |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance |
| Boolean HS_HTTPLibIsSendCookie | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH | |||
| ) |
This function returns whether this application sends Cookie.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance |
| Boolean HS_HTTPLibIsSendReferer | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: |
| Err | error code. |
| Boolean HS_HTTPLibIsUseProxy | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH | |||
| ) |
This function returns whether this application uses proxy.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance |
| Boolean HS_HTTPLibLoadCookiesEntries | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Char * | in_s, | |||
| Int32 | in_slen | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| *in_s,: | IN: | |
| in_slen,: | IN: |
| 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).
| 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. |
| 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.
| refnum,: | IN: Library reference number. | |
| stream,: | IN: The handle of stream instance. |
| HS_HTTPLibString HS_HTTPLibMakeCookiesString | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Char * | in_url, | |||
| Int32 | in_urllen, | |||
| Boolean | in_secure, | |||
| Int32 * | out_len | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| *in_url,: | IN: | |
| in_urllen,: | IN: | |
| in_secure,: | IN: | |
| *out_len,: | IN: |
| 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.
| 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. |
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.
| refnum,: | IN: Library reference number |
This function returns the open count of this library.
| refnum,: | IN: Library reference number |
| void HS_HTTPLibRegisterSSLClass | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| HS_HTTPLibSSLClassPtr | sslClassP | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| sslClassP,: | IN: |
| Err | error code. |
| HS_HTTPLibString HS_HTTPLibSaveCookiesEntries | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Int32 * | out_len | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| *out_len,: | IN: |
| 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.
| refnum,: | IN: Library reference number. | |
| in_ssl,: | IN: - | |
| in_verify_result,: | IN: - | |
| in_confirm,: | IN: - |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance | |
| in_msec,: | IN: Time Limit (msec) |
| 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.
| 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. |
| 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.
| 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. |
| 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.
| 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. |
| 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.
| 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. |
| 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.
| 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 |
| void HS_HTTPLibSetDNSMaxRetry | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Int32 | in_retry | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| in_retry,: | IN: |
| Err | error code. |
| void HS_HTTPLibSetDNSRetryInterval | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Int32 | in_interval | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| in_interval,: | IN: |
| 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.
| 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 |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance | |
| in_port,: | IN: The HTTP port number |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance | |
| in_port,: | IN: The HTTPS port number |
| void HS_HTTPLibSetMaxKeepAliveTimeout | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Int32 | in_msec | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| in_msec,:,: | IN: |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance | |
| in_size,: | IN: The maximal size (byte) |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance | |
| in_size,: | IN: The maximal size (byte) |
| 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.
| refnum,: | IN: Library reference number. | |
| libH,: | IN: | |
| netLibRefnum,: | IN: | |
| in_open,: | IN: | |
| in_close,: | IN: | |
| in_online,: | IN: | |
| in_offline,: | IN: |
| 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.
| 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 |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance | |
| in_msec,: | IN: Time Limit (msec) |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance | |
| in_msec,: | IN: Time Limit (msec) |
| Nothing |
| void HS_HTTPLibSetSendCookie | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Boolean | in_bool | |||
| ) |
This function sets whether this application sends Cookie.
| 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 |
| void HS_HTTPLibSetSendProxyKeepAlive | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Boolean | in_bool | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| in_bool,: | IN: |
| Err | error code. |
| void HS_HTTPLibSetSendReferer | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Boolean | in_bool | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| in_bool,: | IN: |
| 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.
| refnum,: | IN: Library reference number. | |
| libH,: | IN: - | |
| in_cb,: | IN: - | |
| in_opaque,: | IN: - |
| 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.
| refnum,: | IN: Library reference number. | |
| libH,: | IN: - | |
| in_cb,: | IN: - | |
| in_opaque,: | IN: - |
| void HS_HTTPLibSetSSLVersionFlag | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Int32 | in_flag, | |||
| Boolean | in_on | |||
| ) |
Set the SSL version.
| refnum,: | IN: Library reference number. | |
| libH,: | IN: The handle of HTTP library instance. | |
| in_flag,: | IN: - | |
| in_on,: | IN: - |
| void HS_HTTPLibSetTunnelingCallback | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| HS_HTTPLibTunnelingCallbackProc | in_cb, | |||
| void * | in_aux | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| in_cb,: | IN: | |
| *in_aux,: | IN: |
| Err | error code. |
| void HS_HTTPLibSetUseProxy | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| Boolean | in_bool | |||
| ) |
This function sets whether this application uses proxy server.
| 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. |
| 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.
| 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 |
| Boolean HS_HTTPLibSetUseragentSelectionRule | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| HttpUASelectionRule * | rules, | |||
| Int32 | len | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| *rules,: | IN: | |
| len,: | IN: |
| 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.
| 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). |
| 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 | |||
| ) |
| refnum,: | IN: |
| 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: |
| Err | error code. |
| void HS_HTTPLibSetWakeUpCallback | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| HS_HTTPLibWakeUpCallbackProc | in_proc, | |||
| HS_HTTPLibOpaque | in_opaque | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: | |
| in_proc,: | IN: | |
| in_opaque,: | IN: |
| Err | error code. |
Standard library sleep function.
| refnum,: | IN: Library reference number |
| HS_HTTPLibSSLClassPtr HS_HTTPLibSSLClass | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH | |||
| ) |
| refnum,: | IN: |
| libH,: | IN: |
| Err | error code. |
| void HS_HTTPLibSSLCloseCertDB | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH | |||
| ) |
TBD.
| refnum,: | IN: Library reference number. | |
| libH,: | IN: The handle of HTTP library instance. |
| Int32 HS_HTTPLibSSLOpenCertDB | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH, | |||
| HS_HTTPLibCertList * | out_list | |||
| ) |
TBD.
| refnum,: | IN: Library reference number. | |
| libH,: | IN: The handle of HTTP library instance. | |
| *out_list,: | OUT: - |
| Int32 |
| Int32 HS_HTTPLibSSLTimeout | ( | UInt16 | refnum, | |
| HS_HTTPLibHandle | libH | |||
| ) |
Set the timeout period for SSL use.
| refnum,: | IN: Library reference number. | |
| libH,: | IN: The handle of HTTP library instance. |
| 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.
| 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. |
| 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.
| 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. |
| 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.
| refnum,: | IN: Library reference number | |
| stream,: | IN: The handle of stream instance. |
| 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.
| 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 |
| 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.
| 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 |
| 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.
| refnum,: | IN: Library reference number | |
| stream,: | IN: The handle of stream instance. |
| Int32 HS_HTTPLibStreamGetContentLength | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream | |||
| ) |
This function returns the content’s size (byte).
| refnum,: | IN: Library reference number. | |
| stream,: | IN: The handle of stream instance. |
| Int32 HS_HTTPLibStreamGetEntityLength | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream | |||
| ) |
This function returns the size of response body (byte).
| refnum,: | IN: Library reference number. | |
| stream,: | IN: The handle of stream instance. |
| Int32 HS_HTTPLibStreamGetFlag | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream | |||
| ) |
| refnum,: | IN: |
| stream,: | IN: |
| 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.
| 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. |
| Boolean HS_HTTPLibStreamGetHeaderWithOffset | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream, | |||
| Int32 | in_type, | |||
| Int32 | in_ofs, | |||
| Int32 * | out_off, | |||
| Int32 * | out_len | |||
| ) |
| refnum,: | IN: |
| stream,: | IN: | |
| in_type | IN: | |
| in_ofs,: | IN: | |
| *out_off,: | IN: | |
| *out_len,: | IN: |
| Err | error code. |
| void HS_HTTPLibStreamGetRequestSent | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream, | |||
| Int32 * | out_total, | |||
| Int32 * | out_sent | |||
| ) |
| refnum,: | IN: |
| stream,: | IN: | |
| *out_total,: | IN: | |
| *out_sent,: | IN: |
| 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,.
| refnum,: | IN: Library reference number. | |
| stream,: | IN: The handle of stream instance. |
| Int32 HS_HTTPLibStreamGetResponseHeaderLength | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream | |||
| ) |
This function returns the size of the response header.
| refnum,: | IN: Library reference number. | |
| stream,: | IN: The handle of stream instance. |
| Int32 HS_HTTPLibStreamGetScheme | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream | |||
| ) |
This function returns the scheme given at the HS_HTTPLibStreamCreateRequest.
| refnum,: | IN: Library reference number. | |
| stream,: | IN: The handle of stream instance. |
| 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).
| refnum,: | IN: Library reference number. | |
| stream,: | IN: The handle of stream instance. |
| Int32 HS_HTTPLibStreamGetStatusCode | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream | |||
| ) |
This function returns the Status Code.
| refnum,: | IN: Library reference number. | |
| stream,: | IN: The handle of stream instance. |
| 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.
| refnum,: | IN: Library reference number. | |
| stream,: | IN: The handle of stream instance. |
| 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.
| refnum,: | IN: Library reference number | |
| libH,: | IN: The handle of HTTP library instance |
| 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.
| 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. |
| void HS_HTTPLibStreamResumeTimer | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream | |||
| ) |
| refnum,: | IN: |
| stream,: | IN: |
| 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.
| 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. |
| 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.
| 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. |
| 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.
| 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. |
| Int32 HS_HTTPLibStreamSetPostData | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream, | |||
| Int32 | in_encoding, | |||
| Char * | in_data, | |||
| Int32 | in_len | |||
| ) |
This function sets the POST data.
| 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. |
| void HS_HTTPLibStreamSuspendTimer | ( | UInt16 | refnum, | |
| HS_HTTPLibStream | stream | |||
| ) |
| refnum,: | IN: |
| stream,: | IN: |
| Err | error code. |
| void HS_HTTPLibString_Delete | ( | UInt16 | refnum, | |
| HS_HTTPLibString | in_str | |||
| ) |
This function deletes the handle of type HS_HTTPLibString.
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| Nothing |
| Int32 HS_HTTPLibString_Length | ( | UInt16 | refnum, | |
| HS_HTTPLibString | in_str | |||
| ) |
This function returns the length of the handle (byte).
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| Int32 |
| void* HS_HTTPLibString_Lock | ( | UInt16 | refnum, | |
| HS_HTTPLibString | in_str | |||
| ) |
This function locks the handle of type HS_HTTPLibString.
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| void | * |
| void HS_HTTPLibString_Unlock | ( | UInt16 | refnum, | |
| HS_HTTPLibString | in_str | |||
| ) |
This function unlocks the handle of type HS_HTTPLibString.
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| Nothing |
| HS_HTTPLibString HS_HTTPLibStringNew | ( | UInt16 | refnum, | |
| Char * | in_str, | |||
| Int32 | in_len | |||
| ) |
This function creates a new handle of type HS_HTTPLibString.
| refnum,: | IN: Library reference number. | |
| *in_str,: | IN: The pointer to the string. | |
| in_len,: | IN: The length of in_str. |
| HS_HTTPLibString |
| void HS_HTTPLibURLString_Delete | ( | UInt16 | refnum, | |
| HS_HTTPLibURLString | in_str | |||
| ) |
This function deletes the handle of type HS_HTTPLibURLString.
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| nothing |
| Int32 HS_HTTPLibURLString_Length | ( | UInt16 | refnum, | |
| HS_HTTPLibURLString | in_str | |||
| ) |
This function returns the length of the handle (byte).
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| Int32 |
| void* HS_HTTPLibURLString_Lock | ( | UInt16 | refnum, | |
| HS_HTTPLibURLString | in_str | |||
| ) |
This function locks the handle of type HS_HTTPLibURLString.
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| void | * |
| void HS_HTTPLibURLString_Unlock | ( | UInt16 | refnum, | |
| HS_HTTPLibURLString | in_str | |||
| ) |
This function unlocks the handle of type HS_HTTPLibURLString.
| refnum,: | IN: Library reference number. | |
| in_str,: | IN: The handle. |
| nothing |
| HS_HTTPLibURLString HS_HTTPLibURLStringNew | ( | UInt16 | refnum, | |
| Char * | in_str, | |||
| Int32 | in_len | |||
| ) |
This function creates a new handle of type HS_HTTPLibURLString.
| refnum,: | IN: Library reference number. | |
| *in_str,: | IN: The pointer to the string. | |
| in_len,: | IN: The length of in_str. |
| HS_HTTPLibURLString |
| void HS_HTTPLibVHandle_Delete | ( | UInt16 | refnum, | |
| HS_HTTPLibVHandle | in_vhandle | |||
| ) |
This function deletes the handle of type HS_HTTPLibVHandle.
| refnum,: | IN: Library reference number. | |
| in_vhandle,: | IN: The handle. |
| Nothing |
| Int32 HS_HTTPLibVHandle_Length | ( | UInt16 | refnum, | |
| HS_HTTPLibVHandle | in_vhandle | |||
| ) |
This function returns the length of the handle (byte).
| refnum,: | IN: Library reference number. | |
| in_vhandle,: | IN: The handle. |
| Int32 |
| void* HS_HTTPLibVHandle_Lock | ( | UInt16 | refnum, | |
| HS_HTTPLibVHandle | in_vhandle | |||
| ) |
This function locks the handle of type HS_HTTPLibVHandle.
| refnum,: | IN: Library reference number. | |
| in_vhandle,: | IN: The handle. |
| void | * |
| void HS_HTTPLibVHandle_Unlock | ( | UInt16 | refnum, | |
| HS_HTTPLibVHandle | in_vhandle | |||
| ) |
This function unlocks the handle of type HS_HTTPLibVHandle.
| refnum,: | IN: Library reference number. | |
| in_vhandle,: | IN: The handle. |
| Nothing |
Standard library wake function.
| refnum,: | IN: Library reference number |
| Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:59 2008 for Palm API Guide |