目录

rcp.h

Overview

Declares the APIs used to access Remote Communication, and defines basic functions, structs, and constants.

File to include: <RemoteCommunicationKit/rcp.h>

Library: librcp_c.so

System capability: SystemCapability.Collaboration.RemoteCommunication

Since: 5.0.0(12)

Related module: RemoteCommunication

Summary

[h2]Structs

Name Description
struct Rcp_Buffer Text storage struct.
struct Rcp_ContentOrPathOrCallback Simple form data field value used in Rcp_FormFieldFileValue.
struct Rcp_FormFieldFileValue Form field file value.
struct Rcp_FormFieldValue Simple form data field value. For details, please refer to Rcp_Form and Rcp_MultipartFormFieldValue.
struct Rcp_MultipartFormFieldValue Multi-part form field value, which will be used in Rcp_MultipartForm.
struct Rcp_FormOrder Sequence in which key-value pairs in the form are sent.
struct Rcp_RequestContent Request content.
struct Rcp_HeaderValue Value type of a mapped value in a request or response header.
struct Rcp_HeaderEntry All key-value pairs in the request or response header.
struct Rcp_Credential Credential used for server identity verification, including the user name and password.
struct Rcp_ServerAuthentication Server identity verification information.
struct Rcp_Urls URL, which is used to determine whether a host is using a proxy.
struct Rcp_Exclusions URLs excluded from proxy processing.
struct Rcp_CertificateAuthority CA used to verify the identity of a remote server.
struct Rcp_ClientCertificate Client certificate sent to a remote server, which will be used by the server to verify the identity of the client.
struct Rcp_SecurityConfiguration Request security configuration.
struct Rcp_WebProxy Custom proxy configuration.
struct Rcp_IpAndPort IP address and port number of a DNS server, which will be used in Rcp_DnsServers.
struct Rcp_DnsServers DNS server, which is one of the types defined in Rcp_DnsConfiguration.dnsRules.
struct Rcp_IpAddress IP address group used by the static DNS rule Rcp_StaticDnsRuleItem.
struct Rcp_StaticDnsRuleItem Description about a single static DNS rule.
struct Rcp_StaticDnsRule Static DNS rule.
struct Rcp_DnsRule DNS rule configuration.
struct Rcp_OnDataReceiveCallback Callback triggered upon data receiving events, which is configured in Rcp_EventsHandler.
struct Rcp_OnProgressCallback Callback triggered upon data transmission events, which is configured in Rcp_EventsHandler.
struct Rcp_OnHeaderReceiveCallback Callback triggered upon header receiving events, which is configured in Rcp_EventsHandler.
struct Rcp_OnVoidCallback Callback triggered upon transmigration ending or cancellation events, which is configured in Rcp_EventsHandler.
struct Rcp_EventsHandler Callback function for listening for various HTTP events.
struct Rcp_Timeout Request timeout configuration.
struct Rcp_DnsOverHttps DNS over HTTPS. If this information is configured, addresses resolved by the DOH DNS server will be preferred.
struct Rcp_TransferConfiguration Transmission configuration.
struct Rcp_InfoToCollect Request processing events to be collected. You can check the response object for collected events.
struct Rcp_TracingConfiguration Request tracing configuration.
struct Rcp_ProxyConfiguration Proxy configuration.
struct Rcp_DnsConfiguration DNS resolution configuration.
struct Rcp_Configuration Request configuration.
struct Rcp_TransferRange HTTP transmission range. This configuration will be converted into the HTTP Range header. An HTTP request with such a header requires the server to return only a part of the HTTP response.
struct Rcp_Request Network request.
struct Rcp_RequestCookieEntry All cookie key-value pairs in the request.
struct Rcp_DebugInfo Structure of the debugging information stored in Rcp_Response.
struct Rcp_CookieAttributeEntry Response cookie attribute entry.
struct Rcp_ResponseCookies Response cookies.
struct Rcp_TimeInfo Response timer information.
struct Rcp_ResponseCallbackObject Response callback struct.
struct Rcp_Response Response to a network request.
struct Rcp_Interceptor Asynchronous interceptor.
struct Rcp_SyncInterceptor Synchronous interceptor.
struct Rcp_InterceptorArray Asynchronous interceptor array.
struct Rcp_SyncInterceptorArray Synchronous interceptor array.
struct Rcp_SessionListener Callback function for listening on session closing or cancellation events.
struct Rcp_ConnectionConfiguration Connection configuration.
struct Rcp_SessionConfiguration Session configuration.
struct Rcp_OnBinaryReceiveCallback Callback triggered when a response is received, which supports binary data reception. You can call HMS_Rcp_SetRequestOnBinaryDataRecvCallback to set the callback for a request.
struct Rcp_OnStatusCodeReceiveCallback Callback triggered when a response status code is received. You can call HMS_Rcp_SetRequestOnStatusCodeReceiveCallback to set the callback for a request.
struct Rcp_OnGetDataCallback Callback used to obtain data. You can call HMS_Rcp_SetRequestGetDataCallback to set the callback for a request.

