mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Apply clang-format to all C, C++ and ObjC files (issue #2171)
This commit is contained in:
@ -33,6 +33,8 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=4e127106e9b5fada6bf05ea6e29bc502bb2a1e0d$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
|
||||
#define CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_
|
||||
@ -44,7 +46,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
// Structure the client can implement to provide a custom stream reader. The
|
||||
// functions of this structure may be called on any thread.
|
||||
@ -58,35 +59,37 @@ typedef struct _cef_read_handler_t {
|
||||
///
|
||||
// Read raw binary data.
|
||||
///
|
||||
size_t (CEF_CALLBACK *read)(struct _cef_read_handler_t* self, void* ptr,
|
||||
size_t size, size_t n);
|
||||
size_t(CEF_CALLBACK* read)(struct _cef_read_handler_t* self,
|
||||
void* ptr,
|
||||
size_t size,
|
||||
size_t n);
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
|
||||
// SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
|
||||
///
|
||||
int (CEF_CALLBACK *seek)(struct _cef_read_handler_t* self, int64 offset,
|
||||
int whence);
|
||||
int(CEF_CALLBACK* seek)(struct _cef_read_handler_t* self,
|
||||
int64 offset,
|
||||
int whence);
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
int64 (CEF_CALLBACK *tell)(struct _cef_read_handler_t* self);
|
||||
int64(CEF_CALLBACK* tell)(struct _cef_read_handler_t* self);
|
||||
|
||||
///
|
||||
// Return non-zero if at end of file.
|
||||
///
|
||||
int (CEF_CALLBACK *eof)(struct _cef_read_handler_t* self);
|
||||
int(CEF_CALLBACK* eof)(struct _cef_read_handler_t* self);
|
||||
|
||||
///
|
||||
// Return true (1) if this handler performs work like accessing the file
|
||||
// system which may block. Used as a hint for determining the thread to access
|
||||
// the handler from.
|
||||
///
|
||||
int (CEF_CALLBACK *may_block)(struct _cef_read_handler_t* self);
|
||||
int(CEF_CALLBACK* may_block)(struct _cef_read_handler_t* self);
|
||||
} cef_read_handler_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to read data from a stream. The functions of this structure
|
||||
// may be called on any thread.
|
||||
@ -100,35 +103,37 @@ typedef struct _cef_stream_reader_t {
|
||||
///
|
||||
// Read raw binary data.
|
||||
///
|
||||
size_t (CEF_CALLBACK *read)(struct _cef_stream_reader_t* self, void* ptr,
|
||||
size_t size, size_t n);
|
||||
size_t(CEF_CALLBACK* read)(struct _cef_stream_reader_t* self,
|
||||
void* ptr,
|
||||
size_t size,
|
||||
size_t n);
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
|
||||
// SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
|
||||
///
|
||||
int (CEF_CALLBACK *seek)(struct _cef_stream_reader_t* self, int64 offset,
|
||||
int whence);
|
||||
int(CEF_CALLBACK* seek)(struct _cef_stream_reader_t* self,
|
||||
int64 offset,
|
||||
int whence);
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
int64 (CEF_CALLBACK *tell)(struct _cef_stream_reader_t* self);
|
||||
int64(CEF_CALLBACK* tell)(struct _cef_stream_reader_t* self);
|
||||
|
||||
///
|
||||
// Return non-zero if at end of file.
|
||||
///
|
||||
int (CEF_CALLBACK *eof)(struct _cef_stream_reader_t* self);
|
||||
int(CEF_CALLBACK* eof)(struct _cef_stream_reader_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this reader performs work like accessing the file
|
||||
// system which may block. Used as a hint for determining the thread to access
|
||||
// the reader from.
|
||||
///
|
||||
int (CEF_CALLBACK *may_block)(struct _cef_stream_reader_t* self);
|
||||
int(CEF_CALLBACK* may_block)(struct _cef_stream_reader_t* self);
|
||||
} cef_stream_reader_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_stream_reader_t object from a file.
|
||||
///
|
||||
@ -139,7 +144,7 @@ CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_file(
|
||||
// Create a new cef_stream_reader_t object from data.
|
||||
///
|
||||
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data,
|
||||
size_t size);
|
||||
size_t size);
|
||||
|
||||
///
|
||||
// Create a new cef_stream_reader_t object from a custom handler.
|
||||
@ -147,7 +152,6 @@ CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data,
|
||||
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler(
|
||||
cef_read_handler_t* handler);
|
||||
|
||||
|
||||
///
|
||||
// Structure the client can implement to provide a custom stream writer. The
|
||||
// functions of this structure may be called on any thread.
|
||||
@ -161,35 +165,37 @@ typedef struct _cef_write_handler_t {
|
||||
///
|
||||
// Write raw binary data.
|
||||
///
|
||||
size_t (CEF_CALLBACK *write)(struct _cef_write_handler_t* self,
|
||||
const void* ptr, size_t size, size_t n);
|
||||
size_t(CEF_CALLBACK* write)(struct _cef_write_handler_t* self,
|
||||
const void* ptr,
|
||||
size_t size,
|
||||
size_t n);
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
|
||||
// SEEK_END or SEEK_SET. Return zero on success and non-zero on failure.
|
||||
///
|
||||
int (CEF_CALLBACK *seek)(struct _cef_write_handler_t* self, int64 offset,
|
||||
int whence);
|
||||
int(CEF_CALLBACK* seek)(struct _cef_write_handler_t* self,
|
||||
int64 offset,
|
||||
int whence);
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
int64 (CEF_CALLBACK *tell)(struct _cef_write_handler_t* self);
|
||||
int64(CEF_CALLBACK* tell)(struct _cef_write_handler_t* self);
|
||||
|
||||
///
|
||||
// Flush the stream.
|
||||
///
|
||||
int (CEF_CALLBACK *flush)(struct _cef_write_handler_t* self);
|
||||
int(CEF_CALLBACK* flush)(struct _cef_write_handler_t* self);
|
||||
|
||||
///
|
||||
// Return true (1) if this handler performs work like accessing the file
|
||||
// system which may block. Used as a hint for determining the thread to access
|
||||
// the handler from.
|
||||
///
|
||||
int (CEF_CALLBACK *may_block)(struct _cef_write_handler_t* self);
|
||||
int(CEF_CALLBACK* may_block)(struct _cef_write_handler_t* self);
|
||||
} cef_write_handler_t;
|
||||
|
||||
|
||||
///
|
||||
// Structure used to write data to a stream. The functions of this structure may
|
||||
// be called on any thread.
|
||||
@ -203,35 +209,37 @@ typedef struct _cef_stream_writer_t {
|
||||
///
|
||||
// Write raw binary data.
|
||||
///
|
||||
size_t (CEF_CALLBACK *write)(struct _cef_stream_writer_t* self,
|
||||
const void* ptr, size_t size, size_t n);
|
||||
size_t(CEF_CALLBACK* write)(struct _cef_stream_writer_t* self,
|
||||
const void* ptr,
|
||||
size_t size,
|
||||
size_t n);
|
||||
|
||||
///
|
||||
// Seek to the specified offset position. |whence| may be any one of SEEK_CUR,
|
||||
// SEEK_END or SEEK_SET. Returns zero on success and non-zero on failure.
|
||||
///
|
||||
int (CEF_CALLBACK *seek)(struct _cef_stream_writer_t* self, int64 offset,
|
||||
int whence);
|
||||
int(CEF_CALLBACK* seek)(struct _cef_stream_writer_t* self,
|
||||
int64 offset,
|
||||
int whence);
|
||||
|
||||
///
|
||||
// Return the current offset position.
|
||||
///
|
||||
int64 (CEF_CALLBACK *tell)(struct _cef_stream_writer_t* self);
|
||||
int64(CEF_CALLBACK* tell)(struct _cef_stream_writer_t* self);
|
||||
|
||||
///
|
||||
// Flush the stream.
|
||||
///
|
||||
int (CEF_CALLBACK *flush)(struct _cef_stream_writer_t* self);
|
||||
int(CEF_CALLBACK* flush)(struct _cef_stream_writer_t* self);
|
||||
|
||||
///
|
||||
// Returns true (1) if this writer performs work like accessing the file
|
||||
// system which may block. Used as a hint for determining the thread to access
|
||||
// the writer from.
|
||||
///
|
||||
int (CEF_CALLBACK *may_block)(struct _cef_stream_writer_t* self);
|
||||
int(CEF_CALLBACK* may_block)(struct _cef_stream_writer_t* self);
|
||||
} cef_stream_writer_t;
|
||||
|
||||
|
||||
///
|
||||
// Create a new cef_stream_writer_t object for a file.
|
||||
///
|
||||
@ -244,7 +252,6 @@ CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_file(
|
||||
CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler(
|
||||
cef_write_handler_t* handler);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user