X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/inspector/scripts/tests/expected/enum-values.json-result diff --git a/inspector/scripts/tests/expected/enum-values.json-result b/inspector/scripts/tests/expected/enum-values.json-result new file mode 100644 index 0000000..9d74853 --- /dev/null +++ b/inspector/scripts/tests/expected/enum-values.json-result @@ -0,0 +1,1172 @@ +### Begin File: InspectorAlternateBackendDispatchers.h +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#ifndef InspectorAlternateBackendDispatchers_h +#define InspectorAlternateBackendDispatchers_h + +#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) + +#include "InspectorProtocolTypes.h" +#include + +namespace Inspector { + +class AlternateBackendDispatcher { +public: + void setBackendDispatcher(RefPtr&& dispatcher) { m_backendDispatcher = WTF::move(dispatcher); } + BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); } +private: + RefPtr m_backendDispatcher; +}; + + +class AlternateCommandDomainBackendDispatcher : public AlternateBackendDispatcher { +public: + virtual ~AlternateCommandDomainBackendDispatcher() { } + virtual void commandWithEnumReturnValue(long callId) = 0; +}; + +} // namespace Inspector + +#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) + +#endif // !defined(InspectorAlternateBackendDispatchers_h) +### End File: InspectorAlternateBackendDispatchers.h + +### Begin File: InspectorBackendCommands.js +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +// TypeDomain. +InspectorBackend.registerEnum("TypeDomain.TypeDomainEnum", {Shared: "shared", Red: "red", Green: "green", Blue: "blue"}); + +// CommandDomain. +InspectorBackend.registerCommand("CommandDomain.commandWithEnumReturnValue", [], ["returnValue"]); +InspectorBackend.activateDomain("CommandDomain"); + +// EventDomain. +InspectorBackend.registerEventDomainDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "EventDomain"); +InspectorBackend.registerEnum("EventDomain.EventWithEnumParameterParameter", {Shared: "shared", Black: "black", White: "white"}); +InspectorBackend.registerEvent("EventDomain.eventWithEnumParameter", ["parameter"]); +InspectorBackend.activateDomain("EventDomain"); +### End File: InspectorBackendCommands.js + +### Begin File: InspectorBackendDispatchers.h +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#ifndef InspectorBackendDispatchers_h +#define InspectorBackendDispatchers_h + +#include "InspectorProtocolObjects.h" +#include +#include + +namespace Inspector { + +typedef String ErrorString; + +#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) +class AlternateCommandDomainBackendDispatcher; +#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) + +class CommandDomainBackendDispatcherHandler { +public: + // Named after parameter 'returnValue' while generating command/event commandWithEnumReturnValue. + enum class ReturnValue { + Shared = 0, + Cyan = 6, + Magenta = 7, + Yellow = 8, + }; // enum class ReturnValue + virtual void commandWithEnumReturnValue(ErrorString&, CommandDomainBackendDispatcherHandler::ReturnValue* out_returnValue) = 0; +protected: + virtual ~CommandDomainBackendDispatcherHandler(); +}; + +class CommandDomainBackendDispatcher final : public SupplementalBackendDispatcher { +public: + static Ref create(BackendDispatcher*, CommandDomainBackendDispatcherHandler*); + virtual void dispatch(long callId, const String& method, Ref&& message) override; +private: + void commandWithEnumReturnValue(long callId, const InspectorObject& message); +private: + CommandDomainBackendDispatcher(BackendDispatcher&, CommandDomainBackendDispatcherHandler*); + CommandDomainBackendDispatcherHandler* m_agent; +#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) +public: + void setAlternateDispatcher(AlternateCommandDomainBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; } +private: + AlternateCommandDomainBackendDispatcher* m_alternateDispatcher; +#endif +}; + +} // namespace Inspector + +#endif // !defined(InspectorBackendDispatchers_h) +### End File: InspectorBackendDispatchers.h + +### Begin File: InspectorBackendDispatchers.cpp +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#include "config.h" +#include "InspectorBackendDispatchers.h" + +#include +#include +#include + +#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) +#include "InspectorAlternateBackendDispatchers.h" +#endif + +namespace Inspector { + +CommandDomainBackendDispatcherHandler::~CommandDomainBackendDispatcherHandler() { } + +Ref CommandDomainBackendDispatcher::create(BackendDispatcher* backendDispatcher, CommandDomainBackendDispatcherHandler* agent) +{ + return adoptRef(*new CommandDomainBackendDispatcher(*backendDispatcher, agent)); +} + +CommandDomainBackendDispatcher::CommandDomainBackendDispatcher(BackendDispatcher& backendDispatcher, CommandDomainBackendDispatcherHandler* agent) + : SupplementalBackendDispatcher(backendDispatcher) + , m_agent(agent) +#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) + , m_alternateDispatcher(nullptr) +#endif +{ + m_backendDispatcher->registerDispatcherForDomain(ASCIILiteral("CommandDomain"), this); +} + +void CommandDomainBackendDispatcher::dispatch(long callId, const String& method, Ref&& message) +{ + Ref protect(*this); + + if (method == "commandWithEnumReturnValue") + commandWithEnumReturnValue(callId, message); + else + m_backendDispatcher->reportProtocolError(&callId, BackendDispatcher::MethodNotFound, makeString('\'', "CommandDomain", '.', method, "' was not found")); +} + +void CommandDomainBackendDispatcher::commandWithEnumReturnValue(long callId, const InspectorObject&) +{ +#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) + if (m_alternateDispatcher) { + m_alternateDispatcher->commandWithEnumReturnValue(callId); + return; + } +#endif + + ErrorString error; + Ref result = InspectorObject::create(); + CommandDomainBackendDispatcherHandler::ReturnValue out_returnValue; + m_agent->commandWithEnumReturnValue(error, &out_returnValue); + + if (!error.length()) + result->setString(ASCIILiteral("returnValue"), Inspector::Protocol::getEnumConstantValue(out_returnValue)); + + m_backendDispatcher->sendResponse(callId, WTF::move(result), error); +} + +} // namespace Inspector + +### End File: InspectorBackendDispatchers.cpp + +### Begin File: InspectorFrontendDispatchers.h +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#ifndef InspectorFrontendDispatchers_h +#define InspectorFrontendDispatchers_h + +#include "InspectorProtocolObjects.h" +#include +#include +#include + +namespace Inspector { + + + +class EventDomainFrontendDispatcher { +public: + EventDomainFrontendDispatcher(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { } + // Named after parameter 'parameter' while generating command/event eventWithEnumParameter. + enum class Parameter { + Shared = 0, + Black = 4, + White = 5, + }; // enum class Parameter + void eventWithEnumParameter(Parameter parameter); +private: + FrontendChannel* m_frontendChannel; +}; + +} // namespace Inspector + +#endif // !defined(InspectorFrontendDispatchers_h) +### End File: InspectorFrontendDispatchers.h + +### Begin File: InspectorFrontendDispatchers.cpp +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#include "config.h" +#include "InspectorFrontendDispatchers.h" + +#include + +namespace Inspector { + +void EventDomainFrontendDispatcher::eventWithEnumParameter(Parameter parameter) +{ + Ref jsonMessage = InspectorObject::create(); + jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("EventDomain.eventWithEnumParameter")); + Ref paramsObject = InspectorObject::create(); + paramsObject->setString(ASCIILiteral("parameter"), Inspector::Protocol::getEnumConstantValue(parameter)); + jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject)); + + m_frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString()); +} + +} // namespace Inspector + +### End File: InspectorFrontendDispatchers.cpp + +### Begin File: InspectorProtocolObjects.h +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#ifndef InspectorProtocolObjects_h +#define InspectorProtocolObjects_h + +#include +#include + +namespace Inspector { + + + +namespace Protocol { + +// Forward declarations. +namespace TypeDomain { +enum class TypeDomainEnum; +} // TypeDomain +// End of forward declarations. + + + + +String getEnumConstantValue(int code); + +template String getEnumConstantValue(T enumValue) +{ + return getEnumConstantValue(static_cast(enumValue)); +} + +namespace TypeDomain { +/* */ +enum class TypeDomainEnum { + Shared = 0, + Red = 1, + Green = 2, + Blue = 3, +}; // enum class TypeDomainEnum +} // TypeDomain + + + +} // namespace Protocol + +} // namespace Inspector + +#endif // !defined(InspectorProtocolObjects_h) +### End File: InspectorProtocolObjects.h + +### Begin File: InspectorProtocolObjects.cpp +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#include "config.h" +#include "InspectorProtocolObjects.h" + +#include + +namespace Inspector { + +namespace Protocol { + +static const char* const enum_constant_values[] = { + "shared", + "red", + "green", + "blue", + "black", + "white", + "cyan", + "magenta", + "yellow", +}; + +String getEnumConstantValue(int code) { + return enum_constant_values[code]; +} + + + +} // namespace Protocol + +} // namespace Inspector + +### End File: InspectorProtocolObjects.cpp + +### Begin File: RWIProtocolBackendDispatchers.h +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#include +#include + +@protocol RWIProtocolCommandDomainDomainHandler; + +namespace Inspector { + + + + +class ObjCInspectorCommandDomainBackendDispatcher final : public AlternateCommandDomainBackendDispatcher { +public: + ObjCInspectorCommandDomainBackendDispatcher(id handler) { m_delegate = handler; } + virtual void commandWithEnumReturnValue(long callId) override; +private: + RetainPtr> m_delegate; +}; + + + +} // namespace Inspector + +### End File: RWIProtocolBackendDispatchers.h + +### Begin File: RWIProtocolConfiguration.mm +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#import "config.h" +#import "RWIProtocolConfiguration.h" + +#import "RWIProtocolInternal.h" +#import "RWIProtocolBackendDispatchers.h" +#import +#import +#import +#import + +using namespace Inspector; + +@implementation RWIProtocolConfiguration +{ + AugmentableInspectorController* _controller; + id _commandDomainHandler; + RWIProtocolEventDomainDomainEventDispatcher *_eventDomainEventDispatcher; +} + +- (instancetype)initWithController:(AugmentableInspectorController*)controller +{ + self = [super init]; + if (!self) + return nil; + ASSERT(controller); + _controller = controller; + return self; +} + +- (void)dealloc +{ + [_commandDomainHandler release]; + [_eventDomainEventDispatcher release]; + [super dealloc]; +} + +- (void)setCommandDomainHandler:(id)handler +{ + if (handler == _commandDomainHandler) + return; + + [_commandDomainHandler release]; + _commandDomainHandler = [handler retain]; + + auto alternateDispatcher = std::make_unique(handler); + auto alternateAgent = std::make_unique>(ASCIILiteral("CommandDomain"), WTF::move(alternateDispatcher)); + _controller->appendExtraAgent(WTF::move(alternateAgent)); +} + +- (id)commandDomainHandler +{ + return _commandDomainHandler; +} + +- (RWIProtocolEventDomainDomainEventDispatcher *)eventDomainEventDispatcher +{ + if (!_eventDomainEventDispatcher) + _eventDomainEventDispatcher = [[RWIProtocolEventDomainDomainEventDispatcher alloc] initWithController:_controller]; + return _eventDomainEventDispatcher; +} + +@end + + +### End File: RWIProtocolConfiguration.mm + +### Begin File: RWIProtocolConfiguration.h +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#import "RWIProtocol.h" + +__attribute__((visibility ("default"))) +@interface RWIProtocolConfiguration : NSObject +@property (nonatomic, retain, setter=setCommandDomainHandler:) id commandDomainHandler; +@property (nonatomic, readonly) RWIProtocolEventDomainDomainEventDispatcher *eventDomainEventDispatcher; +@end + + +### End File: RWIProtocolConfiguration.h + +### Begin File: RWIProtocolBackendDispatchers.mm +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#import "config.h" +#import "RWIProtocolBackendDispatchers.h" + +#include "RWIProtocolInternal.h" +#include "RWIProtocolEnumConversionHelpers.h" +#include +#include + +namespace Inspector { + + + +void ObjCInspectorCommandDomainBackendDispatcher::commandWithEnumReturnValue(long callId) +{ + id errorCallback = ^(NSString *error) { + backendDispatcher()->sendResponse(callId, InspectorObject::create(), error); + }; + + id successCallback = ^(RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue returnValue) { + Ref resultObject = InspectorObject::create(); + resultObject->setString(ASCIILiteral("returnValue"), toProtocolString(returnValue)); + backendDispatcher()->sendResponse(callId, WTF::move(resultObject), String()); + }; + + [m_delegate commandWithEnumReturnValueWithErrorCallback:errorCallback successCallback:successCallback]; +} + + + + +} // namespace Inspector + +### End File: RWIProtocolBackendDispatchers.mm + +### Begin File: RWIProtocolEnumConversionHelpers.h +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#import "RWIProtocolArrayConversionHelpers.h" + +namespace Inspector { + +template +ObjCEnumType fromProtocolString(const String& value); + + +inline String toProtocolString(RWIProtocolTypeDomainEnum value) +{ + switch(value) { + case RWIProtocolTypeDomainEnumShared: + return ASCIILiteral("shared"); + case RWIProtocolTypeDomainEnumRed: + return ASCIILiteral("red"); + case RWIProtocolTypeDomainEnumGreen: + return ASCIILiteral("green"); + case RWIProtocolTypeDomainEnumBlue: + return ASCIILiteral("blue"); + } +} + +template<> +inline RWIProtocolTypeDomainEnum fromProtocolString(const String& value) +{ + if (value == "shared") + return RWIProtocolTypeDomainEnumShared; + if (value == "red") + return RWIProtocolTypeDomainEnumRed; + if (value == "green") + return RWIProtocolTypeDomainEnumGreen; + if (value == "blue") + return RWIProtocolTypeDomainEnumBlue; + ASSERT_NOT_REACHED(); + return RWIProtocolTypeDomainEnumShared; +} + + +inline String toProtocolString(RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue value) +{ + switch(value) { + case RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared: + return ASCIILiteral("shared"); + case RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueCyan: + return ASCIILiteral("cyan"); + case RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueMagenta: + return ASCIILiteral("magenta"); + case RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueYellow: + return ASCIILiteral("yellow"); + } +} + +template<> +inline RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue fromProtocolString(const String& value) +{ + if (value == "shared") + return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared; + if (value == "cyan") + return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueCyan; + if (value == "magenta") + return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueMagenta; + if (value == "yellow") + return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueYellow; + ASSERT_NOT_REACHED(); + return RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared; +} + + +inline String toProtocolString(RWIProtocolEventDomainEventWithEnumParameterParameter value) +{ + switch(value) { + case RWIProtocolEventDomainEventWithEnumParameterParameterShared: + return ASCIILiteral("shared"); + case RWIProtocolEventDomainEventWithEnumParameterParameterBlack: + return ASCIILiteral("black"); + case RWIProtocolEventDomainEventWithEnumParameterParameterWhite: + return ASCIILiteral("white"); + } +} + +template<> +inline RWIProtocolEventDomainEventWithEnumParameterParameter fromProtocolString(const String& value) +{ + if (value == "shared") + return RWIProtocolEventDomainEventWithEnumParameterParameterShared; + if (value == "black") + return RWIProtocolEventDomainEventWithEnumParameterParameterBlack; + if (value == "white") + return RWIProtocolEventDomainEventWithEnumParameterParameterWhite; + ASSERT_NOT_REACHED(); + return RWIProtocolEventDomainEventWithEnumParameterParameterShared; +} + +} // namespace Inspector + +### End File: RWIProtocolEnumConversionHelpers.h + +### Begin File: RWIProtocolEventDispatchers.mm +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#import "config.h" +#import "RWIProtocolInternal.h" + +#import "RWIProtocolEnumConversionHelpers.h" +#import +#import + +using namespace Inspector; + + + + + +@implementation RWIProtocolEventDomainDomainEventDispatcher +{ + AugmentableInspectorController* _controller; +} + +- (instancetype)initWithController:(AugmentableInspectorController*)controller; +{ + self = [super init]; + if (!self) + return nil; + ASSERT(controller); + _controller = controller; + return self; +} + +- (void)eventWithEnumParameterWithParameter:(RWIProtocolEventDomainEventWithEnumParameterParameter)parameter +{ + FrontendChannel* frontendChannel = _controller->frontendChannel(); + if (!frontendChannel) + return; + + Ref jsonMessage = InspectorObject::create(); + jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("EventDomain.eventWithEnumParameter")); + Ref paramsObject = InspectorObject::create(); + paramsObject->setString(ASCIILiteral("parameter"), toProtocolString(parameter)); + jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject)); + frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString()); +} + +@end + + +### End File: RWIProtocolEventDispatchers.mm + +### Begin File: RWIProtocol.h +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#import + +#import + + + + + +typedef NS_ENUM(NSInteger, RWIProtocolTypeDomainEnum) { + RWIProtocolTypeDomainEnumShared, + RWIProtocolTypeDomainEnumRed, + RWIProtocolTypeDomainEnumGreen, + RWIProtocolTypeDomainEnumBlue, +}; + +typedef NS_ENUM(NSInteger, RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue) { + RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueShared, + RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueCyan, + RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueMagenta, + RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValueYellow, +}; + +typedef NS_ENUM(NSInteger, RWIProtocolEventDomainEventWithEnumParameterParameter) { + RWIProtocolEventDomainEventWithEnumParameterParameterShared, + RWIProtocolEventDomainEventWithEnumParameterParameterBlack, + RWIProtocolEventDomainEventWithEnumParameterParameterWhite, +}; + + + +@protocol RWIProtocolCommandDomainDomainHandler +@required +- (void)commandWithEnumReturnValueWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)(RWIProtocolCommandDomainCommandWithEnumReturnValueReturnValue returnValue))successCallback; +@end + +__attribute__((visibility ("default"))) +@interface RWIProtocolEventDomainDomainEventDispatcher : NSObject +- (void)eventWithEnumParameterWithParameter:(RWIProtocolEventDomainEventWithEnumParameterParameter)parameter; +@end + + +### End File: RWIProtocol.h + +### Begin File: RWIProtocolTypes.mm +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#import "config.h" +#import "RWIProtocolInternal.h" + +#import "RWIProtocolEnumConversionHelpers.h" +#import +#import + +using namespace Inspector; + + + + + + + + +### End File: RWIProtocolTypes.mm + +### Begin File: RWIProtocolInternal.h +/* + * Copyright (C) 2013 Google Inc. All rights reserved. + * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014 University of Washington. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +// DO NOT EDIT THIS FILE. It is automatically generated from enum-values.json +// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py + +#import "RWIProtocol.h" +#import "RWIProtocolJSONObjectInternal.h" +#import +#import + +@interface RWIProtocolEventDomainDomainEventDispatcher (Private) +- (instancetype)initWithController:(Inspector::AugmentableInspectorController*)controller; +@end + + +### End File: RWIProtocolInternal.h