[h2]Macros

Name Description
RCP_MAX_REQUEST_ID_LEN 32 Maximum length of a request ID.
RCP_MAX_CONTENT_TYPE_LEN 64 Maximum length of the content type.
RCP_MAX_FILENAME_LEN 128 Maximum length of a file name.
RCP_MAX_PATH_LEN 128 Maximum path length.
RCP_METHOD_GET "GET" HTTP GET method.
RCP_METHOD_HEAD "HEAD" HTTP HEAD method.
RCP_METHOD_OPTIONS "OPTIONS" HTTP OPTIONS method.
RCP_METHOD_TRACE "TRACE" HTTP TRACE method.
RCP_METHOD_DELETE "DELETE" HTTP DELETE method.
RCP_METHOD_POST "POST" HTTP POST method.
RCP_METHOD_PUT "PUT" HTTP PUT method.
RCP_METHOD_PATCH "PATCH" HTTP PATCH method.
RCP_IP_MAX_LEN 40 Maximum length of an IP address.
RCP_HOST_MAX_LEN 256 Maximum length of a host name.

[h2]Types

Name Description
typedef enum Rcp_FormValueType Rcp_FormValueType Form value type.
typedef int(* Rcp_GetDataCallback) (char *out, uint32_t size) Data obtained through a callback function. This callback is used when the API needs to send the next part of the data to the server.
typedef enum Rcp_ContentOrPathOrCallbackType Rcp_ContentOrPathOrCallbackType Content, path, or callback type, which is used to distinguish the data used in Rcp_ContentOrPathOrCallback.
typedef struct Rcp_Buffer Rcp_Buffer Text storage struct.
typedef struct Rcp_ContentOrPathOrCallback Rcp_ContentOrPathOrCallback Simple form data field value used in Rcp_FormFieldFileValue.
typedef enum Rcp_MultipartValueType Rcp_MultipartValueType Multi-part form value type, which is used to distinguish the data used in Rcp_MultipartFormFieldValue.
typedef struct Rcp_FormFieldFileValue Rcp_FormFieldFileValue Form field file value.
typedef struct Rcp_FormFieldValue Rcp_FormFieldValue Simple form data field value. For details, please refer to Rcp_Form and Rcp_MultipartFormFieldValue.
typedef struct Rcp_MultipartFormFieldValue Rcp_MultipartFormFieldValue Multi-part form field value, which will be used in Rcp_MultipartForm.
typedef enum Rcp_ContentType Rcp_ContentType Content type in Rcp_RequestContent.
typedef struct Rcp_Form Rcp_Form Simple form data.
typedef struct Rcp_MultipartForm Rcp_MultipartForm Multi-part form data.
typedef struct Rcp_FormOrder Rcp_FormOrder Sequence in which key-value pairs in the form are sent.
typedef struct Rcp_RequestContent Rcp_RequestContent Request content.
typedef struct Rcp_Headers Rcp_Headers Header of a request or response.
typedef struct Rcp_HeaderValue Rcp_HeaderValue Value type of a mapped value in a request or response header.
typedef struct Rcp_HeaderEntry Rcp_HeaderEntry All key-value pairs in the request or response header.
typedef enum Rcp_AuthenticationType Rcp_AuthenticationType Enumeration type, which indicates the server identity verification type. If the type is not set, negotiation with the server is required.
typedef struct Rcp_Credential Rcp_Credential Credential used for server identity verification, including the user name and password.
typedef struct Rcp_ServerAuthentication Rcp_ServerAuthentication Server identity verification information.
typedef bool(* Rcp_ExclusionFunction) (const char *url) Pointer to the function for determining whether a host uses a proxy. The value true indicates that a proxy is used, and the value false indicates that no proxy is used.
typedef struct Rcp_Urls Rcp_Urls URL, which is used to determine whether a host is using a proxy.
typedef enum Rcp_ExclusionsValueType Rcp_ExclusionsValueType Data type in Rcp_Exclusions.
typedef struct Rcp_Exclusions Rcp_Exclusions URLs excluded from proxy processing.
typedef enum Rcp_CertType Rcp_CertType Client certificate type.
typedef struct Rcp_CertificateAuthority Rcp_CertificateAuthority CA used to verify the identity of a remote server.
typedef struct Rcp_ClientCertificate Rcp_ClientCertificate Client certificate sent to a remote server, which will be used by the server to verify the identity of the client.
typedef enum Rcp_RemoteValidationType Rcp_RemoteValidationType Remote server validation type.
typedef struct Rcp_SecurityConfiguration Rcp_SecurityConfiguration Request security configuration.
typedef enum Rcp_ProxyTunnelMode Rcp_ProxyTunnelMode Indicates when a proxy tunnel needs to be established. Tunneling, or tunnel transmission, is a process where an HTTP CONNECT request is sent to a proxy server, instructing it to establish a connection to the remote host of a specified port number. Once this connection is set up, all subsequent traffic is routed through the proxy. The value auto indicates that tunneling is enabled only for HTTPS traffic. The value always indicates that tunneling is enabled for all traffic.
typedef struct Rcp_WebProxy Rcp_WebProxy Custom proxy configuration.
typedef struct Rcp_IpAndPort Rcp_IpAndPort IP address and port number of a DNS server, which will be used in Rcp_DnsServers.
typedef struct Rcp_DnsServers Rcp_DnsServers DNS server, which is one of the types defined in Rcp_DnsConfiguration.dnsRules.
typedef struct Rcp_IpAddress Rcp_IpAddress IP address group used by the static DNS rule Rcp_StaticDnsRuleItem.
typedef struct Rcp_StaticDnsRuleItem Rcp_StaticDnsRuleItem Description about a single static DNS rule.
typedef struct Rcp_StaticDnsRule Rcp_StaticDnsRule Static DNS rule.
typedef Rcp_IpAddress *(* Rcp_DynamicDnsRuleFunction) (const char *host, uint16_t port) Function that can directly return an IP address based on the host name and port number. It is used for dynamic DNS resolution.
typedef enum Rcp_DnsRuleType Rcp_DnsRuleType DNS rule type in Rcp_DnsRule.
typedef struct Rcp_DnsRule Rcp_DnsRule DNS rule configuration.
typedef size_t(* Rcp_OnDataReceiveCallbackFunc) (void *usrObject, const char *data) Callback function triggered when a response body is returned.
typedef size_t(* Rcp_OnBinaryReceiveCallbackFunc) (void *usrObject, Rcp_Buffer *buffer) Callback function triggered when a response body (binary data type) is returned.
typedef void (* Rcp_OnStatusCodeReceiveCallbackFunc)(void *usrObject, uint32_t statusCode) Callback function triggered when a response status code is returned.
typedef void(* Rcp_OnProgressCallbackFunc) (void *usrObject, uint64_t totalSize, uint64_t transferredSize) Callback function triggered during request/response data transmission.
typedef void(* Rcp_OnHeaderReceiveCallbackFunc) (void *usrObject, Rcp_Headers *headers) Callback function triggered when all requests are received.
typedef void(* Rcp_OnVoidCallbackFunc) (void *usrObject) Callback function for listening on DataEnd and Canceled events of requests.
typedef struct Rcp_OnDataReceiveCallback Rcp_OnDataReceiveCallback Callback triggered upon data receiving events, which is configured in Rcp_EventsHandler.
typedef struct Rcp_OnProgressCallback Rcp_OnProgressCallback Callback triggered upon data transmission events, which is configured in Rcp_EventsHandler.
typedef struct Rcp_OnHeaderReceiveCallback Rcp_OnHeaderReceiveCallback Callback triggered upon header receiving events, which is configured in Rcp_EventsHandler.
typedef struct Rcp_OnVoidCallback Rcp_OnVoidCallback Callback triggered upon transmigration ending or cancellation events, which is configured in Rcp_EventsHandler.
typedef struct Rcp_EventsHandler Rcp_EventsHandler Callback function for listening for various HTTP events.
typedef struct Rcp_Timeout Rcp_Timeout Request timeout configuration.
typedef struct Rcp_DnsOverHttps Rcp_DnsOverHttps DNS over HTTPS. If this information is configured, addresses resolved by the DOH DNS server will be preferred.
typedef enum Rcp_PathPreference Rcp_PathPreference Request path preferences.
typedef struct Rcp_TransferConfiguration Rcp_TransferConfiguration Transmission configuration.
typedef struct Rcp_InfoToCollect Rcp_InfoToCollect Request processing events to be collected. You can check the response object for collected events.
typedef struct Rcp_TracingConfiguration Rcp_TracingConfiguration Request tracing configuration.
typedef enum Rcp_ProxyType Rcp_ProxyType Proxy type, which will be used to determine which proxy configuration will be used.
typedef struct Rcp_ProxyConfiguration Rcp_ProxyConfiguration Proxy configuration.
typedef struct Rcp_DnsConfiguration Rcp_DnsConfiguration DNS resolution configuration.
typedef struct Rcp_Configuration Rcp_Configuration Request configuration.
typedef struct Rcp_TransferRange Rcp_TransferRange HTTP transmission range. This configuration will be converted into the HTTP Range header. An HTTP request with such a header requires the server to return only a part of the HTTP response.
typedef struct Rcp_RequestCookies Rcp_RequestCookies Request cookies.
typedef struct Rcp_Request Rcp_Request Network request.
typedef struct Rcp_RequestCookieEntry Rcp_RequestCookieEntry All cookie key-value pairs in the request.
typedef enum Rcp_StatusCode Rcp_StatusCode Status code of the request response.
typedef enum Rcp_DebugEvent Rcp_DebugEvent Debugging event type.
typedef struct Rcp_DebugInfo Rcp_DebugInfo Structure of the debugging information stored in Rcp_Response.
typedef struct Rcp_CookieAttributes Rcp_CookieAttributes Cookie attribute type in Rcp_Response.
typedef struct Rcp_CookieAttributeEntry Rcp_CookieAttributeEntry Response cookie attribute entry.
typedef struct Rcp_ResponseCookies Rcp_ResponseCookies Response cookies.
typedef struct Rcp_TimeInfo Rcp_TimeInfo Response timer information.
typedef struct Rcp_Response Rcp_Response Response to a network request.
typedef void(* Rcp_ResponseCallback) (void *usrCtx, Rcp_Response *response, uint32_t errCode) Pointer to the response callback function.
typedef struct Rcp_ResponseCallbackObject Rcp_ResponseCallbackObject Response callback struct.
typedef struct Rcp_RequestHandler Rcp_RequestHandler Asynchronous handler associated with Rcp_Interceptor.
typedef struct Rcp_SyncRequestHandler Rcp_SyncRequestHandler Synchronous handler associated with Rcp_SyncInterceptor.
typedef struct Rcp_Interceptor Rcp_Interceptor Asynchronous interceptor.
typedef struct Rcp_SyncInterceptor Rcp_SyncInterceptor Synchronous interceptor.
typedef struct Rcp_InterceptorArray Rcp_InterceptorArray Asynchronous interceptor array.
typedef struct Rcp_SyncInterceptorArray Rcp_SyncInterceptorArray Synchronous interceptor array.
typedef enum Rcp_SessionType Rcp_SessionType Session type.
typedef struct Rcp_Session Rcp_Session Session.
typedef struct Rcp_SessionListener Rcp_SessionListener Callback function for listening on session closing or cancellation events.
typedef struct Rcp_ConnectionConfiguration Rcp_ConnectionConfiguration Connection configuration.
typedef struct Rcp_SessionConfiguration Rcp_SessionConfiguration Session configuration.
typedef struct Rcp_OnBinaryReceiveCallback Rcp_OnBinaryReceiveCallback Callback function for receiving binary data in a response.
typedef size_t(* Rcp_OnBinaryReceiveCallbackFunc) (void *usrObject, Rcp_Buffer *buffer) Pointer to the callback function for receiving binary data.
typedef struct Rcp_OnStatusCodeReceiveCallback Rcp_OnStatusCodeReceiveCallback Callback function used to receive a response status code.
typedef struct Rcp_OnGetDataCallback Rcp_OnGetDataCallback Callback used to obtain data.
typedef size_t(* Rcp_GetDataCallbackFunc) (void *userObject, uint8_t *outData, size_t size) Callback function used to obtain data.

