cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc

620 lines
14 KiB
C++

// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/stream_reader_cpptoc.h"
#include "libcef_dll/cpptoc/xml_reader_cpptoc.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_xml_reader_t* cef_xml_reader_create(cef_stream_reader_t* stream,
enum cef_xml_encoding_type_t encodingType, const cef_string_t* URI)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: stream; type: refptr_same
DCHECK(stream);
if (!stream)
return NULL;
// Verify param: URI; type: string_byref_const
DCHECK(URI);
if (!URI)
return NULL;
// Execute
CefRefPtr<CefXmlReader> _retval = CefXmlReader::Create(
CefStreamReaderCppToC::Unwrap(stream),
encodingType,
CefString(URI));
// Return type: refptr_same
return CefXmlReaderCppToC::Wrap(_retval);
}
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK xml_reader_move_to_next_node(struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToNextNode();
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_close(struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->Close();
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_has_error(struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->HasError();
// Return type: bool
return _retval;
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_error(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetError();
// Return type: string
return _retval.DetachToUserFree();
}
enum cef_xml_node_type_t CEF_CALLBACK xml_reader_get_type(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return XML_NODE_UNSUPPORTED;
// Execute
cef_xml_node_type_t _retval = CefXmlReaderCppToC::Get(self)->GetType();
// Return type: simple
return _retval;
}
int CEF_CALLBACK xml_reader_get_depth(struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefXmlReaderCppToC::Get(self)->GetDepth();
// Return type: simple
return _retval;
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_local_name(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetLocalName();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_prefix(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetPrefix();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_qualified_name(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetQualifiedName();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_namespace_uri(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetNamespaceURI();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_base_uri(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetBaseURI();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_xml_lang(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetXmlLang();
// Return type: string
return _retval.DetachToUserFree();
}
int CEF_CALLBACK xml_reader_is_empty_element(struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->IsEmptyElement();
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_has_value(struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->HasValue();
// Return type: bool
return _retval;
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_value(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetValue();
// Return type: string
return _retval.DetachToUserFree();
}
int CEF_CALLBACK xml_reader_has_attributes(struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->HasAttributes();
// Return type: bool
return _retval;
}
size_t CEF_CALLBACK xml_reader_get_attribute_count(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
size_t _retval = CefXmlReaderCppToC::Get(self)->GetAttributeCount();
// Return type: simple
return _retval;
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_attribute_byindex(
struct _cef_xml_reader_t* self, int index)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: index; type: simple_byval
DCHECK(index >= 0);
if (index < 0)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetAttribute(
index);
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_attribute_byqname(
struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: qualifiedName; type: string_byref_const
DCHECK(qualifiedName);
if (!qualifiedName)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetAttribute(
CefString(qualifiedName));
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_attribute_bylname(
struct _cef_xml_reader_t* self, const cef_string_t* localName,
const cef_string_t* namespaceURI)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: localName; type: string_byref_const
DCHECK(localName);
if (!localName)
return NULL;
// Verify param: namespaceURI; type: string_byref_const
DCHECK(namespaceURI);
if (!namespaceURI)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetAttribute(
CefString(localName),
CefString(namespaceURI));
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_inner_xml(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetInnerXml();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK xml_reader_get_outer_xml(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefXmlReaderCppToC::Get(self)->GetOuterXml();
// Return type: string
return _retval.DetachToUserFree();
}
int CEF_CALLBACK xml_reader_get_line_number(struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefXmlReaderCppToC::Get(self)->GetLineNumber();
// Return type: simple
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_attribute_byindex(
struct _cef_xml_reader_t* self, int index)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: index; type: simple_byval
DCHECK(index >= 0);
if (index < 0)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToAttribute(
index);
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_attribute_byqname(
struct _cef_xml_reader_t* self, const cef_string_t* qualifiedName)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: qualifiedName; type: string_byref_const
DCHECK(qualifiedName);
if (!qualifiedName)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToAttribute(
CefString(qualifiedName));
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_attribute_bylname(
struct _cef_xml_reader_t* self, const cef_string_t* localName,
const cef_string_t* namespaceURI)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: localName; type: string_byref_const
DCHECK(localName);
if (!localName)
return 0;
// Verify param: namespaceURI; type: string_byref_const
DCHECK(namespaceURI);
if (!namespaceURI)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToAttribute(
CefString(localName),
CefString(namespaceURI));
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_first_attribute(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToFirstAttribute();
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_next_attribute(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToNextAttribute();
// Return type: bool
return _retval;
}
int CEF_CALLBACK xml_reader_move_to_carrying_element(
struct _cef_xml_reader_t* self)
{
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefXmlReaderCppToC::Get(self)->MoveToCarryingElement();
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefXmlReaderCppToC::CefXmlReaderCppToC(CefXmlReader* cls)
: CefCppToC<CefXmlReaderCppToC, CefXmlReader, cef_xml_reader_t>(cls)
{
struct_.struct_.move_to_next_node = xml_reader_move_to_next_node;
struct_.struct_.close = xml_reader_close;
struct_.struct_.has_error = xml_reader_has_error;
struct_.struct_.get_error = xml_reader_get_error;
struct_.struct_.get_type = xml_reader_get_type;
struct_.struct_.get_depth = xml_reader_get_depth;
struct_.struct_.get_local_name = xml_reader_get_local_name;
struct_.struct_.get_prefix = xml_reader_get_prefix;
struct_.struct_.get_qualified_name = xml_reader_get_qualified_name;
struct_.struct_.get_namespace_uri = xml_reader_get_namespace_uri;
struct_.struct_.get_base_uri = xml_reader_get_base_uri;
struct_.struct_.get_xml_lang = xml_reader_get_xml_lang;
struct_.struct_.is_empty_element = xml_reader_is_empty_element;
struct_.struct_.has_value = xml_reader_has_value;
struct_.struct_.get_value = xml_reader_get_value;
struct_.struct_.has_attributes = xml_reader_has_attributes;
struct_.struct_.get_attribute_count = xml_reader_get_attribute_count;
struct_.struct_.get_attribute_byindex = xml_reader_get_attribute_byindex;
struct_.struct_.get_attribute_byqname = xml_reader_get_attribute_byqname;
struct_.struct_.get_attribute_bylname = xml_reader_get_attribute_bylname;
struct_.struct_.get_inner_xml = xml_reader_get_inner_xml;
struct_.struct_.get_outer_xml = xml_reader_get_outer_xml;
struct_.struct_.get_line_number = xml_reader_get_line_number;
struct_.struct_.move_to_attribute_byindex =
xml_reader_move_to_attribute_byindex;
struct_.struct_.move_to_attribute_byqname =
xml_reader_move_to_attribute_byqname;
struct_.struct_.move_to_attribute_bylname =
xml_reader_move_to_attribute_bylname;
struct_.struct_.move_to_first_attribute = xml_reader_move_to_first_attribute;
struct_.struct_.move_to_next_attribute = xml_reader_move_to_next_attribute;
struct_.struct_.move_to_carrying_element =
xml_reader_move_to_carrying_element;
}
#ifndef NDEBUG
template<> long CefCppToC<CefXmlReaderCppToC, CefXmlReader,
cef_xml_reader_t>::DebugObjCt = 0;
#endif