mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Introduce CefString and cef_string_t implementations that support string type conversions and customization of the API string type (issue #146).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@145 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -118,15 +118,16 @@ CEF_EXPORT void cef_do_message_loop_work();
|
||||
// // Call another function.
|
||||
// example.test.increment();
|
||||
//
|
||||
CEF_EXPORT int cef_register_extension(const wchar_t* extension_name,
|
||||
const wchar_t* javascript_code, struct _cef_v8handler_t* handler);
|
||||
CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name,
|
||||
const cef_string_t* javascript_code, struct _cef_v8handler_t* handler);
|
||||
|
||||
// Register a custom scheme handler factory for the specified |scheme_name| and
|
||||
// |host_name|. All URLs beginning with scheme_name://host_name/ can be handled
|
||||
// by cef_scheme_handler_t instances returned by the factory. Specify an NULL
|
||||
// |host_name| value to match all host names.
|
||||
CEF_EXPORT int cef_register_scheme(const wchar_t* scheme_name,
|
||||
const wchar_t* host_name, struct _cef_scheme_handler_factory_t* factory);
|
||||
CEF_EXPORT int cef_register_scheme(const cef_string_t* scheme_name,
|
||||
const cef_string_t* host_name,
|
||||
struct _cef_scheme_handler_factory_t* factory);
|
||||
|
||||
// CEF maintains multiple internal threads that are used for handling different
|
||||
// types of tasks. The UI thread creates the browser window and is used for all
|
||||
@@ -236,7 +237,7 @@ typedef struct _cef_browser_t
|
||||
|
||||
// Returns the frame with the specified name, or NULL if not found.
|
||||
struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_browser_t* self,
|
||||
const wchar_t* name);
|
||||
const cef_string_t* name);
|
||||
|
||||
// Returns the names of all existing frames.
|
||||
void (CEF_CALLBACK *get_frame_names)(struct _cef_browser_t* self,
|
||||
@@ -248,7 +249,8 @@ typedef struct _cef_browser_t
|
||||
// be case-sensitive. |findNext| indicates whether this is the first request
|
||||
// or a follow-up.
|
||||
void (CEF_CALLBACK *find)(struct _cef_browser_t* self, int identifier,
|
||||
const wchar_t* searchText, int forward, int matchCase, int findNext);
|
||||
const cef_string_t* searchText, int forward, int matchCase,
|
||||
int findNext);
|
||||
|
||||
// Cancel all searches that are currently going on.
|
||||
void (CEF_CALLBACK *stop_finding)(struct _cef_browser_t* self,
|
||||
@@ -262,14 +264,14 @@ typedef struct _cef_browser_t
|
||||
// be created on the UI thread. The |popup| parameter should be true (1) if the
|
||||
// new window is a popup window. This function call will not block.
|
||||
CEF_EXPORT int cef_browser_create(cef_window_info_t* windowInfo, int popup,
|
||||
struct _cef_handler_t* handler, const wchar_t* url);
|
||||
struct _cef_handler_t* handler, const cef_string_t* url);
|
||||
|
||||
// Create a new browser window using the window parameters specified by
|
||||
// |windowInfo|. The |popup| parameter should be true (1) if the new window is a
|
||||
// popup window. This function call will block and can only be used if the
|
||||
// |multi_threaded_message_loop| parameter to cef_initialize() is false (0).
|
||||
CEF_EXPORT cef_browser_t* cef_browser_create_sync(cef_window_info_t* windowInfo,
|
||||
int popup, struct _cef_handler_t* handler, const wchar_t* url);
|
||||
int popup, struct _cef_handler_t* handler, const cef_string_t* url);
|
||||
|
||||
|
||||
// Structure used to represent a frame in the browser window. All functions
|
||||
@@ -309,27 +311,28 @@ typedef struct _cef_frame_t
|
||||
void (CEF_CALLBACK *view_source)(struct _cef_frame_t* self);
|
||||
|
||||
// Returns this frame's HTML source as a string.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_source)(struct _cef_frame_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_source)(struct _cef_frame_t* self);
|
||||
|
||||
// Returns this frame's display text as a string.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_text)(struct _cef_frame_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_text)(struct _cef_frame_t* self);
|
||||
|
||||
// Load the request represented by the |request| object.
|
||||
void (CEF_CALLBACK *load_request)(struct _cef_frame_t* self,
|
||||
struct _cef_request_t* request);
|
||||
|
||||
// Load the specified |url|.
|
||||
void (CEF_CALLBACK *load_url)(struct _cef_frame_t* self, const wchar_t* url);
|
||||
void (CEF_CALLBACK *load_url)(struct _cef_frame_t* self,
|
||||
const cef_string_t* url);
|
||||
|
||||
// Load the contents of |string| with the optional dummy target |url|.
|
||||
void (CEF_CALLBACK *load_string)(struct _cef_frame_t* self,
|
||||
const wchar_t* string, const wchar_t* url);
|
||||
const cef_string_t* string, const cef_string_t* url);
|
||||
|
||||
// Load the contents of |stream| with the optional dummy target |url|.
|
||||
void (CEF_CALLBACK *load_stream)(struct _cef_frame_t* self,
|
||||
struct _cef_stream_reader_t* stream, const wchar_t* url);
|
||||
struct _cef_stream_reader_t* stream, const cef_string_t* url);
|
||||
|
||||
// Execute a string of JavaScript code in this frame. The |script_url|
|
||||
// parameter is the URL where the script in question can be found, if any. The
|
||||
@@ -337,7 +340,8 @@ typedef struct _cef_frame_t
|
||||
// error. The |start_line| parameter is the base line number to use for error
|
||||
// reporting.
|
||||
void (CEF_CALLBACK *execute_java_script)(struct _cef_frame_t* self,
|
||||
const wchar_t* jsCode, const wchar_t* scriptUrl, int startLine);
|
||||
const cef_string_t* jsCode, const cef_string_t* scriptUrl,
|
||||
int startLine);
|
||||
|
||||
// Returns true (1) if this is the main frame.
|
||||
int (CEF_CALLBACK *is_main)(struct _cef_frame_t* self);
|
||||
@@ -346,12 +350,12 @@ typedef struct _cef_frame_t
|
||||
int (CEF_CALLBACK *is_focused)(struct _cef_frame_t* self);
|
||||
|
||||
// Returns this frame's name.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_name)(struct _cef_frame_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_name)(struct _cef_frame_t* self);
|
||||
|
||||
// Return the URL currently loaded in this frame.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_url)(struct _cef_frame_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_frame_t* self);
|
||||
|
||||
} cef_frame_t;
|
||||
|
||||
@@ -390,13 +394,13 @@ typedef struct _cef_handler_t
|
||||
// currently ignored.
|
||||
enum cef_retval_t (CEF_CALLBACK *handle_address_change)(
|
||||
struct _cef_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, const wchar_t* url);
|
||||
struct _cef_frame_t* frame, const cef_string_t* url);
|
||||
|
||||
// Event called when the page title changes. The return value is currently
|
||||
// ignored.
|
||||
enum cef_retval_t (CEF_CALLBACK *handle_title_change)(
|
||||
struct _cef_handler_t* self, struct _cef_browser_t* browser,
|
||||
const wchar_t* title);
|
||||
const cef_string_t* title);
|
||||
|
||||
// Event called before browser navigation. The client has an opportunity to
|
||||
// modify the |request| object if desired. Return RV_HANDLED to cancel
|
||||
@@ -428,7 +432,7 @@ typedef struct _cef_handler_t
|
||||
enum cef_retval_t (CEF_CALLBACK *handle_load_error)(
|
||||
struct _cef_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, enum cef_handler_errorcode_t errorCode,
|
||||
const wchar_t* failedUrl, cef_string_t* errorText);
|
||||
const cef_string_t* failedUrl, cef_string_t* errorText);
|
||||
|
||||
// Event called before a resource is loaded. To allow the resource to load
|
||||
// normally return RV_CONTINUE. To redirect the resource to a new url populate
|
||||
@@ -453,8 +457,8 @@ typedef struct _cef_handler_t
|
||||
// RV_HANDLED to cancel the file download.
|
||||
enum cef_retval_t (CEF_CALLBACK *handle_download_response)(
|
||||
struct _cef_handler_t* self, struct _cef_browser_t* browser,
|
||||
const wchar_t* mimeType, const wchar_t* fileName, int64 contentLength,
|
||||
struct _cef_download_handler_t** handler);
|
||||
const cef_string_t* mimeType, const cef_string_t* fileName,
|
||||
int64 contentLength, struct _cef_download_handler_t** handler);
|
||||
|
||||
// Event called before a context menu is displayed. To cancel display of the
|
||||
// default context menu return RV_HANDLED.
|
||||
@@ -498,23 +502,23 @@ typedef struct _cef_handler_t
|
||||
enum cef_retval_t (CEF_CALLBACK *handle_print_header_footer)(
|
||||
struct _cef_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, struct _cef_print_info_t* printInfo,
|
||||
const wchar_t* url, const wchar_t* title, int currentPage, int maxPages,
|
||||
cef_string_t* topLeft, cef_string_t* topCenter, cef_string_t* topRight,
|
||||
cef_string_t* bottomLeft, cef_string_t* bottomCenter,
|
||||
cef_string_t* bottomRight);
|
||||
const cef_string_t* url, const cef_string_t* title, int currentPage,
|
||||
int maxPages, cef_string_t* topLeft, cef_string_t* topCenter,
|
||||
cef_string_t* topRight, cef_string_t* bottomLeft,
|
||||
cef_string_t* bottomCenter, cef_string_t* bottomRight);
|
||||
|
||||
// Run a JS alert message. Return RV_CONTINUE to display the default alert or
|
||||
// RV_HANDLED if you displayed a custom alert.
|
||||
enum cef_retval_t (CEF_CALLBACK *handle_jsalert)(struct _cef_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
const wchar_t* message);
|
||||
const cef_string_t* message);
|
||||
|
||||
// Run a JS confirm request. Return RV_CONTINUE to display the default alert
|
||||
// or RV_HANDLED if you displayed a custom alert. If you handled the alert
|
||||
// set |retval| to true (1) if the user accepted the confirmation.
|
||||
enum cef_retval_t (CEF_CALLBACK *handle_jsconfirm)(
|
||||
struct _cef_handler_t* self, struct _cef_browser_t* browser,
|
||||
struct _cef_frame_t* frame, const wchar_t* message, int* retval);
|
||||
struct _cef_frame_t* frame, const cef_string_t* message, int* retval);
|
||||
|
||||
// Run a JS prompt request. Return RV_CONTINUE to display the default prompt
|
||||
// or RV_HANDLED if you displayed a custom prompt. If you handled the prompt
|
||||
@@ -522,8 +526,8 @@ typedef struct _cef_handler_t
|
||||
// |result| to the resulting value.
|
||||
enum cef_retval_t (CEF_CALLBACK *handle_jsprompt)(struct _cef_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
|
||||
const wchar_t* message, const wchar_t* defaultValue, int* retval,
|
||||
cef_string_t* result);
|
||||
const cef_string_t* message, const cef_string_t* defaultValue,
|
||||
int* retval, cef_string_t* result);
|
||||
|
||||
// Event called for adding values to a frame's JavaScript 'window' object. The
|
||||
// return value is currently ignored.
|
||||
@@ -576,7 +580,7 @@ typedef struct _cef_handler_t
|
||||
// from being output to the console.
|
||||
enum cef_retval_t (CEF_CALLBACK *handle_console_message)(
|
||||
struct _cef_handler_t* self, struct _cef_browser_t* browser,
|
||||
const wchar_t* message, const wchar_t* source, int line);
|
||||
const cef_string_t* message, const cef_string_t* source, int line);
|
||||
|
||||
// Called to report find results returned by cef_browser_t::find().
|
||||
// |identifer| is the identifier passed to cef_browser_t::find(), |count| is
|
||||
@@ -600,16 +604,17 @@ typedef struct _cef_request_t
|
||||
cef_base_t base;
|
||||
|
||||
// Fully qualified URL to load.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_url)(struct _cef_request_t* self);
|
||||
void (CEF_CALLBACK *set_url)(struct _cef_request_t* self, const wchar_t* url);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_url)(struct _cef_request_t* self);
|
||||
void (CEF_CALLBACK *set_url)(struct _cef_request_t* self,
|
||||
const cef_string_t* url);
|
||||
|
||||
// Optional request function type, defaulting to POST if post data is provided
|
||||
// and GET otherwise.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_method)(struct _cef_request_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_method)(struct _cef_request_t* self);
|
||||
void (CEF_CALLBACK *set_method)(struct _cef_request_t* self,
|
||||
const wchar_t* method);
|
||||
const cef_string_t* method);
|
||||
|
||||
// Optional post data.
|
||||
struct _cef_post_data_t* (CEF_CALLBACK *get_post_data)(
|
||||
@@ -624,8 +629,8 @@ typedef struct _cef_request_t
|
||||
cef_string_map_t headerMap);
|
||||
|
||||
// Set all values at one time.
|
||||
void (CEF_CALLBACK *set)(struct _cef_request_t* self, const wchar_t* url,
|
||||
const wchar_t* method, struct _cef_post_data_t* postData,
|
||||
void (CEF_CALLBACK *set)(struct _cef_request_t* self, const cef_string_t* url,
|
||||
const cef_string_t* method, struct _cef_post_data_t* postData,
|
||||
cef_string_map_t headerMap);
|
||||
|
||||
} cef_request_t;
|
||||
@@ -678,7 +683,7 @@ typedef struct _cef_post_data_element_t
|
||||
|
||||
// The post data element will represent a file.
|
||||
void (CEF_CALLBACK *set_to_file)(struct _cef_post_data_element_t* self,
|
||||
const wchar_t* fileName);
|
||||
const cef_string_t* fileName);
|
||||
|
||||
// The post data element will represent bytes. The bytes passed in will be
|
||||
// copied.
|
||||
@@ -690,8 +695,9 @@ typedef struct _cef_post_data_element_t
|
||||
struct _cef_post_data_element_t* self);
|
||||
|
||||
// Return the file name.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_file)(struct _cef_post_data_element_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_file)(
|
||||
struct _cef_post_data_element_t* self);
|
||||
|
||||
// Return the number of bytes.
|
||||
size_t (CEF_CALLBACK *get_bytes_count)(struct _cef_post_data_element_t* self);
|
||||
@@ -758,7 +764,7 @@ typedef struct _cef_stream_reader_t
|
||||
|
||||
// Create a new cef_stream_reader_t object.
|
||||
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_file(
|
||||
const wchar_t* fileName);
|
||||
const cef_string_t* fileName);
|
||||
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_data(void* data,
|
||||
size_t size);
|
||||
CEF_EXPORT cef_stream_reader_t* cef_stream_reader_create_for_handler(
|
||||
@@ -815,7 +821,7 @@ typedef struct _cef_stream_writer_t
|
||||
|
||||
// Create a new cef_stream_writer_t object.
|
||||
CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_file(
|
||||
const wchar_t* fileName);
|
||||
const cef_string_t* fileName);
|
||||
CEF_EXPORT cef_stream_writer_t* cef_stream_writer_create_for_handler(
|
||||
cef_write_handler_t* handler);
|
||||
|
||||
@@ -829,9 +835,9 @@ typedef struct _cef_v8handler_t
|
||||
// Execute with the specified argument list and return value. Return true (1)
|
||||
// if the function was handled.
|
||||
int (CEF_CALLBACK *execute)(struct _cef_v8handler_t* self,
|
||||
const wchar_t* name, struct _cef_v8value_t* object, size_t argumentCount,
|
||||
struct _cef_v8value_t* const* arguments, struct _cef_v8value_t** retval,
|
||||
cef_string_t* exception);
|
||||
const cef_string_t* name, struct _cef_v8value_t* object,
|
||||
size_t argumentCount, struct _cef_v8value_t* const* arguments,
|
||||
struct _cef_v8value_t** retval, cef_string_t* exception);
|
||||
|
||||
} cef_v8handler_t;
|
||||
|
||||
@@ -858,8 +864,9 @@ typedef struct _cef_v8value_t
|
||||
int (CEF_CALLBACK *get_bool_value)(struct _cef_v8value_t* self);
|
||||
int (CEF_CALLBACK *get_int_value)(struct _cef_v8value_t* self);
|
||||
double (CEF_CALLBACK *get_double_value)(struct _cef_v8value_t* self);
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_string_value)(struct _cef_v8value_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_string_value)(
|
||||
struct _cef_v8value_t* self);
|
||||
|
||||
|
||||
// OBJECT METHODS - These functions are only available on objects. Arrays and
|
||||
@@ -869,24 +876,24 @@ typedef struct _cef_v8value_t
|
||||
|
||||
// Returns true (1) if the object has a value with the specified identifier.
|
||||
int (CEF_CALLBACK *has_value_bykey)(struct _cef_v8value_t* self,
|
||||
const wchar_t* key);
|
||||
const cef_string_t* key);
|
||||
int (CEF_CALLBACK *has_value_byindex)(struct _cef_v8value_t* self, int index);
|
||||
|
||||
// Delete the value with the specified identifier.
|
||||
int (CEF_CALLBACK *delete_value_bykey)(struct _cef_v8value_t* self,
|
||||
const wchar_t* key);
|
||||
const cef_string_t* key);
|
||||
int (CEF_CALLBACK *delete_value_byindex)(struct _cef_v8value_t* self,
|
||||
int index);
|
||||
|
||||
// Returns the value with the specified identifier.
|
||||
struct _cef_v8value_t* (CEF_CALLBACK *get_value_bykey)(
|
||||
struct _cef_v8value_t* self, const wchar_t* key);
|
||||
struct _cef_v8value_t* self, const cef_string_t* key);
|
||||
struct _cef_v8value_t* (CEF_CALLBACK *get_value_byindex)(
|
||||
struct _cef_v8value_t* self, int index);
|
||||
|
||||
// Associate value with the specified identifier.
|
||||
int (CEF_CALLBACK *set_value_bykey)(struct _cef_v8value_t* self,
|
||||
const wchar_t* key, struct _cef_v8value_t* value);
|
||||
const cef_string_t* key, struct _cef_v8value_t* value);
|
||||
int (CEF_CALLBACK *set_value_byindex)(struct _cef_v8value_t* self, int index,
|
||||
struct _cef_v8value_t* value);
|
||||
|
||||
@@ -909,8 +916,9 @@ typedef struct _cef_v8value_t
|
||||
// FUNCTION METHODS - These functions are only available on functions.
|
||||
|
||||
// Returns the function name.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_function_name)(struct _cef_v8value_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_function_name)(
|
||||
struct _cef_v8value_t* self);
|
||||
|
||||
// Returns the function handler or NULL if not a CEF-created function.
|
||||
struct _cef_v8handler_t* (CEF_CALLBACK *get_function_handler)(
|
||||
@@ -934,10 +942,10 @@ CEF_EXPORT cef_v8value_t* cef_v8value_create_null();
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_bool(int value);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_int(int value);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_double(double value);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const wchar_t* value);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_string(const cef_string_t* value);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_object(cef_base_t* user_data);
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_array();
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const wchar_t* name,
|
||||
CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const cef_string_t* name,
|
||||
cef_v8handler_t* handler);
|
||||
|
||||
|
||||
@@ -1022,8 +1030,9 @@ typedef struct _cef_xml_reader_t
|
||||
int (CEF_CALLBACK *has_error)(struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns the error string.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_error)(struct _cef_xml_reader_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_error)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
|
||||
// The below functions retrieve data for the node at the current cursor
|
||||
@@ -1038,35 +1047,39 @@ typedef struct _cef_xml_reader_t
|
||||
|
||||
// Returns the local name. See http://www.w3.org/TR/REC-xml-names/#NT-
|
||||
// LocalPart for additional details.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_local_name)(struct _cef_xml_reader_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_local_name)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for
|
||||
// additional details.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_prefix)(struct _cef_xml_reader_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_prefix)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns the qualified name, equal to (Prefix:)LocalName. See
|
||||
// http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_qualified_name)(
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_qualified_name)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns the URI defining the namespace associated with the node. See
|
||||
// http://www.w3.org/TR/REC-xml-names/ for additional details.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_namespace_uri)(
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_namespace_uri)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for
|
||||
// additional details.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_base_uri)(struct _cef_xml_reader_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_base_uri)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns the xml:lang scope within which the node resides. See
|
||||
// http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_xml_lang)(struct _cef_xml_reader_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_xml_lang)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns true (1) if the node represents an NULL element. <a/> is considered
|
||||
// NULL but <a></a> is not.
|
||||
@@ -1076,8 +1089,9 @@ typedef struct _cef_xml_reader_t
|
||||
int (CEF_CALLBACK *has_value)(struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns the text value.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_value)(struct _cef_xml_reader_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_value)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns true (1) if the node has attributes.
|
||||
int (CEF_CALLBACK *has_attributes)(struct _cef_xml_reader_t* self);
|
||||
@@ -1086,29 +1100,31 @@ typedef struct _cef_xml_reader_t
|
||||
size_t (CEF_CALLBACK *get_attribute_count)(struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns the value of the attribute at the specified 0-based index.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_attribute_byindex)(
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_attribute_byindex)(
|
||||
struct _cef_xml_reader_t* self, int index);
|
||||
|
||||
// Returns the value of the attribute with the specified qualified name.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_attribute_byqname)(
|
||||
struct _cef_xml_reader_t* self, const wchar_t* qualifiedName);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_attribute_byqname)(
|
||||
struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName);
|
||||
|
||||
// Returns the value of the attribute with the specified local name and
|
||||
// namespace URI.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_attribute_bylname)(
|
||||
struct _cef_xml_reader_t* self, const wchar_t* localName,
|
||||
const wchar_t* namespaceURI);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_attribute_bylname)(
|
||||
struct _cef_xml_reader_t* self, const cef_string_t* localName,
|
||||
const cef_string_t* namespaceURI);
|
||||
|
||||
// Returns an XML representation of the current node's children.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_inner_xml)(struct _cef_xml_reader_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_inner_xml)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns an XML representation of the current node including its children.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_outer_xml)(struct _cef_xml_reader_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_outer_xml)(
|
||||
struct _cef_xml_reader_t* self);
|
||||
|
||||
// Returns the line number for the current node.
|
||||
int (CEF_CALLBACK *get_line_number)(struct _cef_xml_reader_t* self);
|
||||
@@ -1127,13 +1143,13 @@ typedef struct _cef_xml_reader_t
|
||||
// Moves the cursor to the attribute with the specified qualified name.
|
||||
// Returns true (1) if the cursor position was set successfully.
|
||||
int (CEF_CALLBACK *move_to_attribute_byqname)(struct _cef_xml_reader_t* self,
|
||||
const wchar_t* qualifiedName);
|
||||
const cef_string_t* qualifiedName);
|
||||
|
||||
// Moves the cursor to the attribute with the specified local name and
|
||||
// namespace URI. Returns true (1) if the cursor position was set
|
||||
// successfully.
|
||||
int (CEF_CALLBACK *move_to_attribute_bylname)(struct _cef_xml_reader_t* self,
|
||||
const wchar_t* localName, const wchar_t* namespaceURI);
|
||||
const cef_string_t* localName, const cef_string_t* namespaceURI);
|
||||
|
||||
// Moves the cursor to the first attribute in the current element. Returns
|
||||
// true (1) if the cursor position was set successfully.
|
||||
@@ -1153,7 +1169,7 @@ typedef struct _cef_xml_reader_t
|
||||
// Create a new cef_xml_reader_t object. The returned object's functions can
|
||||
// only be called from the thread that created the object.
|
||||
CEF_EXPORT cef_xml_reader_t* cef_xml_reader_create(cef_stream_reader_t* stream,
|
||||
enum cef_xml_encoding_type_t encodingType, const wchar_t* URI);
|
||||
enum cef_xml_encoding_type_t encodingType, const cef_string_t* URI);
|
||||
|
||||
|
||||
// Structure that supports the reading of zip archives via the zlib unzip API.
|
||||
@@ -1174,7 +1190,7 @@ typedef struct _cef_zip_reader_t
|
||||
// is true (1) then the search will be case sensitive. Returns true (1) if the
|
||||
// cursor position was set successfully.
|
||||
int (CEF_CALLBACK *move_to_file)(struct _cef_zip_reader_t* self,
|
||||
const wchar_t* fileName, int caseSensitive);
|
||||
const cef_string_t* fileName, int caseSensitive);
|
||||
|
||||
// Closes the archive. This should be called directly to ensure that cleanup
|
||||
// occurs on the correct thread.
|
||||
@@ -1184,8 +1200,9 @@ typedef struct _cef_zip_reader_t
|
||||
// The below functions act on the file at the current cursor position.
|
||||
|
||||
// Returns the name of the file.
|
||||
// The resulting string must be freed by calling cef_string_free().
|
||||
cef_string_t (CEF_CALLBACK *get_file_name)(struct _cef_zip_reader_t* self);
|
||||
// The resulting string must be freed by calling cef_string_userfree_free().
|
||||
cef_string_userfree_t (CEF_CALLBACK *get_file_name)(
|
||||
struct _cef_zip_reader_t* self);
|
||||
|
||||
// Returns the uncompressed size of the file.
|
||||
long (CEF_CALLBACK *get_file_size)(struct _cef_zip_reader_t* self);
|
||||
@@ -1196,7 +1213,7 @@ typedef struct _cef_zip_reader_t
|
||||
// Opens the file for reading of uncompressed data. A read password may
|
||||
// optionally be specified.
|
||||
int (CEF_CALLBACK *open_file)(struct _cef_zip_reader_t* self,
|
||||
const wchar_t* password);
|
||||
const cef_string_t* password);
|
||||
|
||||
// Closes the file.
|
||||
int (CEF_CALLBACK *close_file)(struct _cef_zip_reader_t* self);
|
||||
|
Reference in New Issue
Block a user