2022-01-06 19:34:35 +01:00
|
|
|
// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights
|
2012-04-03 03:34:16 +02:00
|
|
|
// 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.
|
|
|
|
//
|
2022-01-06 19:34:35 +01:00
|
|
|
// $hash=fec108946a9d826210e4fa3746839b56a123316c$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/command_line_cpptoc.h"
|
|
|
|
#include "libcef_dll/transfer_util.h"
|
|
|
|
|
|
|
|
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
CEF_EXPORT cef_command_line_t* cef_command_line_create() {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefCommandLine> _retval = CefCommandLine::CreateCommandLine();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefCommandLineCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
CEF_EXPORT cef_command_line_t* cef_command_line_get_global() {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefCommandLine> _retval = CefCommandLine::GetGlobalCommandLine();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefCommandLineCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
namespace {
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
int CEF_CALLBACK command_line_is_valid(struct _cef_command_line_t* self) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefCommandLineCppToC::Get(self)->IsValid();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CEF_CALLBACK command_line_is_read_only(struct _cef_command_line_t* self) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefCommandLineCppToC::Get(self)->IsReadOnly();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_command_line_t* CEF_CALLBACK
|
|
|
|
command_line_copy(struct _cef_command_line_t* self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefCommandLine> _retval = CefCommandLineCppToC::Get(self)->Copy();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefCommandLineCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK command_line_init_from_argv(struct _cef_command_line_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
int argc,
|
|
|
|
const char* const* argv) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: argv; type: simple_byaddr
|
|
|
|
DCHECK(argv);
|
|
|
|
if (!argv)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCommandLineCppToC::Get(self)->InitFromArgv(argc, argv);
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
command_line_init_from_string(struct _cef_command_line_t* self,
|
|
|
|
const cef_string_t* command_line) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: command_line; type: string_byref_const
|
|
|
|
DCHECK(command_line);
|
|
|
|
if (!command_line)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCommandLineCppToC::Get(self)->InitFromString(CefString(command_line));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK command_line_reset(struct _cef_command_line_t* self) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefCommandLineCppToC::Get(self)->Reset();
|
|
|
|
}
|
|
|
|
|
2012-09-04 17:12:50 +02:00
|
|
|
void CEF_CALLBACK command_line_get_argv(struct _cef_command_line_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_list_t argv) {
|
2012-09-04 17:12:50 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: argv; type: string_vec_byref
|
|
|
|
DCHECK(argv);
|
|
|
|
if (!argv)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: argv; type: string_vec_byref
|
|
|
|
std::vector<CefString> argvList;
|
|
|
|
transfer_string_list_contents(argv, argvList);
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCommandLineCppToC::Get(self)->GetArgv(argvList);
|
2012-09-04 17:12:50 +02:00
|
|
|
|
|
|
|
// Restore param: argv; type: string_vec_byref
|
|
|
|
cef_string_list_clear(argv);
|
|
|
|
transfer_string_list_contents(argvList, argv);
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_userfree_t CEF_CALLBACK
|
|
|
|
command_line_get_command_line_string(struct _cef_command_line_t* self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefString _retval = CefCommandLineCppToC::Get(self)->GetCommandLineString();
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_userfree_t CEF_CALLBACK
|
|
|
|
command_line_get_program(struct _cef_command_line_t* self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefString _retval = CefCommandLineCppToC::Get(self)->GetProgram();
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK command_line_set_program(struct _cef_command_line_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
const cef_string_t* program) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: program; type: string_byref_const
|
|
|
|
DCHECK(program);
|
|
|
|
if (!program)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCommandLineCppToC::Get(self)->SetProgram(CefString(program));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int CEF_CALLBACK command_line_has_switches(struct _cef_command_line_t* self) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefCommandLineCppToC::Get(self)->HasSwitches();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CEF_CALLBACK command_line_has_switch(struct _cef_command_line_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
const cef_string_t* name) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: name; type: string_byref_const
|
|
|
|
DCHECK(name);
|
|
|
|
if (!name)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
bool _retval = CefCommandLineCppToC::Get(self)->HasSwitch(CefString(name));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_userfree_t CEF_CALLBACK
|
|
|
|
command_line_get_switch_value(struct _cef_command_line_t* self,
|
|
|
|
const cef_string_t* name) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return NULL;
|
|
|
|
// Verify param: name; type: string_byref_const
|
|
|
|
DCHECK(name);
|
|
|
|
if (!name)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefString _retval =
|
|
|
|
CefCommandLineCppToC::Get(self)->GetSwitchValue(CefString(name));
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK command_line_get_switches(struct _cef_command_line_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_map_t switches) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: switches; type: string_map_single_byref
|
|
|
|
DCHECK(switches);
|
|
|
|
if (!switches)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: switches; type: string_map_single_byref
|
|
|
|
std::map<CefString, CefString> switchesMap;
|
|
|
|
transfer_string_map_contents(switches, switchesMap);
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCommandLineCppToC::Get(self)->GetSwitches(switchesMap);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Restore param: switches; type: string_map_single_byref
|
|
|
|
cef_string_map_clear(switches);
|
|
|
|
transfer_string_map_contents(switchesMap, switches);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK command_line_append_switch(struct _cef_command_line_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
const cef_string_t* name) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: name; type: string_byref_const
|
|
|
|
DCHECK(name);
|
|
|
|
if (!name)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCommandLineCppToC::Get(self)->AppendSwitch(CefString(name));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
command_line_append_switch_with_value(struct _cef_command_line_t* self,
|
|
|
|
const cef_string_t* name,
|
|
|
|
const cef_string_t* value) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: name; type: string_byref_const
|
|
|
|
DCHECK(name);
|
|
|
|
if (!name)
|
|
|
|
return;
|
|
|
|
// Verify param: value; type: string_byref_const
|
|
|
|
DCHECK(value);
|
|
|
|
if (!value)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCommandLineCppToC::Get(self)->AppendSwitchWithValue(CefString(name),
|
|
|
|
CefString(value));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int CEF_CALLBACK command_line_has_arguments(struct _cef_command_line_t* self) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefCommandLineCppToC::Get(self)->HasArguments();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK command_line_get_arguments(struct _cef_command_line_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_list_t arguments) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: arguments; type: string_vec_byref
|
|
|
|
DCHECK(arguments);
|
|
|
|
if (!arguments)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: arguments; type: string_vec_byref
|
|
|
|
std::vector<CefString> argumentsList;
|
|
|
|
transfer_string_list_contents(arguments, argumentsList);
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCommandLineCppToC::Get(self)->GetArguments(argumentsList);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Restore param: arguments; type: string_vec_byref
|
|
|
|
cef_string_list_clear(arguments);
|
|
|
|
transfer_string_list_contents(argumentsList, arguments);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK command_line_append_argument(struct _cef_command_line_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
const cef_string_t* argument) {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: argument; type: string_byref_const
|
|
|
|
DCHECK(argument);
|
|
|
|
if (!argument)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCommandLineCppToC::Get(self)->AppendArgument(CefString(argument));
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2012-09-27 19:07:31 +02:00
|
|
|
void CEF_CALLBACK command_line_prepend_wrapper(struct _cef_command_line_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
const cef_string_t* wrapper) {
|
2012-09-27 19:07:31 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: wrapper; type: string_byref_const
|
|
|
|
DCHECK(wrapper);
|
|
|
|
if (!wrapper)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefCommandLineCppToC::Get(self)->PrependWrapper(CefString(wrapper));
|
2012-09-27 19:07:31 +02:00
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
} // namespace
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
CefCommandLineCppToC::CefCommandLineCppToC() {
|
|
|
|
GetStruct()->is_valid = command_line_is_valid;
|
|
|
|
GetStruct()->is_read_only = command_line_is_read_only;
|
|
|
|
GetStruct()->copy = command_line_copy;
|
|
|
|
GetStruct()->init_from_argv = command_line_init_from_argv;
|
|
|
|
GetStruct()->init_from_string = command_line_init_from_string;
|
|
|
|
GetStruct()->reset = command_line_reset;
|
|
|
|
GetStruct()->get_argv = command_line_get_argv;
|
|
|
|
GetStruct()->get_command_line_string = command_line_get_command_line_string;
|
|
|
|
GetStruct()->get_program = command_line_get_program;
|
|
|
|
GetStruct()->set_program = command_line_set_program;
|
|
|
|
GetStruct()->has_switches = command_line_has_switches;
|
|
|
|
GetStruct()->has_switch = command_line_has_switch;
|
|
|
|
GetStruct()->get_switch_value = command_line_get_switch_value;
|
|
|
|
GetStruct()->get_switches = command_line_get_switches;
|
|
|
|
GetStruct()->append_switch = command_line_append_switch;
|
|
|
|
GetStruct()->append_switch_with_value = command_line_append_switch_with_value;
|
|
|
|
GetStruct()->has_arguments = command_line_has_arguments;
|
|
|
|
GetStruct()->get_arguments = command_line_get_arguments;
|
|
|
|
GetStruct()->append_argument = command_line_append_argument;
|
|
|
|
GetStruct()->prepend_wrapper = command_line_prepend_wrapper;
|
|
|
|
}
|
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefCommandLineCppToC::~CefCommandLineCppToC() {}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefRefPtr<CefCommandLine>
|
|
|
|
CefCppToCRefCounted<CefCommandLineCppToC, CefCommandLine, cef_command_line_t>::
|
|
|
|
UnwrapDerived(CefWrapperType type, cef_command_line_t* s) {
|
2015-04-26 20:40:01 +02:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCppToCRefCounted<CefCommandLineCppToC,
|
|
|
|
CefCommandLine,
|
|
|
|
cef_command_line_t>::kWrapperType =
|
|
|
|
WT_COMMAND_LINE;
|