API Guide Home (Online version only) |

# HS_HTTPLib68K.h

Go to the documentation of this file.

    00001 /*
    00002     HS_HTTPLib68K.h
    00003     Copyright(c) 1996-2002 ACCESS CO., LTD.
    00004     All rights are reserved by ACCESS CO., LTD., whether the whole or
    00005     part of the source code including any modifications.
    00006 */
    00007 /**
    00008  * @defgroup HTTP HTTP Library
    00009  *
    00010  * @{
    00011  * @}
    00012  */
    00013 /**
    00014  *
    00015  * @ingroup HTTP
    00016  *
    00017 */
    00018
    00019 /**
    00020  * @file    HS_HTTPLib68K.h
    00021  * @version 2.0
    00022  * @date
    00023  *
    00024  * @brief Public 68k include file for the HTTP Library.
    00025  *
    00026  *
    00027  */
    00028
    00029
    00030
    00031 #ifndef HS_HTTPLIB68K_H__
    00032 #define HS_HTTPLIB68K_H__
    00033
    00034 #include <PalmTypes.h>
    00035 #include <LibTraps.h>
    00036
    00037 /**
    00038  * Make sure to move the HS_inc folder in front of the following headers when merging
    00039  * new Access code drops.
    00040  **/
    00041 #include <Common/Libraries/HTTP/HS_HTTPLibApp.h>
    00042 #include <Common/Libraries/HTTP/HS_HTTPLibConst.h>
    00043
    00044 /* struct */
    00045
    00046 /**
    00047  * structure for glueing
    00048  **/
    00049
    00050 struct HS_HTTPLibSplit_ {
    00051     Char *s;        /**<        */
    00052     Int32 len;      /**<        */
    00053 };
    00054 typedef struct HS_HTTPLibSplit_ HS_HTTPLibSplit;
    00055
    00056 struct HS_HTTPLibTime_ {
    00057     Int32 day;      /**< days (either backward or forward) since 01 January, 1970 UTC */
    00058     Int32 msec;     /**< milliseconds since midnight [0-86399999] */
    00059 };
    00060 typedef struct HS_HTTPLibTime_ HS_HTTPLibTime;
    00061
    00062 typedef void *HS_HTTPLibDataHandle; /**<        */
    00063 typedef void *HS_HTTPLibVHandle;    /**<        */
    00064 typedef void *HS_HTTPLibString;     /**<        */
    00065 typedef void *HS_HTTPLibFixedString;    /**<        */
    00066 typedef void *HS_HTTPLibURLString;  /**<        */
    00067
    00068 /**
    00069  *
    00070  **/
    00071 struct HS_HTTPLibAuthInfo_ {
    00072     HS_HTTPLibString fUser;     /**<        */
    00073     HS_HTTPLibString fPass;     /**<        */
    00074     HS_HTTPLibString fRealm;    /**<        */
    00075     HS_HTTPLibString fChallenge;    /**<        */
    00076     HS_HTTPLibString fNextNonce;    /**<        */
    00077     Int32 fNC;          /**<        */
    00078 };
    00079 typedef struct HS_HTTPLibAuthInfo_ HS_HTTPLibAuthInfo;
    00080
    00081 /**
    00082  * This sets the rules for HttpLib to use to select useragent for each request.
    00083  * The rule should be set as little as possible so that it does not slow down
    00084  * browser performance.
    00085  **/
    00086 enum {
    00087     httpUASelectTypeHost,       /**<        */
    00088     httpUASelectTypePath        /**<        */
    00089 };
    00090
    00091 /**
    00092  *
    00093  **/
    00094 typedef struct {
    00095     Int32 fType;        /**<        */
    00096     Char *fMatchString;     /**< substring to be matched */
    00097     Char *fUserAgent;   /**<        */
    00098 } HttpUASelectionRule;
    00099
    00100
    00101 typedef void *HS_HTTPLibStream;         /**<        */
    00102 typedef void *HS_HTTPLibSSL;            /**<        */
    00103 typedef void *HS_HTTPLibCookies;        /**<        */
    00104 typedef void *HS_HTTPLibCertPtr;        /**<        */
    00105 typedef void *HS_HTTPLibCertList;       /**<        */
    00106 typedef void *HS_HTTPLibClientCertList;     /**<        */
    00107 typedef void *HS_HTTPLibSSLClassPtr;        /**<        */
    00108
    00109 typedef Int32 (*HS_HTTPLibCookieConfirmProc)(HS_HTTPLibCookies in_cookie, HS_HTTPLibURLString in_url, Char *in_header, Int32 in_header_len, HS_HTTPLibOpaque in_aux);   /**<        */
    00110 typedef Int32 (*HS_HTTPLibServerCertConfirmProc)(HS_HTTPLibSSL in_ssl, Int32 in_verify_result, HS_HTTPLibCertList in_list, HS_HTTPLibOpaque in_aux);    /**<        */
    00111 typedef Int32 (*HS_HTTPLibClientCertSelectProc)(HS_HTTPLibSSL in_ssl, HS_HTTPLibClientCertList in_list, HS_HTTPLibOpaque in_aux);   /**<        */
    00112 typedef Int32 (*HS_HTTPLibTunnelingCallbackProc)(HS_HTTPLibStream stream, Char* buf, Int32 len, void *in_aux);      /**<        */
    00113 typedef void (*HS_HTTPLibWakeUpCallbackProc)(HS_HTTPLibOpaque in_aux);      /**<        */
    00114
    00115 /* const */
    00116
    00117 /* API */
    00118
    00119 /**
    00120  *  @brief This function opens the HTTP library and increments the open count. This
    00121  *     function will create and initialize the library’s common data at first opening.
    00122  *
    00123  *  @param refnum:  IN:  Library reference number
    00124  *  @return Error code.
    00125  **/
    00126 Err HS_HTTPLibOpen(UInt16 refnum)
    00127         SYS_TRAP(kHTTPLibTrapOpen);
    00128
    00129 /**
    00130  *  @brief This function decrements open count and finalizes the library’s common data at
    00131  *     the last close.
    00132  *
    00133  *  @param refnum:  IN:  Library reference number
    00134  *  @param usecountP:   OUT: Open count
    00135  *  @return Error code.
    00136  **/
    00137 Err HS_HTTPLibClose(UInt16 refnum, UInt16* usecountP)
    00138         SYS_TRAP(kHTTPLibTrapClose);
    00139
    00140 /**
    00141  *  @brief Standard library sleep function.
    00142  *
    00143  *  @param refnum:  IN:  Library reference number
    00144  *  @return Error code.
    00145  **/
    00146 Err HS_HTTPLibSleep(UInt16 refnum)
    00147         SYS_TRAP(kHTTPLibTrapSleep);
    00148
    00149 /**
    00150  *  @brief Standard library wake function.
    00151  *
    00152  *  @param refnum:  IN:  Library reference number
    00153  *  @return Error code.
    00154  **/
    00155 Err HS_HTTPLibWake(UInt16 refnum)
    00156         SYS_TRAP(kHTTPLibTrapWake);
    00157
    00158 /**
    00159  *  @brief This function returns the open count of this library.
    00160  *
    00161  *  @param refnum:  IN:  Library reference number
    00162  *  @return Open count.
    00163  **/
    00164 UInt16 HS_HTTPLibOpenCount(UInt16 refnum)
    00165         SYS_TRAP(kHTTPLibTrapOpenCount);
    00166
    00167 /**
    00168  *  @brief This function initializes the library instance and sets application dependent
    00169  *         information in the global variables. The return value is the handle of library
    00170  *     instance. If an error occurs during the initialization, the return value is NULL.
    00171  *
    00172  *  This call should be made after the application has called HS_HTTPLibOpen and
    00173  *  assigned the HS_HTTPLibAppInfo, HS_HTTPLibNetLibInfo, and
    00174  *  HS_HTTPLibPeer global variables with the application’s parameters. A reciprocal
    00175  *  call to HS_HTTPLibFinalize should be made when the application is finished
    00176  *  using the library.
    00177  *
    00178  *  @param refnum:  IN:  Library reference number
    00179  *  @param *appInfoP:   IN:
    00180  *  @param *netLibInfoP:    IN:
    00181  *  @param *peerP:  IN:
    00182  *  @retval HS_HTTPLibHandle
    00183  *      non NULL if successful. NULL if failed
    00184  **/
    00185 HS_HTTPLibHandle HS_HTTPLibInitialize(UInt16 refnum, HS_HTTPLibAppInfo *appInfoP, HS_HTTPLibNetLibInfo *netLibInfoP, HS_HTTPLibPeer *peerP)
    00186         SYS_TRAP(kHTTPLibTrapInitialize);
    00187
    00188 /**
    00189  *  @brief This function finalizes the library instance.
    00190  *
    00191  *  This call should be made when the application is finished using the library.
    00192  *
    00193  *  @param refnum:  IN:  Library reference number
    00194  *  @param libH:    IN:  The handle of HTTP library instance
    00195  *  @return None.
    00196  **/
    00197 void HS_HTTPLibFinalize(UInt16 refnum, HS_HTTPLibHandle libH)
    00198         SYS_TRAP(kHTTPLibTrapFinalize);
    00199
    00200 /**
    00201  *  @brief
    00202  *
    00203  *  @param refnum:  IN:
    00204  *  @param libH:    IN:
    00205  *  @retval Err error code.
    00206  **/
    00207 HS_HTTPLibSSLClassPtr HS_HTTPLibSSLClass(UInt16 refnum, HS_HTTPLibHandle libH)
    00208         SYS_TRAP(kHTTPLibTrapSSLClass);
    00209
    00210 /**
    00211  *  @brief
    00212  *
    00213  *  @param refnum:  IN:
    00214  *  @param libH:    IN:
    00215  *  @param sslClassP:   IN:
    00216  *  @retval Err error code.
    00217  **/
    00218 void HS_HTTPLibRegisterSSLClass(UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibSSLClassPtr sslClassP)
    00219         SYS_TRAP(kHTTPLibTrapRegisterSSLClass);
    00220
    00221 /**
    00222  *  @brief This function clears the DNS cache information.
    00223  *
    00224  *  @param refnum:  IN:  Library reference number
    00225  *  @param libH:    IN:  The handle of HTTP library instance
    00226  *  @return None.
    00227  **/
    00228 void HS_HTTPLibClearDNSCache(UInt16 refnum, HS_HTTPLibHandle libH)
    00229         SYS_TRAP(kHTTPLibTrapClearDNSCache);
    00230
    00231 /**
    00232  *  @brief This function closes the all idle keep alive sockets relating this application. Nonidle
    00233  *     sockets are not closed by this function.
    00234  *
    00235  *  This call should be made at library finalization if keep-alive sockets are active.
    00236  *
    00237  *  @param refnum:  IN:  Library reference number
    00238  *  @param libH:    IN:  The handle of HTTP library instance
    00239  *  @return None.
    00240  **/
    00241 void HS_HTTPLibCloseAllKeepAlive(UInt16 refnum, HS_HTTPLibHandle libH)
    00242         SYS_TRAP(kHTTPLibTrapCloseAllKeepAlive);
    00243
    00244 /**
    00245  *  @brief Set the proxy information of this application to out_proxy_host,
    00246  *     out_proxy_http_port, out_proxy_https_port, out_no_proxy_hosts.
    00247  *     If out_proxy_host is NULL, the value of *out_proxy_http_port,
    00248  *     *out_proxy_https_port, *out_no_proxy_hosts are not set, otherwise the values of
    00249  *     *out_proxy_http_port, *out_proxy_https are set.
    00250  *     If out_no_proxy_hosts is NULL, *out_no_proxy_hosts is not set.
    00251  *     The format of out_no_proxy_hosts is the list separated by “,”.
    00252  *     The responsibility of delete *out_proxy_host, *out_no_proxy_hosts is caller.
    00253  *
    00254  *  @param refnum:  IN:  Library reference number
    00255  *  @param libH:    IN:  The handle of HTTP library instance
    00256  *  @param *out_proxy_host: OUT:  The pointer to handle of proxy host string
    00257  *  @param *out_proxy_http_port:    OUT:  The pointer to HTTP port number
    00258  *  @param *out_proxy_https_port:   OUT:  The pointer to HTTPS port number
    00259  *  @param *out_no_proxy_hosts: OUT:  The pointer to handle of the list string of hosts connect without using proxy server.
    00260  *  @return None.
    00261  **/
    00262 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)
    00263         SYS_TRAP(kHTTPLibTrapMakeProxy);
    00264
    00265 /**
    00266  *  @brief This function sets the default HTTP port number. If there is no indication in URL,
    00267  *     this port number is used for TCP connection.
    00268  *
    00269  *  @param refnum:  IN:  Library reference number
    00270  *  @param libH:    IN:  The handle of HTTP library instance
    00271  *  @param in_port:     IN:  The HTTP port number
    00272  *  @return None.
    00273  **/
    00274 void HS_HTTPLibSetHTTPPort(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_port)
    00275         SYS_TRAP(kHTTPLibTrapSetHTTPPort);
    00276
    00277 /**
    00278  *  @brief This function sets the default HTTPS port number. If there is no indication in https
    00279  *     URL, this port number is used for TCP connection.
    00280  *
    00281  *  @param refnum:  IN:  Library reference number
    00282  *  @param libH:    IN:  The handle of HTTP library instance
    00283  *  @param in_port:     IN:  The HTTPS port number
    00284  *  @return None.
    00285  **/
    00286 void HS_HTTPLibSetHTTPSPort(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_port)
    00287         SYS_TRAP(kHTTPLibTrapSetHTTPSPort);
    00288
    00289 /**
    00290  *  @brief This function sets the maximal size of Request-Line. If in_size is -1, the maximal
    00291  *     size is unlimited. Note that this function does not set the maximal size of Request-
    00292  *     Header. See RFC2616 for the definitions of Request-Line and Request-Header.
    00293  *
    00294  *  @param refnum:  IN:  Library reference number
    00295  *  @param libH:    IN:  The handle of HTTP library instance
    00296  *  @param in_size:     IN:  The maximal size (byte)
    00297  *  @return None.
    00298  **/
    00299 void HS_HTTPLibSetMaxRequestHeader(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_size)
    00300         SYS_TRAP(kHTTPLibTrapSetMaxRequestHeader);
    00301
    00302 /**
    00303  *  @brief This function sets the maximal size of Request-Body. If in_size is -1, the maximal
    00304  *     size is unlimited.
    00305  *
    00306  *  @param refnum:  IN:  Library reference number
    00307  *  @param libH:    IN:  The handle of HTTP library instance
    00308  *  @param in_size:     IN:  The maximal size (byte)
    00309  *  @return None.
    00310  **/
    00311 void HS_HTTPLibSetMaxRequestBody(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_size)
    00312         SYS_TRAP(kHTTPLibTrapSetMaxRequestBody);
    00313
    00314 /**
    00315  *  @brief This function sets the proxy server setting for this application. If in_proxy_host is
    00316  *     NULL, in_proxy_host, in_proxy_http_port, in_proxy_https_port are not set.
    00317  *     If in_no_proxy_hosts is NULL, in_no_proxy_hosts is not set. The format of
    00318  *     in_no_proxy_hosts is comma (“,”) separated list.
    00319  *
    00320  *  This call can be grouped with other proxy setting calls if the application is making
    00321  *  the same type of request for all the requests.
    00322  *
    00323  *  @param refnum:  IN:  Library reference number
    00324  *  @param libH:    IN:  The handle of HTTP library instance
    00325  *  @param *in_proxy_host:  IN:  The proxy host name
    00326  *  @param in_proxy_host_len:   IN:  The length of in_proxy_host string
    00327  *  @param in_proxy_http_port:  IN:  The HTTP port of proxy server
    00328  *  @param in_proxy_https_port: IN:  The HTTPS port of proxy server
    00329  *  @param *in_no_proxy_hosts:  IN:  The list of hosts not using proxy
    00330  *  @param in_no_proxy_hosts_len:   IN:  The length of in_no_proxy_hosts
    00331  *  @return
    00332  *      True if setting is succeed.
    00333  *      False if failed.(the main reason is memory shortage)
    00334  **/
    00335 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)
    00336         SYS_TRAP(kHTTPLibTrapSetProxy);
    00337
    00338 /**
    00339  *  @brief This function sets the UserAgent string for the application. If in_useragent is
    00340  *     NULL, setting is cleared.
    00341  *
    00342  *  This call allows the application to set the user agent identfication in the requests.
    00343  *
    00344  *  @param refnum:  IN:  Library reference number
    00345  *  @param libH:    IN:  The handle of HTTP library instance
    00346  *  @param *in_useragent:   IN:  The string of User Agent
    00347  *  @param in_useragent_len:    IN:  The length of in_useragent
    00348  *  @return
    00349  *      True if setting is successful.
    00350  *      False if failed.(The main reason is memory shortage.)
    00351  **/
    00352 Boolean HS_HTTPLibSetUserAgent(UInt16 refnum, HS_HTTPLibHandle libH, Char *in_useragent, Int32 in_useragent_len)
    00353         SYS_TRAP(kHTTPLibTrapSetUserAgent);
    00354
    00355 /**
    00356  *  @brief This function sets the default header, i.e. this string is added to the Request-header
    00357  *     of the Request created at HS_HTTPLibStreamCreateRequest. If in_default_headers
    00358  *     is NULL, the setting is cleared.
    00359  *
    00360  *  This call allows the application to set the application defined standard headers
    00361  *  without having the populate each request with HS_HTTPLibStreamAddHeader.
    00362  *
    00363  *  @param refnum:  IN:  Library reference number
    00364  *  @param libH:    IN:  The handle of HTTP library instance
    00365  *  @param *in_default_headers:     IN:  The string of default header
    00366  *  @param in_default_headers_len:  IN:  The length of in_default_headers
    00367  *  @return
    00368  *      True if setting is successful.
    00369  *      False if failed. (The main reason is memory shortage.)
    00370  **/
    00371 Boolean HS_HTTPLibSetDefaultHeaders(UInt16 refnum, HS_HTTPLibHandle libH, Char *in_default_headers, Int32 in_default_headers_len)
    00372         SYS_TRAP(kHTTPLibTrapSetDefaultHeaders);
    00373
    00374 /**
    00375  *  @brief This function sets whether this application uses proxy server.
    00376  *
    00377  *  @param refnum:  IN:  Library reference number
    00378  *  @param libH:    IN:  The handle of HTTP library instance
    00379  *  @param in_bool:     IN:  True if using proxy server.
    00380  *               False if not using proxy server.
    00381  *  @return None.
    00382  **/
    00383 void HS_HTTPLibSetUseProxy(UInt16 refnum, HS_HTTPLibHandle libH, Boolean in_bool)
    00384         SYS_TRAP(kHTTPLibTrapSetUseProxy);
    00385
    00386 /**
    00387  *  @brief This function sets whether this application permits HTTP1.1 over proxy server. If
    00388  *     false is set, the application use HTTP/1.0.
    00389  *
    00390  *  @param refnum:  IN:  Library reference number
    00391  *  @param libH:    IN:  The handle of HTTP library instance
    00392  *  @param in_bool:     IN:  True if permitting HTTP/1.1 over proxy server
    00393  *               False if not permitting HTTP/1.1 over proxy server
    00394  *  @return None.
    00395  **/
    00396 void HS_HTTPLibSetHTTP11OverProxy(UInt16 refnum, HS_HTTPLibHandle libH, Boolean in_bool)
    00397         SYS_TRAP(kHTTPLibTrapSetHTTP11OverProxy);
    00398
    00399 /**
    00400  *  @brief
    00401  *
    00402  *  @param refnum:  IN:
    00403  *  @param libH:    IN:
    00404  *  @param in_bool:     IN:
    00405  *  @retval Err error code.
    00406  **/
    00407 void HS_HTTPLibSetSendReferer(UInt16 refnum, HS_HTTPLibHandle libH, Boolean in_bool)
    00408         SYS_TRAP(kHTTPLibTrapSetSendReferer);
    00409
    00410 /**
    00411  *  @brief
    00412  *
    00413  *  @param refnum:  IN:
    00414  *  @param libH:    IN:
    00415  *  @param in_bool:     IN:
    00416  *  @retval Err error code.
    00417  **/
    00418 void HS_HTTPLibSetSendProxyKeepAlive(UInt16 refnum, HS_HTTPLibHandle libH, Boolean in_bool)
    00419         SYS_TRAP(kHTTPLibTrapSetSendProxyKeepAlive);
    00420
    00421 /**
    00422  *  @brief This function sets whether this application sends Cookie.
    00423  *
    00424  *  @param refnum:  IN:  Library reference number
    00425  *  @param libH:    IN:  The handle of HTTP library instance
    00426  *  @param in_bool:     IN:  True if sending Cookie
    00427  *               False if not sending Cookie
    00428  *  @return None.
    00429  **/
    00430 void HS_HTTPLibSetSendCookie(UInt16 refnum, HS_HTTPLibHandle libH, Boolean in_bool)
    00431         SYS_TRAP(kHTTPLibTrapSetSendCookie);
    00432
    00433 /**
    00434  *  @brief This function sets the limit of Connection timeout. If in_msec is -1, no timeout is
    00435  *     set. The condition of timeout is in_msec has passed from TCP connect without
    00436  *     HTTP connection established.
    00437  *
    00438  *  With this function the different connection timeouts can be set at library
    00439  *  initialization.
    00440  *
    00441  *  @param refnum:  IN:  Library reference number
    00442  *  @param libH:    IN:  The handle of HTTP library instance
    00443  *  @param in_msec:     IN:  Time Limit (msec)
    00444  *  @retval Nothing
    00445  **/
    00446 void HS_HTTPLibSetConnectTimeOut(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_msec)
    00447         SYS_TRAP(kHTTPLibTrapSetConnectTimeOut);
    00448
    00449 /**
    00450  *  @brief This function sets the limit of sending Request timeout. If in_msec is -1, no timeout
    00451  *     is set. The condition of timeout is in_msec has passed from the start of Request
    00452  *     sending without sending done.
    00453  *
    00454  *  @param refnum:  IN:  Library reference number
    00455  *  @param libH:    IN:  The handle of HTTP library instance
    00456  *  @param in_msec:     IN:  Time Limit (msec)
    00457  *  @return None.
    00458  **/
    00459 void HS_HTTPLibSetReqTimeOut(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_msec)
    00460         SYS_TRAP(kHTTPLibTrapSetReqTimeOut);
    00461
    00462 /**
    00463  *  @brief This function sets the limit of receiving Response timeout. If in_msec is -1, no
    00464  *     timeout is set. The condition of timeout is in_msec has passed from the end of
    00465  *     sending request without receiving Response. Or in_msec has passed from the last
    00466  *     receiving a part of Response without receiving any part of Response.
    00467  *
    00468  *  @param refnum:  IN:  Library reference number
    00469  *  @param libH:    IN:  The handle of HTTP library instance
    00470  *  @param in_msec:     IN:  Time Limit (msec)
    00471  *  @retval Nothing
    00472  **/
    00473 void HS_HTTPLibSetRspTimeOut(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_msec)
    00474         SYS_TRAP(kHTTPLibTrapSetRspTimeOut);
    00475
    00476 /**
    00477  *  @brief
    00478  *
    00479  *  @param refnum:  IN:
    00480  *  @param libH:    IN:
    00481  *  @param in_cb:   IN:
    00482  *  @param *in_aux: IN:
    00483  *  @retval Err error code.
    00484  **/
    00485 void HS_HTTPLibSetTunnelingCallback(UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibTunnelingCallbackProc in_cb, void *in_aux)
    00486         SYS_TRAP(kHTTPLibTrapSetTunnelingCallback);
    00487
    00488 /**
    00489  *  @brief This function returns whether this application uses proxy.
    00490  *
    00491  *  @param refnum:  IN:  Library reference number
    00492  *  @param libH:    IN:  The handle of HTTP library instance
    00493  *  @return
    00494  *      True if this application uses proxy.
    00495  *      False if this application does not uses proxy.
    00496  **/
    00497 Boolean HS_HTTPLibIsUseProxy(UInt16 refnum, HS_HTTPLibHandle libH)
    00498         SYS_TRAP(kHTTPLibTrapIsUseProxy);
    00499
    00500 /**
    00501  *  @brief This function returns whether this application permits HTTP/1.1 over proxy.
    00502  *
    00503  *  @param refnum:  IN:  Library reference number
    00504  *  @param libH:    IN:  The handle of HTTP library instance
    00505  *  @return
    00506  *      True if this application permits HTTP/1.1 over proxy.
    00507  *      False if this application does not permit HTTP/1.1 over proxy.
    00508  **/
    00509 Boolean HS_HTTPLibIsHTTP11OverProxy(UInt16 refnum, HS_HTTPLibHandle libH)
    00510         SYS_TRAP(kHTTPLibTrapIsHTTP11OverProxy);
    00511
    00512 /**
    00513  *  @brief
    00514  *
    00515  *  @param refnum:  IN:
    00516  *  @param libH:    IN:
    00517  *  @retval Err error code.
    00518  **/
    00519 Boolean HS_HTTPLibIsSendReferer(UInt16 refnum, HS_HTTPLibHandle libH)
    00520         SYS_TRAP(kHTTPLibTrapIsSendReferer);
    00521
    00522 /**
    00523  *  @brief This function returns whether this application sends Cookie.
    00524  *
    00525  *  @param refnum:  IN:  Library reference number
    00526  *  @param libH:    IN:  The handle of HTTP library instance
    00527  *  @return
    00528  *      True if this application sends Cookie.
    00529  *      False if this application does not send Cookie.
    00530  **/
    00531 Boolean HS_HTTPLibIsSendCookie(UInt16 refnum, HS_HTTPLibHandle libH)
    00532         SYS_TRAP(kHTTPLibTrapIsSendCookie);
    00533 /**
    00534  *  @brief This function creates a new stream and returns the handle of stream instance. At
    00535  *     this time, TCP/SSL socket is not opened.
    00536  *
    00537  *  @param refnum:  IN:  Library reference number
    00538  *  @param libH:    IN:  The handle of HTTP library instance
    00539  *  @return
    00540  *      non NULL if successful.
    00541  *      NULL if failed (the main reason is memory shortage).
    00542  **/
    00543 HS_HTTPLibStream HS_HTTPLibStreamNew(UInt16 refnum, HS_HTTPLibHandle libH)
    00544         SYS_TRAP(kHTTPLibTrapStreamNew);
    00545
    00546 /**
    00547  *  @brief This function deletes the stream instance. If this function is called without calling
    00548  *     HS_HTTPLibStreamClose, this function closes the TCP/SSL socket by calling
    00549  *     HS_HTTPLibStreamClose, however if the socket is in keep-alive, it is not closed.
    00550  *
    00551  *  @param refnum:  IN:  Library reference number
    00552  *  @param stream:  IN:  The handle of stream instance.
    00553  *  @return None.
    00554  **/
    00555 void HS_HTTPLibStreamDelete(UInt16 refnum, HS_HTTPLibStream stream)
    00556         SYS_TRAP(kHTTPLibTrapStreamDelete);
    00557
    00558 /**
    00559  *  @brief This function creates a request. If using proxy and SSL connection, CONNECT
    00560  *     request message is made. If there are cached authenticate informations, add
    00561  *     authenticate header. Add default headers and in_header to Request-Header.
    00562  *
    00563  *  @param refnum:  IN:  Library reference number.
    00564  *  @param stream:  IN:  The handle of stream instance.
    00565  *  @param in_method:   IN:  The HTTP method
    00566  *               httpMethodGET GET
    00567  *               httpMethodPOST POST
    00568  *  @param *in_url: IN:  The URL string.
    00569  *  @param in_url_len:  IN:  The length of in_url.
    00570  *  @param *in_header:  IN:  The header string to add the Request-Header.
    00571  *               Each line is terminated by <CR><LF>.
    00572  *  @param in_header_len:   IN:  The length of in_header.
    00573  *  @param *in_referer: IN:  The referer string.
    00574  *  @param in_referer_len:  IN:  The length of in_referer.
    00575  *  @param in_version:  IN:  The version
    00576  *               httpVersion_0_9 HTTP/0.9
    00577  *               httpVersion_1_0 HTTP/1.0
    00578  *               httpVersion_1_1 HTTP/1.1
    00579  *  @param in_no_cache: IN:  True if no-cache is added to the header
    00580  *               False if no-cache is not added to the header
    00581  *  @param in_pipeline: IN:  True if doing pipeline
    00582  *               False if not doing pipeline
    00583  *  @param in_ssl_flag: IN:  The flag sent to SSL instance.
    00584  *               httpSSLFlagConnV2 connect by v2 protocol
    00585  *               httpSSLFlagConnV3 connect by v3 protocol
    00586  *               httpSSLFlagConnTLS connect by TLS(v3.1) protocol
    00587  *               httpSSLFlagConnV2V3 autoselect within v2,v3
    00588  *               httpSSLFlagConnV2TLS autoselect within v2,tls
    00589  *               httpSSLFlagConnV3TLS autoselect within v3,tls
    00590  *               httpSSLFlagConnV2V3TLS autoselect within v2,v3,tls
    00591  *  @return
    00592  *      httpErrorOK succeed
    00593  *      httpErrorNoMem memory shortage
    00594  *      httpErrorReqHeaderSizeOver if Request header size is over the maximal
    00595  *      setting. If the Request-Line size is set to unlimited, httpErrorReqHeaderSizeOver
    00596  *      is not returned.
    00597  **/
    00598 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)
    00599         SYS_TRAP(kHTTPLibTrapStreamCreateRequest);
    00600
    00601 /**
    00602  *  @brief This function creates request for chunk-encoding post. If using proxy and SSL
    00603  *     connection, CONNECT request message is made. If there are cached authenticate
    00604  *     informations, add authenticate header. Add default headers and in_header to
    00605  *     Request-Header.
    00606  *     Do not use this API unless you want to create chunk-encoding request. Transfer-
    00607  *     Encoding: chunked is added to the request header.
    00608  *
    00609  *  @param refnum:  IN:  Library reference number.
    00610  *  @param stream:  IN:  The handle of stream instance.
    00611  *  @param in_method:   IN:  The HTTP method
    00612  *               httpMethodGET GET
    00613  *               httpMethodPOST POST
    00614  *  @param *in_url: IN:  The URL string.
    00615  *  @param in_url_len:  IN:  The length of in_url.
    00616  *  @param *in_header:  IN:  The header string to add the Request-Header.
    00617  *               Each line is terminated by <CR><LF>.
    00618  *  @param in_header_len:   IN:  The length of in_header.
    00619  *  @param *in_referer: IN:  The referer string.
    00620  *  @param in_referer_len:  IN:  The length of in_referer.
    00621  *  @param in_version:  IN:  The version
    00622  *               httpVersion_0_9 HTTP/0.9
    00623  *               httpVersion_1_0 HTTP/1.0
    00624  *               httpVersion_1_1 HTTP/1.1
    00625  *  @param in_no_cache: IN:  True if no-cache is added to the header
    00626  *               False if no-cache is not added to the header
    00627  *  @param in_pipeline: IN:  True if doing pipeline
    00628  *               False if not doing pipeline
    00629  *  @param in_ssl_flag: IN:  The flag sent to SSL instance.
    00630  *               httpSSLFlagConnV2 connect by v2 protocol
    00631  *               httpSSLFlagConnV3 connect by v3 protocol
    00632  *               httpSSLFlagConnTLS connect by TLS(v3.1) protocol
    00633  *               httpSSLFlagConnV2V3 autoselect within v2,v3
    00634  *               httpSSLFlagConnV2TLS autoselect within v2,tls
    00635  *               httpSSLFlagConnV3TLS autoselect within v3,tls
    00636  *               httpSSLFlagConnV2V3TLS autoselect within v2,v3,tls
    00637  *  @return
    00638  *      httpErrorOK succeed
    00639  *      httpErrorNoMem memory shortage
    00640  *      httpErrorReqHeaderSizeOver if the Request header size is over the maximal
    00641  *      setting. If the Request-Line size is set to unlimited, httpErrorReqHeaderSizeOver
    00642  *      is not returned.
    00643  **/
    00644 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)
    00645         SYS_TRAP(kHTTPLibTrapStreamCreateRequestWithChunkEncoding);
    00646
    00647 /**
    00648  *  @brief This function sends the request. This call opens and connects a TCP connection if
    00649  *     not already established. It automatically retries at where pipeline stalled if pipeline
    00650  *     is enable.
    00651  *
    00652  *  Because the data streaming could block and resume at where the pipeline was
    00653  *  stalled, the application can call this function in a loop until the sending is finished.
    00654  *
    00655  *  @param refnum:  IN:  Library reference number.
    00656  *  @param stream:  IN:  The handle of stream instance.
    00657  *  @param *out_sleep:  OUT:  The time of the application can sleep (msec).
    00658  *               This value is not used for application.
    00659  *  @return
    00660  *      httpErrorOK sending done
    00661  *      httpErrorWouldBlock application can call this function consecutively
    00662  *      httpErrorIOSleep application can sleep
    00663  *      httpErrorNoMem memory shortage
    00664  *          httpErrorDNSInval DNS message invalid
    00665  *      httpErrorDNSNoServer DNS server is not found
    00666  *      httpErrorDNSTimedout Timeout at DNS resolve
    00667  *      httpErrorDNSNotFound DNS server can not find the name
    00668  *      httpErrorTCPOpen cannot open TCP
    00669  *      httpErrorTCPConnec cannot connect TCP
    00670  *      httpErrorTCPRead cannot read TCP
    00671  *      httpErrorTCPWrite cannot write TCP
    00672  *      httpErrorSSLConnect cannot Proxy Tunneling
    00673  *      httpErrorSSLHandShake cannot SSL handshake
    00674  *      httpErrorSSLRead cannot SSL read
    00675  *      httpErrorSSLWrite cannot SSL write
    00676  *      httpErrorReqTimedout request timeout
    00677  *      httpErrorRspTimedout response timeout at Proxy Tunneling (SSL only)
    00678  **/
    00679 Int32 HS_HTTPLibStreamSendRequest(UInt16 refnum, HS_HTTPLibStream stream,Int32 *out_sleep)
    00680         SYS_TRAP(kHTTPLibTrapStreamSendRequest);
    00681
    00682 /**
    00683  *  @brief This function sends the POST request. This call opens and connects a TCP
    00684  *     connection if not already established. It automatically retries at where pipeline
    00685  *     stalled if pipeline is enable.
    00686  *
    00687  *  Because the data streaming could block and resume at where the pipeline was
    00688  *  stalled, the application can call this function in a loop until the sending is finished.
    00689  *
    00690  *  @param refnum:  IN:  Library reference number.
    00691  *  @param stream:  IN:  The handle of stream instance.
    00692  *  @param *in_buf: IN:  The pointer to POST data.
    00693  *  @param in_len:  IN:  The length of in_buf.
    00694  *  @param *out_len:    OUT:  The size of sending data at this time (byte).
    00695  *  @param *out_sleep:  OUT:  The time of the application can sleep (msec)
    00696  *               This value is not used for application.
    00697  *  @return
    00698  *      httpErrorOK sending done
    00699  *      httpErrorWouldBlock application can call this function consecutively
    00700  *      httpErrorIOSleep application can sleep
    00701  *      httpErrorNoMem memory shortage
    00702  *      httpErrorDNSInval DNS message invalid
    00703  **/
    00704 Int32 HS_HTTPLibStreamSendRequestWithPostData(UInt16 refnum, HS_HTTPLibStream stream, Char *in_buf, Int32 in_len, Int32 *out_len, Int32 *out_sleep)
    00705         SYS_TRAP(kHTTPLibTrapStreamSendRequestWithPostData);
    00706
    00707 /**
    00708  *  @brief This function sends chunk encoding data. This call opens and connects a TCP
    00709  *     connection if not already established. It automatically retries at where pipeline
    00710  *     stalled if pipeline is enable.
    00711  *     The sequence of chunked data sending is
    00712  *     1. call HS_HTTPLibStreamCreateRequestWithChunkEncoding()
    00713  *     2. call HS_HTTPLibStreamSendRequestWithChunkEncoding() while return
    00714  *     value is not httpErrorOK or error.
    00715  *     3. If there remains data, goto 2.
    00716  *     4. end
    00717  *     If only one chunked data is sent, this API returns httpErrorOK.
    00718  *     The address of data for one chunk is in_buf + in_offset, this value should not be
    00719  *     changed while sending only one chunked data.
    00720  *     isFinish is used to indicate the chunked data is the last chunk.
    00721  *
    00722  *  @param refnum:  IN:  Library reference number
    00723  *  @param stream:  IN:  The handle of stream instance.
    00724  *  @param *in_buf:     IN:  The pointer to POST data.
    00725  *  @param in_offset:   IN:  The offset to POST data.
    00726  *  @param in_len:  IN:  The length of in_buf.
    00727  *  @param isFinish:    IN:  True if the send data is the last chunk.
    00728  *               False if send data is not the last chunk.
    00729  *  @param *out_len:    OUT:  The size of sending data at this time (byte).
    00730  *  @param *out_sleep:  OUT:  The time of the application can sleep (msec)
    00731  *               This value is not used for application.
    00732  *  @return
    00733  *      httpErrorOK sending done
    00734  *      httpErrorWouldBlock application can call this function consecutively
    00735  *      httpErrorIOSleep application can sleep
    00736  *      httpErrorNoMem memory shortage
    00737  *      httpErrorDNSInval DNS message invalid
    00738  *      httpErrorDNSNoServer DNS server is not found
    00739  *      httpErrorDNSTimedout Timeout at DNS resolve
    00740  *      httpErrorDNSNotFound DNS server can not find the name
    00741  *      httpErrorTCPOpen cannot open TCP
    00742  *      httpErrorTCPConnec cannot connect TCP
    00743  *      httpErrorTCPRead cannot read TCP
    00744  *      httpErrorTCPWrite cannot write TCP
    00745  *      httpErrorSSLConnect cannot Proxy Tunneling
    00746  *      httpErrorSSLHandShake cannot SSL handshake
    00747  *      httpErrorSSLRead cannot read SSL
    00748  *      httpErrorSSLWrite cannot write SSL
    00749  *      httpErrorReqTimedout request timeout
    00750  *      httpErrorRspTimedout response timeout at Proxy Tunneling (SSL only)
    00751  **/
    00752 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)
    00753         SYS_TRAP(kHTTPLibTrapStreamSendRequestWithChunkEncoding);
    00754
    00755 /**
    00756  *  @brief This function receives response. It automatically retries at where pipeline stalled if
    00757  *     pipeline is enable.
    00758  *
    00759  *  Because the data streaming could block and resume at where the pipeline was
    00760  *  stalled, the application can call this function in a loop until the receiving is finished.
    00761  *
    00762  *  @param refnum:  IN:  Library reference number.
    00763  *  @param stream:  IN:  The handle of stream instance.
    00764  *  @param *out_buf:    OUT:  The pointer to the receive buffer.
    00765  *  @param in_len:  IN:  The size of the receive buffer (byte).
    00766  *  @param *out_len:    OUT:  The received size (byte).
    00767  *  @param *out_sleep:  OUT:  The time of the application can sleep (msec)
    00768  *                This value is not used for application.
    00769  *  @return
    00770  *      httpErrorOK receiving done
    00771  *      httpErrorWouldBlock application can call this function
    00772  *      consecutively
    00773  *      httpErrorIOSleep application can sleep
    00774  *      httpErrorNoMem memory shortage
    00775  *      httpErrorTCPRead cannot read TCP
    00776  *      httpErrorTCPWrite cannot write TCP
    00777  *      httpErrorSSLHandShake cannot SSL handshake
    00778  *      httpErrorSSLRead cannot read SSL
    00779  *      httpErrorSSLWrite cannot write SSL
    00780  *      httpErrorReqTimedout request timeout
    00781  *      httpErrorRspTimedout response timeout
    00782  *      httpErrorAuthUnknown unknown authentication type
    00783  *      httpErrorAuthNoHeader authentication request without
    00784  *      authentication header
    00785  *      httpErrorAuthFormat wrong format of authentication header
    00786  *      httpErrorRedirectFormat wrong format of redirect header
    00787  *      httpErrorRedirectCanceled redirect is canceled by user
    00788  *      httpErrorRspHeaderSizeOver size over of response header
    00789  *      httpErrorReqTooManyContinue it exceeds the limit times of Continue
    00790  **/
    00791 Int32 HS_HTTPLibStreamReceiveResponse(UInt16 refnum, HS_HTTPLibStream stream, Char *out_buf, Int32 in_len, Int32 *out_len, Int32 *out_sleep)
    00792         SYS_TRAP(kHTTPLibTrapStreamReceiveResponse);
    00793
    00794 /**
    00795  *  @brief
    00796  *
    00797  *  @param refnum:  IN:
    00798  *  @param stream:  IN:
    00799  *  @retval Err error code.
    00800  **/
    00801 Int32 HS_HTTPLibStreamGetFlag(UInt16 refnum, HS_HTTPLibStream stream)
    00802         SYS_TRAP(kHTTPLibTrapStreamGetFlag);
    00803
    00804 /**
    00805  *  @brief
    00806  *
    00807  *  @param refnum:  IN:
    00808  *  @param stream:  IN:
    00809  *  @retval Err error code.
    00810  **/
    00811 void HS_HTTPLibStreamSuspendTimer(UInt16 refnum, HS_HTTPLibStream stream)
    00812         SYS_TRAP(kHTTPLibTrapStreamSuspendTimer);
    00813 /**
    00814  *  @brief
    00815  *
    00816  *  @param refnum:  IN:
    00817  *  @param stream:  IN:
    00818  *  @retval Err error code.
    00819  **/
    00820 void HS_HTTPLibStreamResumeTimer(UInt16 refnum, HS_HTTPLibStream stream)
    00821         SYS_TRAP(kHTTPLibTrapStreamResumeTimer);
    00822
    00823 /**
    00824  *  @brief This function closes the HTTP stream. If the TCP/SSL socket is in keep-alive, it is
    00825  *     not closed.
    00826  *
    00827  *  @param refnum:  IN:  Library reference number
    00828  *  @param stream:  IN:  The handle of stream instance.
    00829  *  @return None.
    00830  **/
    00831 void HS_HTTPLibStreamClose(UInt16 refnum, HS_HTTPLibStream stream)
    00832         SYS_TRAP(kHTTPLibTrapStreamClose);
    00833
    00834 /**
    00835  *  @brief This function returns whether the response header is completely received.
    00836  *
    00837  *  This function is typically called after HS_HTTPLibStreamReceiveResponse when
    00838  *  receiving the response header.
    00839  *
    00840  *  @param refnum:  IN:  Library reference number.
    00841  *  @param stream:  IN:  The handle of stream instance.
    00842  *  @return
    00843  *      True if header is completely received.
    00844  *      False if header is not received.
    00845  **/
    00846 Boolean HS_HTTPLibStreamIsHeaderReceived(UInt16 refnum, HS_HTTPLibStream stream)
    00847         SYS_TRAP(kHTTPLibTrapStreamIsHeaderReceived);
    00848
    00849 /**
    00850  *  @brief This function sets the POST data.
    00851  *
    00852  *  @param refnum:  IN:  Library reference number.
    00853  *  @param stream:  IN:  The handle of stream instance.
    00854  *  @param in_encoding: IN:  The type of encoding.
    00855  *               httpPostURLENCODED URL encoding
    00856  *               httpPostPLAINTEXT plain text (non encoding)
    00857  *               httpPostMULTIPART multi-part encoding
    00858  *  @param *in_data:    IN:  The pointer to the POST data.
    00859  *  @param in_len:  IN:  The length of in_data.
    00860  *  @return
    00861  *      httpErrorOK setting done
    00862  *      httpErrorNoMem memory shortage
    00863  *      httpErrorReqBodySizeOver the size of request body exceeds limit. If the
    00864  *      application does not set the limit by
    00865  *      HS_HTTPLibSetMaxRequestBody,
    00866  *      httpErrorReqBodySizeOver is not returned.
    00867  **/
    00868 Int32 HS_HTTPLibStreamSetPostData(UInt16 refnum, HS_HTTPLibStream stream, Int32 in_encoding, Char *in_data, Int32 in_len)
    00869         SYS_TRAP(kHTTPLibTrapStreamSetPostData);
    00870
    00871 /**
    00872  *  @brief This function returns the scheme given at the HS_HTTPLibStreamCreateRequest.
    00873  *
    00874  *  @param refnum:  IN:  Library reference number.
    00875  *  @param stream:  IN:  The handle of stream instance.
    00876  *  @return
    00877  *      httpSchemeHTTP HTTP
    00878  *      httpSchemeHTTPS HTTPS
    00879  **/
    00880 Int32 HS_HTTPLibStreamGetScheme(UInt16 refnum, HS_HTTPLibStream stream)
    00881         SYS_TRAP(kHTTPLibTrapStreamGetScheme);
    00882
    00883 /**
    00884  *  @brief This function returns the state of the stream. The state changes follow the below
    00885  *     sequence (but skipping the states that are not relevant to the current request).
    00886  *
    00887  *  @param refnum:  IN:  Library reference number.
    00888  *  @param stream:  IN:  The handle of stream instance.
    00889  *  @return
    00890  *      httpStreamStateNew The instance is created
    00891  *      httpStreamStateDormant The instance is dormant
    00892  *      httpStreamStateReqCreated The request is created
    00893  *      httpStreamStateReqResolve Name resolve begins
    00894  *      httpStreamStateReqResolving Name resolving
    00895  *      httpStreamStateReqOpen TCP/SSL open
    00896  *      httpStreamStateReqConnect TCP connect begins
    00897  *      httpStreamStateReqConnecting TCP connecting
    00898  *      httpStreamStateReqProxyConnect Proxy Tunneling begins
    00899  *      httpStreamStateReqProxyConnecting Proxy Tunneling
    00900  *      httpStreamStateReqSSLHandShaking SSL HandShaking
    00901  *      httpStreamStateReqSSLHandShaked SSL handShake done
    00902  *      httpStreamStateReqSending Sending the request
    00903  *      httpStreamStateReqSent Sending the request done
    00904  *      httpStreamStateRspHeaderWaiting Waiting the response header
    00905  *      httpStreamStateRspContinue Waiting response receiving done for
    00906  *      Status-Code 100
    00907  *      httpStreamStateRspHeaderReceiving Receiving the response header
    00908  *      httpStreamStateRspHeaderReceived Receiving the response header done
    00909  *      httpStreamStateRspEntityReceiving Receiving the response body
    00910  **/
    00911 Int32 HS_HTTPLibStreamGetState(UInt16 refnum, HS_HTTPLibStream stream)
    00912         SYS_TRAP(kHTTPLibTrapStreamGetState);
    00913
    00914 /**
    00915  *  @brief This function returns the Status Code.
    00916  *
    00917  *  @param refnum:  IN:  Library reference number.
    00918  *  @param stream:  IN:  The handle of stream instance.
    00919  *  @return
    00920  *      httpStatusCodeContinue 100
    00921  *      httpStatusCodeSwitchingProtocols 101
    00922  *      httpStatusCodeOK 200
    00923  *      httpStatusCodeCreated 201
    00924  *      httpStatusCodeAccepted 202
    00925  *      httpStatusCodeNonAuthoritativeInformation 203
    00926  *      httpStatusCodeNoContent 204
    00927  *      httpStatusCodeResetContent 205
    00928  *      httpStatusCodePartialContent 206
    00929  *      httpStatusCodeMultipleChoices 300
    00930  *      httpStatusCodeMovedPermanently 301
    00931  *      httpStatusCodeFound 302
    00932  *      httpStatusCodeSeeOther 303
    00933  *      httpStatusCodeNotModified 304
    00934  *      httpStatusCodeUseProxy 305
    00935  *      httpStatusCodeTemporaryRedirect 307
    00936  *      httpStatusCodeBadRequest 400
    00937  **/
    00938 Int32 HS_HTTPLibStreamGetStatusCode(UInt16 refnum, HS_HTTPLibStream stream)
    00939         SYS_TRAP(kHTTPLibTrapStreamGetStatusCode);
    00940
    00941 /**
    00942  *  @brief This function returns the size of the response header.
    00943  *
    00944  *  @param refnum:  IN:  Library reference number.
    00945  *  @param stream:  IN:  The handle of stream instance.
    00946  *  @return
    00947  *      header size (byte)
    00948  *      -1 if not received
    00949  **/
    00950 Int32 HS_HTTPLibStreamGetResponseHeaderLength(UInt16 refnum, HS_HTTPLibStream stream)
    00951         SYS_TRAP(kHTTPLibTrapStreamGetResponseHeaderLength);
    00952
    00953 /**
    00954  *  @brief This function returns the handle of the response header. The responsibility to
    00955  *     delete the handle is library, the application can not delete this return value.
    00956  *     To lock/unlock the handle, the application should use the APIs,
    00957  *
    00958  *  @param refnum:  IN:  Library reference number.
    00959  *  @param stream:  IN:  The handle of stream instance.
    00960  *  @return
    00961  *      non NULL the handle of header
    00962  *      NULL if not received
    00963  **/
    00964 HS_HTTPLibVHandle HS_HTTPLibStreamGetResponseHeader(UInt16 refnum, HS_HTTPLibStream stream)
    00965         SYS_TRAP(kHTTPLibTrapStreamGetResponseHeader);
    00966
    00967 /**
    00968  *  @brief This function returns the content’s size (byte).
    00969  *
    00970  *  @param refnum:  IN:  Library reference number.
    00971  *  @param stream:  IN:  The handle of stream instance.
    00972  *  @return
    00973  *      The Content-Length (byte)
    00974  *      -1 if not received
    00975  **/
    00976 Int32 HS_HTTPLibStreamGetContentLength(UInt16 refnum, HS_HTTPLibStream stream)
    00977         SYS_TRAP(kHTTPLibTrapStreamGetContentLength);
    00978
    00979 /**
    00980  *  @brief This function returns the size of response body (byte).
    00981  *
    00982  *  @param refnum:  IN:  Library reference number.
    00983  *  @param stream:  IN:  The handle of stream instance.
    00984  *  @return
    00985  *      The size of response body (byte)
    00986  *      -1 if not received
    00987  **/
    00988 Int32 HS_HTTPLibStreamGetEntityLength(UInt16 refnum, HS_HTTPLibStream stream)
    00989         SYS_TRAP(kHTTPLibTrapStreamGetEntityLength);
    00990
    00991 /**
    00992  *  @brief This function adds the line to the Request header. If there is already the same kind
    00993  *          of header line, old one is deleted.
    00994  *
    00995  *  @param refnum:  IN:  Library reference number.
    00996  *  @param stream:  IN:  The handle of stream instance.
    00997  *  @param *in_str: IN:  The pointer to the header strong to add.
    00998  *  @param in_len:  IN:  The length of in_str.
    00999  *  @return
    01000  *      True if successful.
    01001  *      False failed (memory shortage)
    01002  **/
    01003 Boolean HS_HTTPLibStreamAddHeaderLine(UInt16 refnum, HS_HTTPLibStream stream, Char *in_str, Int32 in_len)
    01004         SYS_TRAP(kHTTPLibTrapStreamAddHeaderLine);
    01005
    01006 /**
    01007  *  @brief This function sets the value of corresponding header. If there is already the same
    01008  *         kind of header line, old one is deleted.
    01009  *
    01010  *  @param refnum:  IN:  Library reference number.
    01011  *  @param stream:  IN:  The handle of stream instance.
    01012  *  @param in_type: IN:  The type of header (See httpHeaderIDEnum).
    01013  *  @param *in_str: IN:  The pointer to the header value string.
    01014  *  @param in_len:  IN:  The length of in_str.
    01015  *  @return
    01016  *      True if successful
    01017  *      False failed (memory shortage)
    01018  **/
    01019 Boolean HS_HTTPLibStreamAddHeader(UInt16 refnum, HS_HTTPLibStream stream, Int32 in_type, Char *in_str, Int32 in_len)
    01020         SYS_TRAP(kHTTPLibTrapStreamAddHeader);
    01021
    01022 /**
    01023  *  @brief This function returns the offset and length of corresponding header value.
    01024  *
    01025  *  @param refnum:  IN:  Library reference number.
    01026  *  @param stream:  IN:  The handle of stream instance.
    01027  *  @param in_type: IN:  The type of header (See httpHeaderIDEnum).
    01028  *  @param *out_off:    IN:  The offset to the header value.
    01029  *  @param *out_len:    IN:  The length of corresponding header value.
    01030  *  @return
    01031  *      True if successful
    01032  *      False there is no corresponding header
    01033  **/
    01034 Boolean HS_HTTPLibStreamGetHeader(UInt16 refnum, HS_HTTPLibStream stream, Int32 in_type, Int32 *out_off, Int32 *out_len)
    01035         SYS_TRAP(kHTTPLibTrapStreamGetHeader);
    01036
    01037 /**
    01038  *  @brief This function returns the Server certification used for SSL. The responsibility to
    01039  *     delete the return handle is the application. To delete the return value, the
    01040  *     application should use HS_HTTPLibCertListDelete.
    01041  *
    01042  *  @param refnum:  IN:  Library reference number.
    01043  *  @param stream:  IN:  The handle of stream instance.
    01044  *  @return
    01045  *      The handle of SSL server certification chain.
    01046  *      NULL if no server certification or memory shortage.
    01047  **/
    01048 HS_HTTPLibCertList HS_HTTPLibMakeCertList(UInt16 refnum, HS_HTTPLibStream stream)
    01049         SYS_TRAP(kHTTPLibTrapMakeCertList);
    01050
    01051 /**
    01052  *  @brief
    01053  *
    01054  *  @param refnum:  IN:
    01055  *  @param *inout_ss:   IN:
    01056  *  @param in_id:   IN:
    01057  *  @param *in_cs:  IN:
    01058  *  @retval Err error code.
    01059  **/
    01060 Boolean HS_HTTPLibHeaderSplitByX(UInt16 refnum, HS_HTTPLibSplit *inout_ss, Int32 in_id, Char *in_cs)
    01061         SYS_TRAP(kHTTPLibTrapHeaderSplitByX);
    01062
    01063 /**
    01064  *  @brief This function initialize/finalize the HS_HTTPLibAuthInfo struct. The application
    01065  *      should call this function setting in_new = true before using HS_HTTPLibAuthInfo.
    01066  *      The application should call this function setting in_new = false after using
    01067  *      HS_HTTPLibAuthInfo.
    01068  *
    01069  *  @param refnum:  IN:  Library reference number.
    01070  *  @param *in_info:    IN:  The pointer to the authenticate information struct.
    01071  *  @param in_new:  IN:  True if initialize the member.
    01072  *               False if initialize the member after deleting.
    01073  *  @return None.
    01074  **/
    01075 void HS_HTTPLibAuthInfoTidy(UInt16 refnum, HS_HTTPLibAuthInfo *in_info, Boolean in_new)
    01076         SYS_TRAP(kHTTPLibTrapAuthInfoTidy);
    01077
    01078 /**
    01079  *  @brief This function sets the authentication information.
    01080  *
    01081  *  @param refnum:  IN:  Library reference number.
    01082  *  @param libH:    IN:  The handle of HTTP library instance.
    01083  *  @param in_type: IN:  The authentication type.
    01084  *               httpAuthTypeBasic      Basic authentication
    01085  *                   httpAuthTypeDigest     Digest Authentication
    01086  *  @param in_target:   IN:  The authentication target.
    01087  *               httpAuthTargetPage     Authentication Information for Page
    01088  *               httpAuthTargetProxy    Authentication Information for Proxy
    01089  *  @param *in_challenge:   IN:  The challenge.
    01090  *  @param *in_realm:   IN:  The realm.
    01091  *  @param *in_user:    IN:  The pointer to the User ID.
    01092  *  @param in_user_len: IN:  The length of in_user.
    01093  *  @param *in_pass:    IN:  The pointer to the Password.
    01094  *  @param in_pass_len: IN:  The length of in_pass.
    01095  *  @param *in_url: IN:  The pointer to the URL (httpAuthTargetPage only).
    01096  *  @param in_url_len:  IN:  The length of in_url.
    01097  *  @param *in_host:    IN:  The pointer to the proxy host name (httpAuthTargetProxy only).
    01098  *  @param in_host_len: IN:  The length of in_host.
    01099  *  @param in_port: IN:  The port of proxy (httpAuthTargetProxy only).
    01100  *  @return
    01101  *      True if setting successful.
    01102  *      False if failed (memory shortage).
    01103  **/
    01104 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)
    01105         SYS_TRAP(kHTTPLibTrapSetUserPass);
    01106
    01107 /**
    01108  *  @brief
    01109  *
    01110  *  @param refnum:  IN:
    01111  *  @param libH:    IN:
    01112  *  @param in_target:   IN:
    01113  *  @param *in_url: IN:
    01114  *  @param in_url_len:  IN:
    01115  *  @param *in_host:    IN:
    01116  *  @param in_host_len: IN:
    01117  *  @param in_port: IN:
    01118  *  @param *in_realm:   IN:
    01119  *  @param *out_info:   IN:
    01120  *  @retval Err error code.
    01121  **/
    01122 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)
    01123         SYS_TRAP(kHTTPLibTrapFindAuthInfo);
    01124
    01125 /**
    01126  *  @brief This function returns the authentication information to the out_info. Before calling
    01127  *     this API, the application should intialize HS_HTTPLibAuthInfo by
    01128  *     HS_HTTPLibAuthInfoTidy(out_info, true).
    01129  *
    01130  *     After using the authentication information, the application should finalize
    01131  *     HS_HTTPLibAuthInfoTidy by HS_HTTPLibAuthInfoTidy(out_info, false).
    01132  *
    01133  *  @param refnum:  IN:  Library reference number.
    01134  *  @param libH:    IN:  The handle of HTTP library instance.
    01135  *  @param in_target:   IN:  The authentication target.
    01136  *               httpAuthTargetPage     Authentication Information for Page
    01137  *               httpAuthTargetProxy    Authentication Information for Proxy
    01138  *  @param *in_url: IN:  The pointer to the URL (httpAuthTargetPage only).
    01139  *  @param in_url_len:  IN:  The length of in_url.
    01140  *  @param *in_host:    IN:  The pointer to the proxy host name (httpAuthTargetProxy only).
    01141  *  @param in_host_len: IN:  The length of in_host.
    01142  *  @param in_port: IN:  The port of proxy (httpAuthTargetProxy only).
    01143  *  @param *in_realm:   IN:  The realm.
    01144  *  @param *out_info:   OUT:  The pointer to the authentication information.
    01145  *  @return
    01146  *      True if setting successful.
    01147  *      False if failed (no information in cache or memory shortage).
    01148  **/
    01149 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)
    01150         SYS_TRAP(kHTTPLibTrapMakeAuthInfo);
    01151
    01152 /**
    01153  *  @brief This function returns the User Name. The application should not delete this return value.
    01154  *
    01155  *  @param refnum:  IN:  Library reference number.
    01156  *  @param *in_info:    IN:  The pointer to the authentication information.
    01157  *  @return The handle of User Name.
    01158  **/
    01159 HS_HTTPLibString HS_HTTPLibAuthInfoUser(UInt16 refnum, HS_HTTPLibAuthInfo *in_info)
    01160         SYS_TRAP(kHTTPLibTrapAuthInfoUser);
    01161
    01162 /**
    01163  *  @brief This function returns the Password. The application should not delete this return value.
    01164  *
    01165  *  @param refnum:  IN:  Library reference number.
    01166  *  @param *in_info:    IN:  The pointer to the authentication information.
    01167  *  @return The handle of password.
    01168  **/
    01169 HS_HTTPLibString HS_HTTPLibAuthInfoPass(UInt16 refnum, HS_HTTPLibAuthInfo *in_info)
    01170         SYS_TRAP(kHTTPLibTrapAuthInfoPass);
    01171
    01172 /**
    01173  *  @brief This function returns the Realm. The application should not delete this return value.
    01174  *
    01175  *  @param refnum:  IN:  Library reference number.
    01176  *  @param *in_info:    IN:  The pointer to the authentication information.
    01177  *  @return
    01178  *      The handle of Realm.
    01179  **/
    01180 HS_HTTPLibString HS_HTTPLibAuthInfoRealm(UInt16 refnum, HS_HTTPLibAuthInfo *in_info)
    01181         SYS_TRAP(kHTTPLibTrapAuthInfoRealm);
    01182
    01183 /**
    01184  *  @brief
    01185  *
    01186  *  @param refnum:  IN:
    01187  *  @param *in_challenge_ss:    IN:
    01188  *  @param *in_token:   IN:
    01189  *  @param *out_ss: IN:
    01190  *  @retval Err error code.
    01191  **/
    01192 Boolean HS_HTTPLibAuthCacheGetChallengeTokenSS(UInt16 refnum, HS_HTTPLibSplit *in_challenge_ss, Char *in_token, HS_HTTPLibSplit *out_ss)
    01193         SYS_TRAP(kHTTPLibTrapAuthCacheGetChallengeTokenSS);
    01194
    01195 /**
    01196  *  @brief This function sets the Cookie mode.
    01197  *
    01198  *  @param refnum:  IN:  Library reference number.
    01199  *  @param libH:    IN:  The handle of HTTP library instance.
    01200  *  @param in_mode:     IN:  The mode of receiving Cookie.
    01201  *               httpCookieNotifyBeforeSet  Confirm before Cookie set
    01202  *               httpCookieAlwaysSet    Cookie is always set
    01203  *               httpCookieNeverSet     Cookie is not set
    01204  *  @param in_cb:   IN:  The confirm callback function.
    01205  *  @param in_opaque::  IN:  The opaque which is given to the callback function.
    01206  *  @return None.
    01207  **/
    01208 void HS_HTTPLibSetCookieMode(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_mode, HS_HTTPLibCookieConfirmProc in_cb, HS_HTTPLibOpaque in_opaque)
    01209         SYS_TRAP(kHTTPLibTrapSetCookieMode);
    01210
    01211 /**
    01212  *  @brief This function sets the max size of Cookie entries.
    01213  *
    01214  *  @param refnum:  IN:  Library reference number.
    01215  *  @param libH:    IN:  The handle of HTTP library instance.
    01216  *  @param in_max_total_cookies:    IN:  The size of max Cookie entries.
    01217  *  @param in_max_cookies_per_domain:   IN:  The size of Cookie entries per one domain.
    01218  *  @param in_max_len_per_cookie:   IN:  The max size of one Cookie.
    01219  *  @return None.
    01220  **/
    01221 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)
    01222         SYS_TRAP(kHTTPLibTrapSetCookieMax);
    01223
    01224 /**
    01225  *  @brief This function sets the Cookie abiding with the confirmation mode set by
    01226  *     HS_HTTPLibSetCookieMode. The application should not use this API in callback
    01227  *     function. The API HS_HTTPLibSetCookieX is designed for use in callback.
    01228  *
    01229  *  @param refnum:  IN:  Library reference number.
    01230  *  @param libH:    IN:  The handle of HTTP library instance.
    01231  *  @param in_url:  IN:  The handle of URL.
    01232  *  @param *in_header:  IN:  The pointer to the header string.
    01233  *  @param in_header_len:   IN:  The length of in_header.
    01234  *  @return
    01235  *      httpErrorOK     Cookie is set.
    01236  *      httpErrorNoMem  memory shortage
    01237  *      httpErrorInval  failed by other reason
    01238  **/
    01239 Int32 HS_HTTPLibSetCookie(UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibURLString in_url, Char *in_header, Int32 in_header_len)
    01240         SYS_TRAP(kHTTPLibTrapSetCookie);
    01241
    01242 /**
    01243  *  @brief This function sets the Cookie. This function is designed for callback confirm function.
    01244  *
    01245  *  @param refnum:  IN:  Library reference number.
    01246  *  @param libH:    IN:  The handle of HTTP library instance.
    01247  *  @param in_url:  IN:  The handle of URL.
    01248  *  @param *in_header:  IN:  The pointer to the header string.
    01249  *  @param in_header_len:   IN:  The length of in_header.
    01250  *  @return
    01251  *      httpErrorOK     Cookie is set.
    01252  *      httpErrorNoMem  memory shortage
    01253  *      httpErrorInval  failed by other reason
    01254  **/
    01255 Int32 HS_HTTPLibSetCookieX(UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibURLString in_url, Char *in_header, Int32 in_header_len)
    01256         SYS_TRAP(kHTTPLibTrapSetCookieX);
    01257
    01258 /**
    01259  *  @brief
    01260  *
    01261  *  @param refnum:  IN:
    01262  *  @param libH:    IN:
    01263  *  @param *in_url:     IN:
    01264  *  @param in_urllen:   IN:
    01265  *  @param in_secure:   IN:
    01266  *  @param *out_len:    IN:
    01267  *  @retval Err error code.
    01268  **/
    01269 HS_HTTPLibString HS_HTTPLibMakeCookiesString(UInt16 refnum, HS_HTTPLibHandle libH, Char *in_url, Int32 in_urllen, Boolean in_secure, Int32 *out_len)
    01270         SYS_TRAP(kHTTPLibTrapMakeCookiesString);
    01271
    01272 /**
    01273  *  @brief
    01274  *
    01275  *  @param refnum:  IN:
    01276  *  @param libH:    IN:
    01277  *  @param *out_len:    IN:
    01278  *  @retval Err error code.
    01279  **/
    01280 HS_HTTPLibString HS_HTTPLibSaveCookiesEntries(UInt16 refnum, HS_HTTPLibHandle libH, Int32 *out_len)
    01281         SYS_TRAP(kHTTPLibTrapSaveCookiesEntries);
    01282
    01283 /**
    01284  *  @brief
    01285  *
    01286  *  @param refnum:  IN:
    01287  *  @param libH:    IN:
    01288  *  @param *in_s:   IN:
    01289  *  @param in_slen: IN:
    01290  *  @retval Err error code.
    01291  **/
    01292 Boolean HS_HTTPLibLoadCookiesEntries(UInt16 refnum, HS_HTTPLibHandle libH, Char *in_s, Int32 in_slen)
    01293         SYS_TRAP(kHTTPLibTrapLoadCookiesEntries);
    01294
    01295 /**
    01296  *  @brief This function clears Cookies.
    01297  *
    01298  *  @param refnum:  IN:  Library reference number.
    01299  *  @param libH:    IN:  The handle of HTTP library instance.
    01300  *  @param in_flag:     IN:  httpCookieClearAll         clear all Cookies
    01301  *               httpCookieClearSessionCookiesOnly  clear session Cookies only
    01302  *  @return None.
    01303  **/
    01304 void HS_HTTPLibCookieMakeEmpty(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_flag)
    01305         SYS_TRAP(kHTTPLibTrapCookieMakeEmpty);
    01306
    01307 /**
    01308  *  @brief
    01309  *
    01310  *  @param refnum:  IN:
    01311  *  @param libH:    IN:
    01312  *  @param in_retry:    IN:
    01313  *  @retval Err error code.
    01314  **/
    01315 void HS_HTTPLibSetDNSMaxRetry(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_retry)
    01316         SYS_TRAP(kHTTPLibTrapSetDNSMaxRetry);
    01317
    01318 /**
    01319  *  @brief
    01320  *
    01321  *  @param refnum:  IN:
    01322  *  @param libH:    IN:
    01323  *  @param in_interval:     IN:
    01324  *  @retval Err error code.
    01325  **/
    01326 void HS_HTTPLibSetDNSRetryInterval(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_interval)
    01327         SYS_TRAP(kHTTPLibTrapSetDNSRetryInterval);
    01328
    01329 /**
    01330  *  @brief Set the SSL version.
    01331  *
    01332  *  @param refnum:  IN:  Library reference number.
    01333  *  @param libH:    IN:  The handle of HTTP library instance.
    01334  *  @param in_flag: IN:  -
    01335  *  @param in_on:   IN:  -
    01336  *  @return None.
    01337  **/
    01338 void HS_HTTPLibSetSSLVersionFlag(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_flag, Boolean in_on)
    01339         SYS_TRAP(kHTTPLibTrapSetSSLVersionFlag);
    01340
    01341 /**
    01342  *  @brief Set the timeout period for SSL use.
    01343  *
    01344  *  @param refnum:  IN:  Library reference number.
    01345  *  @param libH:    IN:  The handle of HTTP library instance.
    01346  *  @return Timeout.
    01347  **/
    01348 Int32 HS_HTTPLibSSLTimeout(UInt16 refnum, HS_HTTPLibHandle libH)
    01349         SYS_TRAP(kHTTPLibTrapSSLTimeout);
    01350
    01351 /**
    01352  *  @brief TBD
    01353  *
    01354  *  @param refnum:  IN:  Library reference number.
    01355  *  @param libH:    IN:  The handle of HTTP library instance.
    01356  *  @param *out_list:   OUT:  -
    01357  *  @retval Int32
    01358  **/
    01359 Int32 HS_HTTPLibSSLOpenCertDB(UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibCertList *out_list)
    01360         SYS_TRAP(kHTTPLibTrapSSLOpenCertDB);
    01361
    01362 /**
    01363  *  @brief TBD
    01364  *
    01365  *  @param refnum:  IN:  Library reference number.
    01366  *  @param libH:    IN:  The handle of HTTP library instance.
    01367  *  @return None.
    01368  **/
    01369 void HS_HTTPLibSSLCloseCertDB(UInt16 refnum, HS_HTTPLibHandle libH)
    01370         SYS_TRAP(kHTTPLibTrapSSLCloseCertDB);
    01371
    01372 /**
    01373  *  @brief
    01374  *
    01375  *  @param refnum:  IN:
    01376  *  @param in_type: IN:
    01377  *  @return
    01378  **/
    01379 HS_HTTPLibCertList HS_HTTPLibCertListNew(UInt16 refnum, Int32 in_type)
    01380         SYS_TRAP(kHTTPLibTrapCertListNew);
    01381
    01382 /**
    01383  *  @brief TBD
    01384  *
    01385  *  @param refnum:  IN:  Library reference number.
    01386  *  @param in_list: IN:  The handle of the server’s certification list.
    01387  *  @return None.
    01388  **/
    01389 void HS_HTTPLibCertListDelete(UInt16 refnum, HS_HTTPLibCertList in_list)
    01390         SYS_TRAP(kHTTPLibTrapCertListDelete);
    01391
    01392 /**
    01393  *  @brief TBD
    01394  *
    01395  *  @param refnum:  IN:  Library reference number.
    01396  *  @param in_list: IN:  The handle of the server’s certification list.
    01397  *  @return Handle to the clone of the certification list.
    01398  **/
    01399 HS_HTTPLibCertList HS_HTTPLibCertListClone(UInt16 refnum, HS_HTTPLibCertList in_list)
    01400         SYS_TRAP(kHTTPLibTrapCertListClone);
    01401
    01402 /**
    01403  *  @brief Lock the certificate list and return its pointer.
    01404  *
    01405  *  @param refnum:  IN:  Library reference number.
    01406  *  @param in_list: IN:  The handle of the server's certification list.
    01407  *  @return Pointer to the certificate list.
    01408  **/
    01409 void *HS_HTTPLibCertListLock(UInt16 refnum, HS_HTTPLibCertList in_list)
    01410         SYS_TRAP(kHTTPLibTrapCertListLock);
    01411
    01412 /**
    01413  *  @brief Unlock the certificate list
    01414  *
    01415  *  @param refnum:  IN:  Library reference number.
    01416  *  @param in_list: IN:  The handle of the server’s certification list.
    01417  *  @return None.
    01418  **/
    01419 void HS_HTTPLibCertListUnlock(UInt16 refnum, HS_HTTPLibCertList in_list)
    01420         SYS_TRAP(kHTTPLibTrapCertListUnlock);
    01421
    01422 /**
    01423  *  @brief TBD
    01424  *
    01425  *  @param refnum:  IN:  Library reference number.
    01426  *  @param in_list: IN:  The handle of the server’s certification list.
    01427  *  @retval Int32
    01428  **/
    01429 Int32 HS_HTTPLibCertListType(UInt16 refnum, HS_HTTPLibCertList in_list)
    01430         SYS_TRAP(kHTTPLibTrapCertListType);
    01431
    01432 /**
    01433  *  @brief TBD
    01434  *
    01435  *  @param refnum:  IN:  Library reference number.
    01436  *  @param in_list: IN:  The handle of the server’s certification list.
    01437  *  @retval Int32
    01438  **/
    01439 Int32 HS_HTTPLibCertListLength(UInt16 refnum, HS_HTTPLibCertList in_list)
    01440         SYS_TRAP(kHTTPLibTrapCertListLength);
    01441
    01442 /**
    01443  *  @brief TBD
    01444  *
    01445  *  @param refnum:  IN:  Library reference number.
    01446  *  @param in_list: IN:  The handle of the server’s certification list.
    01447  *  @param in_index:    IN:  -
    01448  *  @param *out_cert:   OUT: -
    01449  *  @retval Int32
    01450  **/
    01451 Int32 HS_HTTPLibCertListBeginDecode(UInt16 refnum, HS_HTTPLibCertList in_list, Int32 in_index, HS_HTTPLibCertPtr *out_cert)
    01452         SYS_TRAP(kHTTPLibTrapCertListBeginDecode);
    01453
    01454 /**
    01455  *  @brief TBD
    01456  *
    01457  *  @param refnum:  IN:  Library reference number.
    01458  *  @param in_list: IN:  The handle of the server’s certification list.
    01459  *  @param in_cert:     IN:  -
    01460  *  @return None.
    01461  **/
    01462 void HS_HTTPLibCertListEndDecode(UInt16 refnum, HS_HTTPLibCertList in_list, HS_HTTPLibCertPtr in_cert)
    01463         SYS_TRAP(kHTTPLibTrapCertListEndDecode);
    01464
    01465 /**
    01466  *  @brief TBD
    01467  *
    01468  *  @param refnum:  IN:  Library reference number.
    01469  *  @param in_list: IN:  The handle of the server’s certification list.
    01470  *  @param *in_info:    IN:  -
    01471  *  @param in_over_write:   IN:  -
    01472  *  @retval Int32
    01473  **/
    01474 Int32 HS_HTTPLibCertListImportCert(UInt16 refnum, HS_HTTPLibCertList in_list, void *in_info, Boolean in_over_write)
    01475         SYS_TRAP(kHTTPLibTrapCertListImportCert);
    01476
    01477 /**
    01478  *  @brief
    01479  *
    01480  *  @param refnum:  IN:
    01481  *  @param in_cert: IN:
    01482  *  @retval Err error code.
    01483  **/
    01484 Int32 HS_HTTPLibCertPeekVersion(UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    01485         SYS_TRAP(kHTTPLibTrapCertPeekVersion);
    01486
    01487 /**
    01488  *  @brief
    01489  *
    01490  *  @param refnum:  IN:
    01491  *  @param in_cert: IN:
    01492  *  @param **out_str:   IN:
    01493  *  @retval Err error code.
    01494  **/
    01495 Int32 HS_HTTPLibCertPeekSerialNumber(UInt16 refnum, HS_HTTPLibCertPtr in_cert, Char **out_str)
    01496         SYS_TRAP(kHTTPLibTrapCertPeekSerialNumber);
    01497
    01498 /**
    01499  *  @brief
    01500  *
    01501  *  @param refnum:  IN:
    01502  *  @param in_cert: IN:
    01503  *  @retval Err error code.
    01504  **/
    01505 Int32 HS_HTTPLibCertPeekSignAlgo(UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    01506         SYS_TRAP(kHTTPLibTrapCertPeekSignAlgo);
    01507
    01508 /**
    01509  *  @brief
    01510  *
    01511  *  @param refnum:  IN:
    01512  *  @param in_cert: IN:
    01513  *  @param in_attr:     IN:
    01514  *  @retval Err error code.
    01515  **/
    01516 Boolean HS_HTTPLibCertBeginPeekIssuerRDN(UInt16 refnum, HS_HTTPLibCertPtr in_cert, Int32 in_attr)
    01517         SYS_TRAP(kHTTPLibTrapCertBeginPeekIssuerRDN);
    01518
    01519 /**
    01520  *  @brief
    01521  *
    01522  *  @param refnum:  IN:
    01523  *  @param in_cert: IN:
    01524  *  @param **out_str:   IN:
    01525  *  @retval Err error code.
    01526  **/
    01527 Int32 HS_HTTPLibCertPeekIssuerRDN(UInt16 refnum, HS_HTTPLibCertPtr in_cert, Char **out_str)
    01528         SYS_TRAP(kHTTPLibTrapCertPeekIssuerRDN);
    01529
    01530 /**
    01531  *  @brief
    01532  *
    01533  *  @param refnum:  IN:
    01534  *  @param in_cert: IN:
    01535  *  @retval Err error code.
    01536  **/
    01537 Int32 HS_HTTPLibCertPeekIssuerRDNStrType(UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    01538         SYS_TRAP(kHTTPLibTrapCertPeekIssuerRDNStrType);
    01539
    01540 /**
    01541  *  @brief
    01542  *
    01543  *  @param refnum:  IN:
    01544  *  @param in_cert: IN:
    01545  *  @retval Err error code.
    01546  **/
    01547 void HS_HTTPLibCertEndPeekIssuerRDN(UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    01548         SYS_TRAP(kHTTPLibTrapCert_EndPeekIssuerRDN);
    01549
    01550 /**
    01551  *  @brief
    01552  *
    01553  *  @param refnum:  IN:
    01554  *  @param in_cert: IN:
    01555  *  @param in_attr:     IN:
    01556  *  @retval Err error code.
    01557  **/
    01558 Boolean HS_HTTPLibCertBeginPeekSubjectRDN(UInt16 refnum, HS_HTTPLibCertPtr in_cert, Int32 in_attr)
    01559         SYS_TRAP(kHTTPLibTrapCertBeginPeekSubjectRDN);
    01560
    01561 /**
    01562  *  @brief
    01563  *
    01564  *  @param refnum:  IN:
    01565  *  @param in_cert: IN:
    01566  *  @param **out_str:   IN:
    01567  *  @retval Err error code.
    01568  **/
    01569 Int32 HS_HTTPLibCertPeekSubjectRDN(UInt16 refnum, HS_HTTPLibCertPtr in_cert, Char **out_str)
    01570         SYS_TRAP(kHTTPLibTrapCertPeekSubjectRDN);
    01571
    01572 /**
    01573  *  @brief
    01574  *
    01575  *  @param refnum:  IN:
    01576  *  @param in_cert: IN:
    01577  *  @retval Err error code.
    01578  **/
    01579 Int32 HS_HTTPLibCertPeekSubjectRDNStrType(UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    01580         SYS_TRAP(kHTTPLibTrapCertPeekSubjectRDNStrType);
    01581
    01582 /**
    01583  *  @brief
    01584  *
    01585  *  @param refnum:  IN:
    01586  *  @param in_cert: IN:
    01587  *  @retval Err error code.
    01588  **/
    01589 void HS_HTTPLibCertEndPeekSubjectRDN(UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    01590         SYS_TRAP(kHTTPLibTrapCert_EndPeekSubjectRDN);
    01591
    01592 /**
    01593  *  @brief
    01594  *
    01595  *  @param refnum:  IN:
    01596  *  @param in_cert: IN:
    01597  *  @param *in_time:    IN:
    01598  *  @retval Err error code.
    01599  **/
    01600 void HS_HTTPLibCertPeekValidityStart(UInt16 refnum, HS_HTTPLibCertPtr in_cert, HS_HTTPLibTime *in_time)
    01601         SYS_TRAP(kHTTPLibTrapCert_PeekValidityStart);
    01602
    01603 /**
    01604  *  @brief
    01605  *
    01606  *  @param refnum:  IN:
    01607  *  @param in_cert: IN:
    01608  *  @param *in_time:    IN:
    01609  *  @retval Err error code.
    01610  **/
    01611 void HS_HTTPLibCertPeekValidityEnd(UInt16 refnum, HS_HTTPLibCertPtr in_cert, HS_HTTPLibTime *in_time)
    01612         SYS_TRAP(kHTTPLibTrapCert_PeekValidityEnd);
    01613
    01614 /**
    01615  *  @brief
    01616  *
    01617  *  @param refnum:  IN:
    01618  *  @param in_cert: IN:
    01619  *  @retval Err error code.
    01620  **/
    01621 Int32 HS_HTTPLibCertPeekRSAPublicKeyBits(UInt16 refnum, HS_HTTPLibCertPtr in_cert)
    01622         SYS_TRAP(kHTTPLibTrapCert_PeekRSAPublicKeyBits);
    01623
    01624 /**
    01625  *  @brief
    01626  *
    01627  *  @param refnum:  IN:
    01628  *  @retval Err error code.
    01629  **/
    01630 HS_HTTPLibClientCertList HS_HTTPLibClientCertListNew(UInt16 refnum)
    01631         SYS_TRAP(kHTTPLibTrapClientCertListNew);
    01632
    01633 /**
    01634  *  @brief TBD
    01635  *
    01636  *  @param refnum:  IN:
    01637  *  @param in_list: IN:
    01638  *  @retval HS_HTTPLibClientCertList
    01639  **/
    01640 HS_HTTPLibClientCertList HS_HTTPLibClientCertListClone(UInt16 refnum, HS_HTTPLibClientCertList in_list)
    01641         SYS_TRAP(kHTTPLibTrapClientCertListClone);
    01642
    01643 /**
    01644  *  @brief
    01645  *
    01646  *  @param refnum:  IN:
    01647  *  @param in_list: IN:
    01648  *  @retval nothing
    01649  **/
    01650 void HS_HTTPLibClientCertListDelete(UInt16 refnum, HS_HTTPLibClientCertList in_list)
    01651         SYS_TRAP(kHTTPLibTrapClientCertListDelete);
    01652
    01653 /**
    01654  *  @brief TBD
    01655  *
    01656  *  @param refnum:  IN:
    01657  *  @param in_list: IN:
    01658  *  @retval Nothing
    01659  **/
    01660 Int32 HS_HTTPLibClientCertListLength(UInt16 refnum, HS_HTTPLibClientCertList in_list)
    01661         SYS_TRAP(kHTTPLibTrapClientCertListLength);
    01662
    01663 /**
    01664  *  @brief TBD
    01665  *
    01666  *  @param refnum:  IN:
    01667  *  @param in_list: IN:
    01668  *  @param in_index:    IN:
    01669  *  @retval Boolean
    01670  **/
    01671 Boolean HS_HTTPLibClientCertListIsValid(UInt16 refnum, HS_HTTPLibClientCertList in_list, Int32 in_index)
    01672         SYS_TRAP(kHTTPLibTrapClientCertListIsValid);
    01673
    01674 /**
    01675  *  @brief TBD
    01676  *
    01677  *  @param refnum:  IN:
    01678  *  @param in_list: IN:
    01679  *  @param in_index:    IN:
    01680  *  @param in_valid:    IN:
    01681  *  @retval Nothing
    01682  **/
    01683 void HS_HTTPLibClientCertListSetValid(UInt16 refnum, HS_HTTPLibClientCertList in_list, Int32 in_index, Boolean in_valid)
    01684         SYS_TRAP(kHTTPLibTrapClientCertListSetValid);
    01685
    01686 /**
    01687  *  @brief This function sets the server certificate callback function for this application.
    01688  *
    01689  *  @param refnum:  IN:  Library reference number.
    01690  *  @param libH:    IN:  -
    01691  *  @param in_cb:   IN:  -
    01692  *  @param in_opaque:   IN:  -
    01693  *  @return Nothing
    01694  **/
    01695 void HS_HTTPLibSetSSLServerCertConfirmProc(UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibServerCertConfirmProc in_cb, HS_HTTPLibOpaque in_opaque)
    01696         SYS_TRAP(kHTTPLibTrapSetSSLServerCertConfirmProc);
    01697
    01698 /**
    01699  *  @brief This function sets the result of confirmation. This function should be called in the
    01700  *     callback function.
    01701  *
    01702  *  @param refnum:  IN:  Library reference number.
    01703  *  @param in_ssl:  IN:  -
    01704  *  @param in_verify_result:    IN:  -
    01705  *  @param in_confirm:  IN:  -
    01706  *  @return None.
    01707  **/
    01708 void HS_HTTPLibServerCertConfirm(UInt16 refnum, HS_HTTPLibSSL in_ssl, Int32 in_verify_result, Boolean in_confirm)
    01709         SYS_TRAP(kHTTPLibTrapServerCertConfirm);
    01710
    01711 /**
    01712  *  @brief This function sets the client certification select callback function.For now, there is
    01713  *     no corresponding function in SSL library, the callback will not be called.
    01714  *
    01715  *  @param refnum:  IN:  Library reference number.
    01716  *  @param libH:    IN:  -
    01717  *  @param in_cb:   IN:  -
    01718  *  @param in_opaque:   IN:  -
    01719  *  @return None.
    01720  **/
    01721 void HS_HTTPLibSetSSLClientCertSelectProc(UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibClientCertSelectProc in_cb, HS_HTTPLibOpaque in_opaque)
    01722         SYS_TRAP(kHTTPLibTrapSetSSLClientCertSelectProc);
    01723
    01724 /**
    01725  *  @brief This function sets the selected certification. For now, there is no corresponding
    01726  *     function in SSL library, the callback will not be called.
    01727  *
    01728  *  @param refnum:  IN:  Library reference number.
    01729  *  @param in_ssl:  IN:  -
    01730  *  @param in_index:    IN:  -
    01731  *  @return None.
    01732  **/
    01733 void HS_HTTPLibClientCertSelect(UInt16 refnum, HS_HTTPLibSSL in_ssl, Int32 in_index)
    01734         SYS_TRAP(kHTTPLibTrapClientCertSelect);
    01735
    01736 /**
    01737  *  @brief This function sets the callback functions concerning NetLib. But for now, there is
    01738  *     no call to callback functions from Peer layer.
    01739  *
    01740  *  @param refnum:  IN:  Library reference number.
    01741  *  @param libH:    IN:
    01742  *  @param netLibRefnum:    IN:
    01743  *  @param in_open: IN:
    01744  *  @param in_close:    IN:
    01745  *  @param in_online:   IN:
    01746  *  @param in_offline:  IN:
    01747  *  @return None.
    01748  **/
    01749 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)
    01750         SYS_TRAP(kHTTPLibTrapSetNetLibProc);
    01751
    01752 /**
    01753  *  @brief
    01754  *
    01755  *  @param refnum:  IN:
    01756  *  @param in_handle:   IN:
    01757  *  @retval Err error code.
    01758  **/
    01759 Int32 HS_HTTPLibDataHandle_Length(UInt16 refnum, HS_HTTPLibDataHandle in_handle)
    01760         SYS_TRAP(kHTTPLibTrapDataHandle_Length);
    01761
    01762 /**
    01763  *  @brief
    01764  *
    01765  *  @param refnum:  IN:
    01766  *  @param in_handle:   IN:
    01767  *  @retval Err error code.
    01768  **/
    01769 void *HS_HTTPLibDataHandle_Lock(UInt16 refnum, HS_HTTPLibDataHandle in_handle)
    01770         SYS_TRAP(kHTTPLibTrapDataHandle_Lock);
    01771
    01772 /**
    01773  *  @brief
    01774  *
    01775  *  @param refnum:  IN:
    01776  *  @param in_handle:   IN:
    01777  *  @retval Err error code.
    01778  **/
    01779 void HS_HTTPLibDataHandle_Unlock(UInt16 refnum, HS_HTTPLibDataHandle in_handle)
    01780         SYS_TRAP(kHTTPLibTrapDataHandle_Unlock);
    01781
    01782 /**
    01783  *  @brief
    01784  *
    01785  *  @param refnum:  IN:
    01786  *  @param in_handle:   IN:
    01787  *  @retval Err error code.
    01788  **/
    01789 void HS_HTTPLibDataHandle_Delete(UInt16 refnum, HS_HTTPLibDataHandle in_handle)
    01790         SYS_TRAP(kHTTPLibTrapDataHandle_Delete);
    01791
    01792 /**
    01793  *  @brief This function returns the length of the handle (byte).
    01794  *
    01795  *  @param refnum:  IN:  Library reference number.
    01796  *  @param in_vhandle:  IN:  The handle.
    01797  *  @retval Int32
    01798  **/
    01799 Int32 HS_HTTPLibVHandle_Length(UInt16 refnum, HS_HTTPLibVHandle in_vhandle)
    01800         SYS_TRAP(kHTTPLibTrapVHandle_Length);
    01801
    01802 /**
    01803  *  @brief This function locks the handle of type HS_HTTPLibVHandle.
    01804  *
    01805  *  @param refnum:  IN:  Library reference number.
    01806  *  @param in_vhandle:  IN:  The handle.
    01807  *  @retval void *
    01808  **/
    01809 void *HS_HTTPLibVHandle_Lock(UInt16 refnum, HS_HTTPLibVHandle in_vhandle)
    01810         SYS_TRAP(kHTTPLibTrapVHandle_Lock);
    01811
    01812 /**
    01813  *  @brief This function unlocks the handle of type HS_HTTPLibVHandle.
    01814  *
    01815  *  @param refnum:  IN:  Library reference number.
    01816  *  @param in_vhandle:  IN:  The handle.
    01817  *  @retval Nothing
    01818  **/
    01819 void HS_HTTPLibVHandle_Unlock(UInt16 refnum, HS_HTTPLibVHandle in_vhandle)
    01820         SYS_TRAP(kHTTPLibTrapVHandle_Unlock);
    01821
    01822 /**
    01823  *  @brief This function deletes the handle of type HS_HTTPLibVHandle.
    01824  *
    01825  *  @param refnum:  IN:  Library reference number.
    01826  *  @param in_vhandle:  IN:  The handle.
    01827  *  @retval Nothing
    01828  **/
    01829 void HS_HTTPLibVHandle_Delete(UInt16 refnum, HS_HTTPLibVHandle in_vhandle)
    01830         SYS_TRAP(kHTTPLibTrapVHandle_Delete);
    01831
    01832 /**
    01833  *  @brief This function returns the length of the handle (byte).
    01834  *
    01835  *  @param refnum:  IN: Library reference number.
    01836  *  @param in_str:  IN: The handle.
    01837  *  @retval Int32
    01838  **/
    01839 Int32 HS_HTTPLibString_Length(UInt16 refnum, HS_HTTPLibString in_str)
    01840         SYS_TRAP(kHTTPLibTrapString_Length);
    01841
    01842 /**
    01843  *  @brief This function creates a new handle of type HS_HTTPLibString.
    01844  *
    01845  *  @param refnum:  IN:  Library reference number.
    01846  *  @param *in_str: IN:  The pointer to the string.
    01847  *  @param in_len:  IN:  The length of in_str.
    01848  *  @retval HS_HTTPLibString
    01849  **/
    01850 HS_HTTPLibString HS_HTTPLibStringNew(UInt16 refnum, Char *in_str, Int32 in_len)
    01851         SYS_TRAP(kHTTPLibTrapStringNew);
    01852
    01853 /**
    01854  *  @brief This function locks the handle of type HS_HTTPLibString.
    01855  *
    01856  *  @param refnum:  IN:  Library reference number.
    01857  *  @param in_str:  IN:  The handle.
    01858  *  @retval void *
    01859  **/
    01860 void *HS_HTTPLibString_Lock(UInt16 refnum, HS_HTTPLibString in_str)
    01861         SYS_TRAP(kHTTPLibTrapString_Lock);
    01862
    01863 /**
    01864  *  @brief This function unlocks the handle of type HS_HTTPLibString.
    01865  *
    01866  *  @param refnum:  IN:  Library reference number.
    01867  *  @param in_str:  IN:  The handle.
    01868  *  @retval Nothing
    01869  **/
    01870 void HS_HTTPLibString_Unlock(UInt16 refnum, HS_HTTPLibString in_str)
    01871         SYS_TRAP(kHTTPLibTrapString_Unlock);
    01872 /**
    01873  *  @brief This function deletes the handle of type HS_HTTPLibString.
    01874  *
    01875  *  @param refnum:  IN:  Library reference number.
    01876  *  @param in_str:  IN:  The handle.
    01877  *  @retval Nothing
    01878  **/
    01879 void HS_HTTPLibString_Delete(UInt16 refnum, HS_HTTPLibString in_str)
    01880         SYS_TRAP(kHTTPLibTrapString_Delete);
    01881
    01882 /**
    01883  *  @brief This function returns the length of the handle (byte).
    01884  *
    01885  *  @param refnum:  IN:  Library reference number.
    01886  *  @param in_str:  IN:  The handle.
    01887  *  @retval Int32
    01888  **/
    01889 Int32 HS_HTTPLibFixedString_Length(UInt16 refnum, HS_HTTPLibFixedString in_str)
    01890         SYS_TRAP(kHTTPLibTrapFixedString_Length);
    01891
    01892 /**
    01893  *  @brief This function creates a new handle of type HS_HTTPLibFixedString.
    01894  *
    01895  *  @param refnum:  IN:  Library reference number.
    01896  *  @param *in_str: IN:  The pointer to the string.
    01897  *  @param in_len:  IN:  The length of in_str.
    01898  *  @retval HS_HTTPLibFixedString
    01899  **/
    01900 HS_HTTPLibFixedString HS_HTTPLibFixedStringNew(UInt16 refnum, Char *in_str, Int32 in_len)
    01901         SYS_TRAP(kHTTPLibTrapFixedStringNew);
    01902
    01903 /**
    01904  *  @brief This function locks the handle of type HS_HTTPLibFixedString.
    01905  *
    01906  *  @param refnum:  IN:  Library reference number.
    01907  *  @param in_str:  IN:  The handle.
    01908  *  @retval void *
    01909  **/
    01910 void *HS_HTTPLibFixedString_Lock(UInt16 refnum, HS_HTTPLibFixedString in_str)
    01911         SYS_TRAP(kHTTPLibTrapFixedString_Lock);
    01912
    01913 /**
    01914  *  @brief This function unlocks the handle of type HS_HTTPLibFixedString.
    01915  *
    01916  *  @param refnum:  IN:  Library reference number.
    01917  *  @param in_str:  IN:  The handle.
    01918  *  @retval nothing
    01919  **/
    01920 void HS_HTTPLibFixedString_Unlock(UInt16 refnum, HS_HTTPLibFixedString in_str)
    01921         SYS_TRAP(kHTTPLibTrapFixedString_Unlock);
    01922
    01923 /**
    01924  *  @brief This function deletes the handle of type HS_HTTPLibFixedString.
    01925  *
    01926  *  @param refnum:  IN:  Library reference number.
    01927  *  @param in_str:  IN:  The handle.
    01928  *  @retval nothing
    01929  **/
    01930 void HS_HTTPLibFixedString_Delete(UInt16 refnum, HS_HTTPLibFixedString in_str)
    01931         SYS_TRAP(kHTTPLibTrapFixedString_Delete);
    01932
    01933 /**
    01934  *  @brief This function returns the length of the handle (byte).
    01935  *
    01936  *  @param refnum:  IN:  Library reference number.
    01937  *  @param in_str:  IN:  The handle.
    01938  *  @retval Int32
    01939  **/
    01940 Int32 HS_HTTPLibURLString_Length(UInt16 refnum, HS_HTTPLibURLString in_str)
    01941         SYS_TRAP(kHTTPLibTrapURLString_Length);
    01942
    01943 /**
    01944  *  @brief This function creates a new handle of type HS_HTTPLibURLString.
    01945  *
    01946  *  @param refnum:  IN:  Library reference number.
    01947  *  @param *in_str: IN:  The pointer to the string.
    01948  *  @param in_len:  IN:  The length of in_str.
    01949  *  @retval HS_HTTPLibURLString
    01950  **/
    01951 HS_HTTPLibURLString HS_HTTPLibURLStringNew(UInt16 refnum, Char *in_str, Int32 in_len)
    01952         SYS_TRAP(kHTTPLibTrapURLStringNew);
    01953
    01954 /**
    01955  *  @brief This function locks the handle of type HS_HTTPLibURLString.
    01956  *
    01957  *  @param refnum:  IN:  Library reference number.
    01958  *  @param in_str:  IN:  The handle.
    01959  *  @retval void *
    01960  **/
    01961 void *HS_HTTPLibURLString_Lock(UInt16 refnum, HS_HTTPLibURLString in_str)
    01962         SYS_TRAP(kHTTPLibTrapURLString_Lock);
    01963
    01964 /**
    01965  *  @brief This function unlocks the handle of type HS_HTTPLibURLString.
    01966  *
    01967  *  @param refnum:  IN:  Library reference number.
    01968  *  @param in_str:  IN:  The handle.
    01969  *  @retval nothing
    01970  **/
    01971 void HS_HTTPLibURLString_Unlock(UInt16 refnum, HS_HTTPLibURLString in_str)
    01972         SYS_TRAP(kHTTPLibTrapURLString_Unlock);
    01973
    01974 /**
    01975  *  @brief This function deletes the handle of type HS_HTTPLibURLString.
    01976  *
    01977  *  @param refnum:  IN:  Library reference number.
    01978  *  @param in_str:  IN:  The handle.
    01979  *  @retval nothing
    01980  **/
    01981 void HS_HTTPLibURLString_Delete(UInt16 refnum, HS_HTTPLibURLString in_str)
    01982         SYS_TRAP(kHTTPLibTrapURLString_Delete);
    01983
    01984 /**
    01985  *  @brief This returns the cipher info.
    01986  *     SslCipherSuiteInfo is the structure defined in SslLib.h
    01987  *
    01988  *     The implementation of this API in ARM native version is mere macro.
    01989  *
    01990  *  @param refnum:  IN:  Library reference number.
    01991  *  @param *iself:  IN:  -
    01992  *  @retval nothing
    01993  **/
    01994 void *HS_HTTPLibCertListGetCipherInfo(UInt16 refnum, void *iself)
    01995         SYS_TRAP(kHTTPLibTrapCertListGetCipherInfo);
    01996
    01997 /**
    01998  *  @brief
    01999  *
    02000  *  @param refnum:  IN:
    02001  *  @param libH:    IN:
    02002  *  @param in_msec::    IN:
    02003  *  @retval Err error code.
    02004  **/
    02005 void HS_HTTPLibSetMaxKeepAliveTimeout(UInt16 refnum, HS_HTTPLibHandle libH, Int32 in_msec)
    02006         SYS_TRAP(kHTTPLibTrapSetMaxKeepAliveTimeout);
    02007
    02008 /**
    02009  *  @brief
    02010  *
    02011  *  @param refnum:  IN:
    02012  *  @param stream:  IN:
    02013  *  @param *out_total:  IN:
    02014  *  @param *out_sent:   IN:
    02015  *  @retval Err error code.
    02016  **/
    02017 void HS_HTTPLibStreamGetRequestSent(UInt16 refnum, HS_HTTPLibStream stream, Int32 *out_total, Int32 *out_sent)
    02018         SYS_TRAP(kHTTPLibTrapStreamGetRequestSent);
    02019
    02020 /**
    02021  *  @brief
    02022  *
    02023  *  @param refnum:  IN:
    02024  *  @param stream:  IN:
    02025  *  @param in_type  IN:
    02026  *  @param in_ofs:  IN:
    02027  *  @param *out_off:    IN:
    02028  *  @param *out_len:    IN:
    02029  *  @retval Err error code.
    02030  **/
    02031 Boolean HS_HTTPLibStreamGetHeaderWithOffset(UInt16 refnum, HS_HTTPLibStream stream, Int32 in_type, Int32 in_ofs, Int32 *out_off, Int32 *out_len)
    02032         SYS_TRAP(kHTTPLibTrapStreamGetHeaderWithOffset);
    02033
    02034 /**
    02035  *  @brief
    02036  *
    02037  *  @param refnum:  IN:
    02038  *  @param libH:    IN:
    02039  *  @param in_type:     IN:
    02040  *  @param in_target:   IN:
    02041  *  @param *in_challenge:   IN:
    02042  *  @param *in_realm:   IN:
    02043  *  @param *in_user:    IN:
    02044  *  @param in_user_len: IN:
    02045  *  @param *in_pass:    IN:
    02046  *  @param in_pass_len: IN:
    02047  *  @param *in_url: IN:
    02048  *  @param in_url_len:  IN:
    02049  *  @param *in_host:    IN:
    02050  *  @param in_host_len: IN:
    02051  *  @param in_port: IN:
    02052  *  @param in_keep_user:    IN:
    02053  *  @param in_keep_pass:    IN:
    02054  *  @retval Err error code.
    02055  **/
    02056 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)
    02057         SYS_TRAP(kHTTPLibTrapSetUserPassX);
    02058
    02059 /**
    02060  *  @brief
    02061  *
    02062  *  @param refnum:  IN:
    02063  *  @param libH:    IN:
    02064  *  @param in_target:   IN:
    02065  *  @param *in_url: IN:
    02066  *  @param in_url_len:  IN:
    02067  *  @param *in_host:    IN:
    02068  *  @param in_host_len: IN:
    02069  *  @param in_port: IN:
    02070  *  @param *in_realm:   IN:
    02071  *  @param in_realm_len:    IN:
    02072  *  @param *out_user:   IN:
    02073  *  @param *out_pass:   IN:
    02074  *  @param *out_keep_user:  IN:
    02075  *  @param *out_keep_pass:  IN:
    02076  *  @param libH:    IN:
    02077  *  @retval Err error code.
    02078  **/
    02079 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)
    02080         SYS_TRAP(kHTTPLibTrapFindAuthCandidate);
    02081
    02082 /**
    02083  *  @brief
    02084  *
    02085  *  @param refnum:  IN:
    02086  *  @param libH:    IN:
    02087  *  @param in_proc:     IN:
    02088  *  @param in_opaque:   IN:
    02089  *  @retval Err error code.
    02090  **/
    02091 void HS_HTTPLibSetWakeUpCallback(UInt16 refnum, HS_HTTPLibHandle libH, HS_HTTPLibWakeUpCallbackProc in_proc, HS_HTTPLibOpaque in_opaque)
    02092         SYS_TRAP(kHTTPLibTrapSetWakeUpCallback);
    02093
    02094 /**
    02095  *  @brief
    02096  *
    02097  *  @param refnum:  IN:
    02098  *  @param libH:    IN:
    02099  *  @param *rules:  IN:
    02100  *  @param len:     IN:
    02101  *  @retval Err error code.
    02102  **/
    02103 Boolean HS_HTTPLibSetUseragentSelectionRule(UInt16 refnum, HS_HTTPLibHandle libH, HttpUASelectionRule *rules, Int32 len)
    02104         SYS_TRAP(kHTTPLibTrapSetUseragentSelectionRule);
    02105
    02106
    02107
    02108 #endif /* HS_HTTPLIB68K_H__ */

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