mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update include/ comments to Doxygen formatting (see issue #3384)
See related guidelines in the issue.
This commit is contained in:
@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=67df3d56f0cc0f58d2b0a2fe884bbb2c1c39813f$
|
||||
// $hash=3373cc29becf60303d1f01774c1ed8017c3f0da3$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_
|
||||
@ -52,63 +52,64 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
///
|
||||
// Callback for asynchronous continuation of cef_resource_handler_t::skip().
|
||||
/// Callback for asynchronous continuation of cef_resource_handler_t::skip().
|
||||
///
|
||||
typedef struct _cef_resource_skip_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Callback for asynchronous continuation of skip(). If |bytes_skipped| > 0
|
||||
// then either skip() will be called again until the requested number of bytes
|
||||
// have been skipped or the request will proceed. If |bytes_skipped| <= 0 the
|
||||
// request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE.
|
||||
/// Callback for asynchronous continuation of skip(). If |bytes_skipped| > 0
|
||||
/// then either skip() will be called again until the requested number of
|
||||
/// bytes have been skipped or the request will proceed. If |bytes_skipped| <=
|
||||
/// 0 the request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE.
|
||||
///
|
||||
void(CEF_CALLBACK* cont)(struct _cef_resource_skip_callback_t* self,
|
||||
int64 bytes_skipped);
|
||||
} cef_resource_skip_callback_t;
|
||||
|
||||
///
|
||||
// Callback for asynchronous continuation of cef_resource_handler_t::read().
|
||||
/// Callback for asynchronous continuation of cef_resource_handler_t::read().
|
||||
///
|
||||
typedef struct _cef_resource_read_callback_t {
|
||||
///
|
||||
// Base structure.
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Callback for asynchronous continuation of read(). If |bytes_read| == 0 the
|
||||
// response will be considered complete. If |bytes_read| > 0 then read() will
|
||||
// be called again until the request is complete (based on either the result
|
||||
// or the expected content length). If |bytes_read| < 0 then the request will
|
||||
// fail and the |bytes_read| value will be treated as the error code.
|
||||
/// Callback for asynchronous continuation of read(). If |bytes_read| == 0 the
|
||||
/// response will be considered complete. If |bytes_read| > 0 then read() will
|
||||
/// be called again until the request is complete (based on either the result
|
||||
/// or the expected content length). If |bytes_read| < 0 then the request will
|
||||
/// fail and the |bytes_read| value will be treated as the error code.
|
||||
///
|
||||
void(CEF_CALLBACK* cont)(struct _cef_resource_read_callback_t* self,
|
||||
int bytes_read);
|
||||
} cef_resource_read_callback_t;
|
||||
|
||||
///
|
||||
// Structure used to implement a custom request handler structure. The functions
|
||||
// of this structure will be called on the IO thread unless otherwise indicated.
|
||||
/// Structure used to implement a custom request handler structure. The
|
||||
/// functions of this structure will be called on the IO thread unless otherwise
|
||||
/// indicated.
|
||||
///
|
||||
typedef struct _cef_resource_handler_t {
|
||||
///
|
||||
// Base structure.
|
||||
/// Base structure.
|
||||
///
|
||||
cef_base_ref_counted_t base;
|
||||
|
||||
///
|
||||
// Open the response stream. To handle the request immediately set
|
||||
// |handle_request| to true (1) and return true (1). To decide at a later time
|
||||
// set |handle_request| to false (0), return true (1), and execute |callback|
|
||||
// to continue or cancel the request. To cancel the request immediately set
|
||||
// |handle_request| to true (1) and return false (0). This function will be
|
||||
// called in sequence but not from a dedicated thread. For backwards
|
||||
// compatibility set |handle_request| to false (0) and return false (0) and
|
||||
// the ProcessRequest function will be called.
|
||||
/// Open the response stream. To handle the request immediately set
|
||||
/// |handle_request| to true (1) and return true (1). To decide at a later
|
||||
/// time set |handle_request| to false (0), return true (1), and execute
|
||||
/// |callback| to continue or cancel the request. To cancel the request
|
||||
/// immediately set |handle_request| to true (1) and return false (0). This
|
||||
/// function will be called in sequence but not from a dedicated thread. For
|
||||
/// backwards compatibility set |handle_request| to false (0) and return false
|
||||
/// (0) and the ProcessRequest function will be called.
|
||||
///
|
||||
int(CEF_CALLBACK* open)(struct _cef_resource_handler_t* self,
|
||||
struct _cef_request_t* request,
|
||||
@ -116,32 +117,32 @@ typedef struct _cef_resource_handler_t {
|
||||
struct _cef_callback_t* callback);
|
||||
|
||||
///
|
||||
// Begin processing the request. To handle the request return true (1) and
|
||||
// call cef_callback_t::cont() once the response header information is
|
||||
// available (cef_callback_t::cont() can also be called from inside this
|
||||
// function if header information is available immediately). To cancel the
|
||||
// request return false (0).
|
||||
//
|
||||
// WARNING: This function is deprecated. Use Open instead.
|
||||
/// Begin processing the request. To handle the request return true (1) and
|
||||
/// call cef_callback_t::cont() once the response header information is
|
||||
/// available (cef_callback_t::cont() can also be called from inside this
|
||||
/// function if header information is available immediately). To cancel the
|
||||
/// request return false (0).
|
||||
///
|
||||
/// WARNING: This function is deprecated. Use Open instead.
|
||||
///
|
||||
int(CEF_CALLBACK* process_request)(struct _cef_resource_handler_t* self,
|
||||
struct _cef_request_t* request,
|
||||
struct _cef_callback_t* callback);
|
||||
|
||||
///
|
||||
// Retrieve response header information. If the response length is not known
|
||||
// set |response_length| to -1 and read_response() will be called until it
|
||||
// returns false (0). If the response length is known set |response_length| to
|
||||
// a positive value and read_response() will be called until it returns false
|
||||
// (0) or the specified number of bytes have been read. Use the |response|
|
||||
// object to set the mime type, http status code and other optional header
|
||||
// values. To redirect the request to a new URL set |redirectUrl| to the new
|
||||
// URL. |redirectUrl| can be either a relative or fully qualified URL. It is
|
||||
// also possible to set |response| to a redirect http status code and pass the
|
||||
// new URL via a Location header. Likewise with |redirectUrl| it is valid to
|
||||
// set a relative or fully qualified URL as the Location header value. If an
|
||||
// error occured while setting up the request you can call set_error() on
|
||||
// |response| to indicate the error condition.
|
||||
/// Retrieve response header information. If the response length is not known
|
||||
/// set |response_length| to -1 and read_response() will be called until it
|
||||
/// returns false (0). If the response length is known set |response_length|
|
||||
/// to a positive value and read_response() will be called until it returns
|
||||
/// false (0) or the specified number of bytes have been read. Use the
|
||||
/// |response| object to set the mime type, http status code and other
|
||||
/// optional header values. To redirect the request to a new URL set
|
||||
/// |redirectUrl| to the new URL. |redirectUrl| can be either a relative or
|
||||
/// fully qualified URL. It is also possible to set |response| to a redirect
|
||||
/// http status code and pass the new URL via a Location header. Likewise with
|
||||
/// |redirectUrl| it is valid to set a relative or fully qualified URL as the
|
||||
/// Location header value. If an error occured while setting up the request
|
||||
/// you can call set_error() on |response| to indicate the error condition.
|
||||
///
|
||||
void(CEF_CALLBACK* get_response_headers)(struct _cef_resource_handler_t* self,
|
||||
struct _cef_response_t* response,
|
||||
@ -149,13 +150,13 @@ typedef struct _cef_resource_handler_t {
|
||||
cef_string_t* redirectUrl);
|
||||
|
||||
///
|
||||
// Skip response data when requested by a Range header. Skip over and discard
|
||||
// |bytes_to_skip| bytes of response data. If data is available immediately
|
||||
// set |bytes_skipped| to the number of bytes skipped and return true (1). To
|
||||
// read the data at a later time set |bytes_skipped| to 0, return true (1) and
|
||||
// execute |callback| when the data is available. To indicate failure set
|
||||
// |bytes_skipped| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This
|
||||
// function will be called in sequence but not from a dedicated thread.
|
||||
/// Skip response data when requested by a Range header. Skip over and discard
|
||||
/// |bytes_to_skip| bytes of response data. If data is available immediately
|
||||
/// set |bytes_skipped| to the number of bytes skipped and return true (1). To
|
||||
/// read the data at a later time set |bytes_skipped| to 0, return true (1)
|
||||
/// and execute |callback| when the data is available. To indicate failure set
|
||||
/// |bytes_skipped| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This
|
||||
/// function will be called in sequence but not from a dedicated thread.
|
||||
///
|
||||
int(CEF_CALLBACK* skip)(struct _cef_resource_handler_t* self,
|
||||
int64 bytes_to_skip,
|
||||
@ -163,17 +164,17 @@ typedef struct _cef_resource_handler_t {
|
||||
struct _cef_resource_skip_callback_t* callback);
|
||||
|
||||
///
|
||||
// Read response data. If data is available immediately copy up to
|
||||
// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
|
||||
// bytes copied, and return true (1). To read the data at a later time keep a
|
||||
// pointer to |data_out|, set |bytes_read| to 0, return true (1) and execute
|
||||
// |callback| when the data is available (|data_out| will remain valid until
|
||||
// the callback is executed). To indicate response completion set |bytes_read|
|
||||
// to 0 and return false (0). To indicate failure set |bytes_read| to < 0
|
||||
// (e.g. -2 for ERR_FAILED) and return false (0). This function will be called
|
||||
// in sequence but not from a dedicated thread. For backwards compatibility
|
||||
// set |bytes_read| to -1 and return false (0) and the ReadResponse function
|
||||
// will be called.
|
||||
/// Read response data. If data is available immediately copy up to
|
||||
/// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
|
||||
/// bytes copied, and return true (1). To read the data at a later time keep a
|
||||
/// pointer to |data_out|, set |bytes_read| to 0, return true (1) and execute
|
||||
/// |callback| when the data is available (|data_out| will remain valid until
|
||||
/// the callback is executed). To indicate response completion set
|
||||
/// |bytes_read| to 0 and return false (0). To indicate failure set
|
||||
/// |bytes_read| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This
|
||||
/// function will be called in sequence but not from a dedicated thread. For
|
||||
/// backwards compatibility set |bytes_read| to -1 and return false (0) and
|
||||
/// the ReadResponse function will be called.
|
||||
///
|
||||
int(CEF_CALLBACK* read)(struct _cef_resource_handler_t* self,
|
||||
void* data_out,
|
||||
@ -182,13 +183,13 @@ typedef struct _cef_resource_handler_t {
|
||||
struct _cef_resource_read_callback_t* callback);
|
||||
|
||||
///
|
||||
// Read response data. If data is available immediately copy up to
|
||||
// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
|
||||
// bytes copied, and return true (1). To read the data at a later time set
|
||||
// |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when the
|
||||
// data is available. To indicate response completion return false (0).
|
||||
//
|
||||
// WARNING: This function is deprecated. Use Skip and Read instead.
|
||||
/// Read response data. If data is available immediately copy up to
|
||||
/// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of
|
||||
/// bytes copied, and return true (1). To read the data at a later time set
|
||||
/// |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when
|
||||
/// the data is available. To indicate response completion return false (0).
|
||||
///
|
||||
/// WARNING: This function is deprecated. Use Skip and Read instead.
|
||||
///
|
||||
int(CEF_CALLBACK* read_response)(struct _cef_resource_handler_t* self,
|
||||
void* data_out,
|
||||
@ -197,7 +198,7 @@ typedef struct _cef_resource_handler_t {
|
||||
struct _cef_callback_t* callback);
|
||||
|
||||
///
|
||||
// Request processing has been canceled.
|
||||
/// Request processing has been canceled.
|
||||
///
|
||||
void(CEF_CALLBACK* cancel)(struct _cef_resource_handler_t* self);
|
||||
} cef_resource_handler_t;
|
||||
|
Reference in New Issue
Block a user