blob: 9890719b433e0923c4d7849882d80ae9b54db213 [file] [log] [blame]
/*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#pragma once
#if ENABLE(TEST_CONDITIONAL)
#include "IDLTypes.h"
#include "JSCallbackData.h"
#include "JSDOMConvertDictionary.h"
#include "JSDOMConvertEnumeration.h"
#include "TestCallbackInterface.h"
#include <wtf/Forward.h>
namespace WebCore {
class JSTestCallbackInterface final : public TestCallbackInterface {
public:
static Ref<JSTestCallbackInterface> create(JSC::JSObject* callback, JSDOMGlobalObject* globalObject)
{
return adoptRef(*new JSTestCallbackInterface(callback, globalObject));
}
ScriptExecutionContext* scriptExecutionContext() const { return ContextDestructionObserver::scriptExecutionContext(); }
~JSTestCallbackInterface() final;
JSCallbackDataStrong* callbackData() { return m_data; }
static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
// Functions
CallbackResult<typename IDLUndefined::ImplementationType> callbackWithNoParam() override;
CallbackResult<typename IDLUndefined::ImplementationType> callbackWithArrayParam(typename IDLFloat32Array::ParameterType arrayParam) override;
CallbackResult<typename IDLUndefined::ImplementationType> callbackWithSerializedScriptValueParam(typename IDLSerializedScriptValue<SerializedScriptValue>::ParameterType srzParam, typename IDLDOMString::ParameterType strParam) override;
CallbackResult<typename IDLLong::ImplementationType> customCallback(typename IDLInterface<TestObj>::ParameterType testObjParam, typename IDLInterface<TestNode>::ParameterType testNodeParam) override;
CallbackResult<typename IDLUndefined::ImplementationType> callbackWithStringList(typename IDLInterface<DOMStringList>::ParameterType listParam) override;
CallbackResult<typename IDLUndefined::ImplementationType> callbackWithBoolean(typename IDLBoolean::ParameterType boolParam) override;
CallbackResult<typename IDLUndefined::ImplementationType> callbackRequiresThisToPass(typename IDLLong::ParameterType longParam, typename IDLInterface<TestNode>::ParameterType testNodeParam) override;
CallbackResult<typename IDLDOMString::ImplementationType> callbackWithAReturnValue() override;
CallbackResult<typename IDLDOMString::ImplementationType> callbackThatRethrowsExceptions(typename IDLEnumeration<TestCallbackInterface::Enum>::ParameterType enumParam) override;
CallbackResult<typename IDLDOMString::ImplementationType> callbackWithThisObject(typename IDLInterface<TestNode>::ParameterType thisObject, typename IDLInterface<TestObj>::ParameterType testObjParam) override;
private:
JSTestCallbackInterface(JSC::JSObject*, JSDOMGlobalObject*);
JSCallbackDataStrong* m_data;
};
JSC::JSValue toJS(TestCallbackInterface&);
inline JSC::JSValue toJS(TestCallbackInterface* impl) { return impl ? toJS(*impl) : JSC::jsNull(); }
String convertEnumerationToString(TestCallbackInterface::Enum);
template<> JSC::JSString* convertEnumerationToJS(JSC::JSGlobalObject&, TestCallbackInterface::Enum);
template<> std::optional<TestCallbackInterface::Enum> parseEnumeration<TestCallbackInterface::Enum>(JSC::JSGlobalObject&, JSC::JSValue);
template<> const char* expectedEnumerationValues<TestCallbackInterface::Enum>();
template<> TestCallbackInterface::Dictionary convertDictionary<TestCallbackInterface::Dictionary>(JSC::JSGlobalObject&, JSC::JSValue);
} // namespace WebCore
#endif // ENABLE(TEST_CONDITIONAL)