[h2]Enums

Name Description

Rcp_FormValueType {

RCP_FORM_VALUE_TYPE_INT32, RCP_FORM_VALUE_TYPE_INT64, RCP_FORM_VALUE_TYPE_BOOL, RCP_FORM_VALUE_TYPE_STRING,

RCP_FORM_VALUE_TYPE_DOUBLE

}

Form value type.
Rcp_ContentOrPathOrCallbackType { RCP_FILE_VALUE_TYPE_CONTENT, RCP_FILE_VALUE_TYPE_PATH, RCP_FILE_VALUE_TYPE_CALLBACK} Content, path, or callback type, which is used to distinguish the data used in Rcp_ContentOrPathOrCallback.
Rcp_MultipartValueType { RCP_TYPE_FORM_FIELD_VALUE, RCP_TYPE_FORM_FIELD_FILE_VALUE } Multi-part form value type, which is used to distinguish the data used in Rcp_MultipartFormFieldValue.
Rcp_ContentType { RCP_CONTENT_TYPE_STRING, RCP_CONTENT_TYPE_FORM, RCP_CONTENT_TYPE_MULTIPARTFORM, RCP_CONTENT_TYPE_GETCALLBACK } Content type in Rcp_RequestContent.
Rcp_AuthenticationType { RCP_AUTHENTICATION_AUTO, RCP_AUTHENTICATION_BASIC, RCP_AUTHENTICATION_NTLM, RCP_AUTHENTICATION_DIGEST } Enumeration type, which indicates the server identity verification type. If the type is not set, negotiation with the server is required.
Rcp_ExclusionsValueType { RCP_EXCLUSION_USE_URL_ARRAY, RCP_EXCLUSION_USE_CALLBACK } Data type in Rcp_Exclusions.
Rcp_CertType { RCP_CERT_PEM, RCP_CERT_DER, RCP_CERT_P12 } Client certificate type.
Rcp_RemoteValidationType { RCP_REMOTE_VALIDATION_SYSTEM, RCP_REMOTE_VALIDATION_SKIP, RCP_REMOTE_VALIDATION_CERTIFICATE_AUTHORITY } Remote server validation type.
Rcp_ProxyTunnelMode { RCP_PROXY_TUNNEL_AUTO, RCP_PROXY_TUNNEL_ALWAYS } Indicates when a proxy tunnel needs to be established. Tunneling, or tunnel transmission, is a process where an HTTP CONNECT request is sent to a proxy server, instructing it to establish a connection to the remote host of a specified port number. Once this connection is set up, all subsequent traffic is routed through the proxy. The value auto indicates that tunneling is enabled only for HTTPS traffic. The value always indicates that tunneling is enabled for all traffic.
Rcp_DnsRuleType { RCP_DNS_RULE_DNS_SERVERS, RCP_DNS_RULE_STATIC, RCP_DNS_RULE_DYNAMIC } DNS rule type in Rcp_DnsRule.
Rcp_PathPreference { RCP_PATH_PREFERENCE_AUTO, RCP_PATH_PREFERENCE_WIFI, RCP_PATH_PREFERENCE_CELLULAR } Request path preferences.
Rcp_ProxyType { RCP_PROXY_SYSTEM, RCP_PROXY_CUSTOM, RCP_PROXY_NO_PROXY } Proxy type, which will be used to determine which proxy configuration will be used.

Rcp_StatusCode {

RCP_NONE = 0, RCP_OK = 200, RCP_CREATED, RCP_ACCEPTED,

RCP_NOT_AUTHORITATIVE, RCP_NO_CONTENT, RCP_RESET, RCP_PARTIAL,

RCP_MULTI_CHOICE = 300, RCP_MOVED_PERMANENTLY, RCP_MOVED_TEMPORARILY, RCP_SEE_OTHER,

RCP_NOT_MODIFIED, RCP_USE_PROXY, RCP_BAD_REQUEST = 400, RCP_UNAUTHORIZED,

RCP_PAYMENT_REQUIRED, RCP_FORBIDDEN, RCP_NOT_FOUND, RCP_BAD_METHOD,

RCP_NOT_ACCEPTABLE, RCP_PROXY_AUTH, RCP_CLIENT_TIMEOUT, RCP_CONFLICT,

RCP_GONE, RCP_LENGTH_REQUIRED, RCP_PRECON_FAILED, RCP_ENTITY_TOO_LARGE,

RCP_REQ_TOO_LONG, RCP_UNSUPPORTED_TYPE, RCP_INTERNAL_ERROR = 500, RCP_NOT_IMPLEMENTED,

RCP_BAD_GATEWAY, RCP_UNAVAILABLE, RCP_GATEWAY_TIMEOUT, RCP_VERSION

}

Status code of the request response.

Rcp_DebugEvent {

RCP_DEBUG_EVENT_TEXT, RCP_DEBUG_EVENT_HEADER_IN, RCP_DEBUG_EVENT_HEADER_OUT, RCP_DEBUG_EVENT_DATA_IN,

RCP_DEBUG_EVENT_DATA_OUT, RCP_DEBUG_EVENT_SSL_DATA_IN, RCP_DEBUG_EVENT_SSL_DATA_OUT

}

Debugging event type.
Rcp_SessionType { RCP_SESSION_TYPE_HTTP = 0, RCP_SESSION_TYPE_MAX = 100} Session type.

[h2]Functions

Name Description
Rcp_Form * HMS_Rcp_CreateForm (void) Creates a simple form.
void HMS_Rcp_DestroyForm (Rcp_Form *form) Destroys a simple form.
uint32_t HMS_Rcp_SetFormValue (Rcp_Form *form, const char *key, const Rcp_FormFieldValue *value) Sets key-value pairs in a simple form.
Rcp_FormFieldValue * HMS_Rcp_GetFormValue (Rcp_Form *form, const char *key) Obtains a value based on a key from a simple form.
Rcp_MultipartForm * HMS_Rcp_CreateMultipartForm (void) Creates a multi-part form.
void HMS_Rcp_DestroyMultipartForm (Rcp_MultipartForm *multipartForm) Destroys a multi-part form.
uint32_t HMS_Rcp_SetMultipartFormValue (Rcp_MultipartForm *multipartForm, const char *key, const Rcp_MultipartFormFieldValue *value) Sets key-value pairs in a multi-part form.
Rcp_MultipartFormFieldValue * HMS_Rcp_GetMultipartFormValue (Rcp_MultipartForm *multipartForm, const char *key) Obtains a value based on a key from a multi-part form.
uint32_t HMS_Rcp_SetFormOrder (Rcp_Form *form, Rcp_FormOrder order) Sets the sequence in which key-value pairs in a form are sent.
uint32_t HMS_Rcp_SetMultipartFormOrder (Rcp_MultipartForm *multipartForm, Rcp_FormOrder order) Sets the sequence in which key-value pairs in a multi-part form are sent.
Rcp_Headers * HMS_Rcp_CreateHeaders (void) Creates a header for a request or response.
void HMS_Rcp_DestroyHeaders (Rcp_Headers *headers) Destroys the header of a request or response.
uint32_t HMS_Rcp_SetHeaderValue (Rcp_Headers *headers, const char *name, const char *value) Sets key-value pairs in a request or response header.
Rcp_HeaderValue * HMS_Rcp_GetHeaderValue (Rcp_Headers *headers, const char *name) Obtains a value based on a key from a request or response header.
Rcp_HeaderEntry * HMS_Rcp_GetHeaderEntries (Rcp_Headers *headers) Obtains all key-value pairs from a request or response header.
void HMS_Rcp_DestroyHeaderEntries (Rcp_HeaderEntry *headerEntry) Destroys all key-value pairs obtained in HMS_Rcp_GetHeaderEntries.
Rcp_Request * HMS_Rcp_CreateRequest (const char *url) Creates a request.
void HMS_Rcp_DestroyRequest (Rcp_Request *request) Destroys a request.
Rcp_RequestCookies * HMS_Rcp_CreateRequestCookies (void) Creates empty request cookies.
void HMS_Rcp_DestroyRequestCookies (Rcp_RequestCookies *cookies) Destroys request cookies.
uint32_t HMS_Rcp_SetRequestCookieValue (Rcp_RequestCookies *cookies, const char *name, const char *value) Sets request cookies.
char * HMS_Rcp_GetRequestCookieValue (Rcp_RequestCookies *cookies, const char *name) Obtains the request cookie value by name.
Rcp_RequestCookieEntry * HMS_Rcp_GetRequestCookieEntries (Rcp_RequestCookies *cookies) Obtains all key-value pairs from the request cookies.
void HMS_Rcp_DestroyRequestCookieEntries (Rcp_RequestCookieEntry *cookieEntry) Destroys all key-value pairs related to request cookies obtained from HMS_Rcp_GetRequestCookieValue.
const char * HMS_Rcp_GetResponseCookieAttrValue (Rcp_CookieAttributes *cookieAttributes, const char *name) Obtains the cookie attribute value by name.
Rcp_CookieAttributeEntry * HMS_Rcp_GetResponseCookieAttrEntries (Rcp_CookieAttributes *cookieAttributes) Obtains all response cookie attributes from Rcp_CookieAttributes.
void HMS_Rcp_DestroyResponseCookieAttrEntries (Rcp_CookieAttributeEntry *entries) Destroys response cookie attributes.
uint32_t HMS_Rcp_CallNextRequestHandler (Rcp_Request *request, const Rcp_RequestHandler *next, const Rcp_ResponseCallbackObject *responseCallback) Calls the next interceptor or the defaultHandler in Rcp_Interceptor.
Rcp_Response * HMS_Rcp_CallNextSyncRequestHandler (Rcp_Request *request, const Rcp_SyncRequestHandler *next, uint32_t *errCode) Calls the next interceptor or the default handler in Rcp_SyncInterceptor.
Rcp_Session * HMS_Rcp_CreateSession (const Rcp_SessionConfiguration *configuration, uint32_t *errCode) Creates a session.
const char * HMS_Rcp_GetSessionId (Rcp_Session *session) Obtains the session ID.
const Rcp_SessionConfiguration * HMS_Rcp_GetSessionConfiguration (Rcp_Session *session) Obtains the session configuration.
Rcp_Response * HMS_Rcp_FetchSync (Rcp_Session *session, Rcp_Request *request, uint32_t *errCode) Sends a synchronous request and obtains a response.
uint32_t HMS_Rcp_Fetch (Rcp_Session *session, Rcp_Request *request, const Rcp_ResponseCallbackObject *responseCallback) Sends an asynchronous request and obtains a response.
uint32_t HMS_Rcp_CancelRequest (Rcp_Session *session, const Rcp_Request *request) Cancels a request.
uint32_t HMS_Rcp_CancelSession (Rcp_Session *session) Cancels a session.
uint32_t HMS_Rcp_CloseSession (Rcp_Session **session) Closes a session.
uint32_t HMS_Rcp_SetRequestOnBinaryDataRecvCallback (Rcp_Request *request, Rcp_OnBinaryReceiveCallback onBinaryReceiveCallback) Sets a callback function for receiving binary data upon a request. The callback function works the same as that of Rcp_OnDataReceiveCallback, and the callback function can be used to receive both character and binary data.
uint32_t HMS_Rcp_SetRequestOnStatusCodeReceiveCallback (Rcp_Request *request, Rcp_OnStatusCodeReceiveCallback onStatusCodeReceiveCallback) Sets the callback function for receiving a response status code.
uint32_t HMS_Rcp_GetDefaultSession (Rcp_Session **session) Obtains the default session.
uint32_t HMS_Rcp_SetRequestConnectOnly (Rcp_Request *request, bool connectOnly) Configures the request to establish a connection only, without performing data transmission.
uint32_t HMS_Rcp_SetRequestGetDataCallback (Rcp_Request *request, Rcp_OnGetDataCallback getDataCallback) Sets the callback function for obtaining data.