]> git.saurik.com Git - apple/javascriptcore.git/blame - inspector/scripts/tests/expected/events-with-optional-parameters.json-result
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / inspector / scripts / tests / expected / events-with-optional-parameters.json-result
CommitLineData
ed1e77d3
A
1### Begin File: InspectorAlternateBackendDispatchers.h
2/*
3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
5 * Copyright (C) 2014 University of Washington. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26 * THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
30// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
31
32#ifndef InspectorAlternateBackendDispatchers_h
33#define InspectorAlternateBackendDispatchers_h
34
35#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
36
37#include "InspectorProtocolTypes.h"
38#include <JavaScriptCore/InspectorBackendDispatcher.h>
39
40namespace Inspector {
41
42class AlternateBackendDispatcher {
43public:
44 void setBackendDispatcher(RefPtr<BackendDispatcher>&& dispatcher) { m_backendDispatcher = WTF::move(dispatcher); }
45 BackendDispatcher* backendDispatcher() const { return m_backendDispatcher.get(); }
46private:
47 RefPtr<BackendDispatcher> m_backendDispatcher;
48};
49
50
51
52
53} // namespace Inspector
54
55#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
56
57#endif // !defined(InspectorAlternateBackendDispatchers_h)
58### End File: InspectorAlternateBackendDispatchers.h
59
60### Begin File: InspectorBackendCommands.js
61/*
62 * Copyright (C) 2013 Google Inc. All rights reserved.
63 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
64 * Copyright (C) 2014 University of Washington. All rights reserved.
65 *
66 * Redistribution and use in source and binary forms, with or without
67 * modification, are permitted provided that the following conditions
68 * are met:
69 * 1. Redistributions of source code must retain the above copyright
70 * notice, this list of conditions and the following disclaimer.
71 * 2. Redistributions in binary form must reproduce the above copyright
72 * notice, this list of conditions and the following disclaimer in the
73 * documentation and/or other materials provided with the distribution.
74 *
75 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
76 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
77 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
78 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
79 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
80 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
81 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
82 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
83 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
84 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
85 * THE POSSIBILITY OF SUCH DAMAGE.
86 */
87
88// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
89// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
90
91// Database.
92InspectorBackend.registerDatabaseDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Database");
93InspectorBackend.registerEvent("Database.didExecuteOptionalParameters", ["columnNames", "notes", "timestamp", "values", "payload", "sqlError", "screenColor", "alternateColors", "printColor"]);
94InspectorBackend.registerEvent("Database.didExecuteNoOptionalParameters", ["columnNames", "notes", "timestamp", "values", "payload", "sqlError", "screenColor", "alternateColors", "printColor"]);
95InspectorBackend.activateDomain("Database");
96### End File: InspectorBackendCommands.js
97
98### Begin File: InspectorBackendDispatchers.h
99/*
100 * Copyright (C) 2013 Google Inc. All rights reserved.
101 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
102 * Copyright (C) 2014 University of Washington. All rights reserved.
103 *
104 * Redistribution and use in source and binary forms, with or without
105 * modification, are permitted provided that the following conditions
106 * are met:
107 * 1. Redistributions of source code must retain the above copyright
108 * notice, this list of conditions and the following disclaimer.
109 * 2. Redistributions in binary form must reproduce the above copyright
110 * notice, this list of conditions and the following disclaimer in the
111 * documentation and/or other materials provided with the distribution.
112 *
113 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
114 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
115 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
116 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
117 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
118 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
119 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
120 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
121 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
122 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
123 * THE POSSIBILITY OF SUCH DAMAGE.
124 */
125
126// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
127// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
128
129#ifndef InspectorBackendDispatchers_h
130#define InspectorBackendDispatchers_h
131
132#include "InspectorProtocolObjects.h"
133#include <inspector/InspectorBackendDispatcher.h>
134#include <wtf/text/WTFString.h>
135
136namespace Inspector {
137
138typedef String ErrorString;
139
140
141
142} // namespace Inspector
143
144#endif // !defined(InspectorBackendDispatchers_h)
145### End File: InspectorBackendDispatchers.h
146
147### Begin File: InspectorBackendDispatchers.cpp
148/*
149 * Copyright (C) 2013 Google Inc. All rights reserved.
150 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
151 * Copyright (C) 2014 University of Washington. All rights reserved.
152 *
153 * Redistribution and use in source and binary forms, with or without
154 * modification, are permitted provided that the following conditions
155 * are met:
156 * 1. Redistributions of source code must retain the above copyright
157 * notice, this list of conditions and the following disclaimer.
158 * 2. Redistributions in binary form must reproduce the above copyright
159 * notice, this list of conditions and the following disclaimer in the
160 * documentation and/or other materials provided with the distribution.
161 *
162 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
163 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
164 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
165 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
166 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
167 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
168 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
169 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
170 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
171 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
172 * THE POSSIBILITY OF SUCH DAMAGE.
173 */
174
175// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
176// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
177
178#include "config.h"
179#include "InspectorBackendDispatchers.h"
180
181#include <inspector/InspectorFrontendChannel.h>
182#include <inspector/InspectorValues.h>
183#include <wtf/text/CString.h>
184
185#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
186#include "InspectorAlternateBackendDispatchers.h"
187#endif
188
189namespace Inspector {
190
191
192
193} // namespace Inspector
194
195### End File: InspectorBackendDispatchers.cpp
196
197### Begin File: InspectorFrontendDispatchers.h
198/*
199 * Copyright (C) 2013 Google Inc. All rights reserved.
200 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
201 * Copyright (C) 2014 University of Washington. All rights reserved.
202 *
203 * Redistribution and use in source and binary forms, with or without
204 * modification, are permitted provided that the following conditions
205 * are met:
206 * 1. Redistributions of source code must retain the above copyright
207 * notice, this list of conditions and the following disclaimer.
208 * 2. Redistributions in binary form must reproduce the above copyright
209 * notice, this list of conditions and the following disclaimer in the
210 * documentation and/or other materials provided with the distribution.
211 *
212 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
213 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
214 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
215 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
216 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
217 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
218 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
219 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
220 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
221 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
222 * THE POSSIBILITY OF SUCH DAMAGE.
223 */
224
225// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
226// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
227
228#ifndef InspectorFrontendDispatchers_h
229#define InspectorFrontendDispatchers_h
230
231#include "InspectorProtocolObjects.h"
232#include <inspector/InspectorFrontendChannel.h>
233#include <inspector/InspectorValues.h>
234#include <wtf/text/WTFString.h>
235
236namespace Inspector {
237
238
239
240class DatabaseFrontendDispatcher {
241public:
242 DatabaseFrontendDispatcher(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
243 void didExecuteOptionalParameters(RefPtr<Inspector::Protocol::Array<String>> columnNames, const String* const notes, const double* const timestamp, RefPtr<Inspector::InspectorObject> values, RefPtr<Inspector::InspectorValue> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const Inspector::Protocol::Database::PrimaryColors* const screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String* const printColor);
244 void didExecuteNoOptionalParameters(RefPtr<Inspector::Protocol::Array<String>> columnNames, const String& notes, double timestamp, RefPtr<Inspector::InspectorObject> values, RefPtr<Inspector::InspectorValue> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const Inspector::Protocol::Database::PrimaryColors& screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String& printColor);
245private:
246 FrontendChannel* m_frontendChannel;
247};
248
249} // namespace Inspector
250
251#endif // !defined(InspectorFrontendDispatchers_h)
252### End File: InspectorFrontendDispatchers.h
253
254### Begin File: InspectorFrontendDispatchers.cpp
255/*
256 * Copyright (C) 2013 Google Inc. All rights reserved.
257 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
258 * Copyright (C) 2014 University of Washington. All rights reserved.
259 *
260 * Redistribution and use in source and binary forms, with or without
261 * modification, are permitted provided that the following conditions
262 * are met:
263 * 1. Redistributions of source code must retain the above copyright
264 * notice, this list of conditions and the following disclaimer.
265 * 2. Redistributions in binary form must reproduce the above copyright
266 * notice, this list of conditions and the following disclaimer in the
267 * documentation and/or other materials provided with the distribution.
268 *
269 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
270 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
271 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
272 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
273 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
274 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
275 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
276 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
277 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
278 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
279 * THE POSSIBILITY OF SUCH DAMAGE.
280 */
281
282// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
283// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
284
285#include "config.h"
286#include "InspectorFrontendDispatchers.h"
287
288#include <wtf/text/CString.h>
289
290namespace Inspector {
291
292void DatabaseFrontendDispatcher::didExecuteOptionalParameters(RefPtr<Inspector::Protocol::Array<String>> columnNames, const String* const notes, const double* const timestamp, RefPtr<Inspector::InspectorObject> values, RefPtr<Inspector::InspectorValue> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const Inspector::Protocol::Database::PrimaryColors* const screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String* const printColor)
293{
294 Ref<InspectorObject> jsonMessage = InspectorObject::create();
295 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteOptionalParameters"));
296 Ref<InspectorObject> paramsObject = InspectorObject::create();
297 if (columnNames)
298 paramsObject->setArray(ASCIILiteral("columnNames"), columnNames);
299 if (notes)
300 paramsObject->setString(ASCIILiteral("notes"), *notes);
301 if (timestamp)
302 paramsObject->setDouble(ASCIILiteral("timestamp"), *timestamp);
303 if (values)
304 paramsObject->setObject(ASCIILiteral("values"), values);
305 if (payload)
306 paramsObject->setValue(ASCIILiteral("payload"), *payload);
307 if (sqlError)
308 paramsObject->setObject(ASCIILiteral("sqlError"), sqlError);
309 if (screenColor)
310 paramsObject->setString(ASCIILiteral("screenColor"), *screenColor);
311 if (alternateColors)
312 paramsObject->setArray(ASCIILiteral("alternateColors"), alternateColors);
313 if (printColor)
314 paramsObject->setString(ASCIILiteral("printColor"), *printColor);
315 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject));
316
317 m_frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
318}
319
320void DatabaseFrontendDispatcher::didExecuteNoOptionalParameters(RefPtr<Inspector::Protocol::Array<String>> columnNames, const String& notes, double timestamp, RefPtr<Inspector::InspectorObject> values, RefPtr<Inspector::InspectorValue> payload, RefPtr<Inspector::Protocol::Database::Error> sqlError, const Inspector::Protocol::Database::PrimaryColors& screenColor, RefPtr<Inspector::Protocol::Database::ColorList> alternateColors, const String& printColor)
321{
322 Ref<InspectorObject> jsonMessage = InspectorObject::create();
323 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteNoOptionalParameters"));
324 Ref<InspectorObject> paramsObject = InspectorObject::create();
325 paramsObject->setArray(ASCIILiteral("columnNames"), columnNames);
326 paramsObject->setString(ASCIILiteral("notes"), notes);
327 paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp);
328 paramsObject->setObject(ASCIILiteral("values"), values);
329 paramsObject->setValue(ASCIILiteral("payload"), payload);
330 paramsObject->setObject(ASCIILiteral("sqlError"), sqlError);
331 paramsObject->setString(ASCIILiteral("screenColor"), screenColor);
332 paramsObject->setArray(ASCIILiteral("alternateColors"), alternateColors);
333 paramsObject->setString(ASCIILiteral("printColor"), printColor);
334 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject));
335
336 m_frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
337}
338
339} // namespace Inspector
340
341### End File: InspectorFrontendDispatchers.cpp
342
343### Begin File: InspectorProtocolObjects.h
344/*
345 * Copyright (C) 2013 Google Inc. All rights reserved.
346 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
347 * Copyright (C) 2014 University of Washington. All rights reserved.
348 *
349 * Redistribution and use in source and binary forms, with or without
350 * modification, are permitted provided that the following conditions
351 * are met:
352 * 1. Redistributions of source code must retain the above copyright
353 * notice, this list of conditions and the following disclaimer.
354 * 2. Redistributions in binary form must reproduce the above copyright
355 * notice, this list of conditions and the following disclaimer in the
356 * documentation and/or other materials provided with the distribution.
357 *
358 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
359 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
360 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
361 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
362 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
363 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
364 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
365 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
366 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
367 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
368 * THE POSSIBILITY OF SUCH DAMAGE.
369 */
370
371// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
372// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
373
374#ifndef InspectorProtocolObjects_h
375#define InspectorProtocolObjects_h
376
377#include <inspector/InspectorProtocolTypes.h>
378#include <wtf/Assertions.h>
379
380namespace Inspector {
381
382
383
384namespace Protocol {
385
386// Forward declarations.
387namespace Database {
388class Error;
389} // Database
390// End of forward declarations.
391
392
393// Typedefs.
394namespace Database {
395/* Unique identifier of Database object. */
396typedef String DatabaseId;
397typedef String PrimaryColors;
398typedef Inspector::Protocol::Array<Inspector::Protocol::Database::PrimaryColors> ColorList;
399} // Database
400// End of typedefs.
401
402String getEnumConstantValue(int code);
403
404template<typename T> String getEnumConstantValue(T enumValue)
405{
406 return getEnumConstantValue(static_cast<int>(enumValue));
407}
408
409namespace Database {
410/* Database error. */
411class Error : public Inspector::InspectorObjectBase {
412public:
413 enum {
414 NoFieldsSet = 0,
415 MessageSet = 1 << 0,
416 CodeSet = 1 << 1,
417 AllFieldsSet = (MessageSet | CodeSet)
418 };
419
420 template<int STATE>
421 class Builder {
422 private:
423 RefPtr<InspectorObject> m_result;
424
425 template<int STEP> Builder<STATE | STEP>& castState()
426 {
427 return *reinterpret_cast<Builder<STATE | STEP>*>(this);
428 }
429
430 Builder(Ref</*Error*/InspectorObject>&& object)
431 : m_result(WTF::move(object))
432 {
433 COMPILE_ASSERT(STATE == NoFieldsSet, builder_created_in_non_init_state);
434 }
435 friend class Error;
436 public:
437
438 Builder<STATE | MessageSet>& setMessage(const String& value)
439 {
440 COMPILE_ASSERT(!(STATE & MessageSet), property_message_already_set);
441 m_result->setString(ASCIILiteral("message"), value);
442 return castState<MessageSet>();
443 }
444
445 Builder<STATE | CodeSet>& setCode(int value)
446 {
447 COMPILE_ASSERT(!(STATE & CodeSet), property_code_already_set);
448 m_result->setInteger(ASCIILiteral("code"), value);
449 return castState<CodeSet>();
450 }
451
452 Ref<Error> release()
453 {
454 COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
455 COMPILE_ASSERT(sizeof(Error) == sizeof(InspectorObject), cannot_cast);
456
457 Ref<InspectorObject> result = m_result.releaseNonNull();
458 return WTF::move(*reinterpret_cast<Ref<Error>*>(&result));
459 }
460 };
461
462 /*
463 * Synthetic constructor:
464 * Ref<Error> result = Error::create()
465 * .setMessage(...)
466 * .setCode(...)
467 * .release();
468 */
469 static Builder<NoFieldsSet> create()
470 {
471 return Builder<NoFieldsSet>(InspectorObject::create());
472 }
473};
474
475} // Database
476
477
478
479} // namespace Protocol
480
481} // namespace Inspector
482
483#endif // !defined(InspectorProtocolObjects_h)
484### End File: InspectorProtocolObjects.h
485
486### Begin File: InspectorProtocolObjects.cpp
487/*
488 * Copyright (C) 2013 Google Inc. All rights reserved.
489 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
490 * Copyright (C) 2014 University of Washington. All rights reserved.
491 *
492 * Redistribution and use in source and binary forms, with or without
493 * modification, are permitted provided that the following conditions
494 * are met:
495 * 1. Redistributions of source code must retain the above copyright
496 * notice, this list of conditions and the following disclaimer.
497 * 2. Redistributions in binary form must reproduce the above copyright
498 * notice, this list of conditions and the following disclaimer in the
499 * documentation and/or other materials provided with the distribution.
500 *
501 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
502 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
503 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
504 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
505 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
506 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
507 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
508 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
509 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
510 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
511 * THE POSSIBILITY OF SUCH DAMAGE.
512 */
513
514// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
515// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
516
517#include "config.h"
518#include "InspectorProtocolObjects.h"
519
520#include <wtf/text/CString.h>
521
522namespace Inspector {
523
524namespace Protocol {
525
526static const char* const enum_constant_values[] = {
527};
528
529String getEnumConstantValue(int code) {
530 return enum_constant_values[code];
531}
532
533
534
535} // namespace Protocol
536
537} // namespace Inspector
538
539### End File: InspectorProtocolObjects.cpp
540
541### Begin File: RWIProtocolBackendDispatchers.h
542/*
543 * Copyright (C) 2013 Google Inc. All rights reserved.
544 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
545 * Copyright (C) 2014 University of Washington. All rights reserved.
546 *
547 * Redistribution and use in source and binary forms, with or without
548 * modification, are permitted provided that the following conditions
549 * are met:
550 * 1. Redistributions of source code must retain the above copyright
551 * notice, this list of conditions and the following disclaimer.
552 * 2. Redistributions in binary form must reproduce the above copyright
553 * notice, this list of conditions and the following disclaimer in the
554 * documentation and/or other materials provided with the distribution.
555 *
556 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
557 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
558 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
559 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
560 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
561 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
562 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
563 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
564 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
565 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
566 * THE POSSIBILITY OF SUCH DAMAGE.
567 */
568
569// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
570// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
571
572#include <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
573#include <wtf/RetainPtr.h>
574
575
576
577namespace Inspector {
578
579
580
581
582} // namespace Inspector
583
584### End File: RWIProtocolBackendDispatchers.h
585
586### Begin File: RWIProtocolConfiguration.mm
587/*
588 * Copyright (C) 2013 Google Inc. All rights reserved.
589 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
590 * Copyright (C) 2014 University of Washington. All rights reserved.
591 *
592 * Redistribution and use in source and binary forms, with or without
593 * modification, are permitted provided that the following conditions
594 * are met:
595 * 1. Redistributions of source code must retain the above copyright
596 * notice, this list of conditions and the following disclaimer.
597 * 2. Redistributions in binary form must reproduce the above copyright
598 * notice, this list of conditions and the following disclaimer in the
599 * documentation and/or other materials provided with the distribution.
600 *
601 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
602 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
603 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
604 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
605 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
606 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
607 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
608 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
609 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
610 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
611 * THE POSSIBILITY OF SUCH DAMAGE.
612 */
613
614// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
615// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
616
617#import "config.h"
618#import "RWIProtocolConfiguration.h"
619
620#import "RWIProtocolInternal.h"
621#import "RWIProtocolBackendDispatchers.h"
622#import <JavaScriptCore/AlternateDispatchableAgent.h>
623#import <JavaScriptCore/AugmentableInspectorController.h>
624#import <JavaScriptCore/InspectorAlternateBackendDispatchers.h>
625#import <JavaScriptCore/InspectorBackendDispatchers.h>
626
627using namespace Inspector;
628
629@implementation RWIProtocolConfiguration
630{
631 AugmentableInspectorController* _controller;
632 RWIProtocolDatabaseDomainEventDispatcher *_databaseEventDispatcher;
633}
634
635- (instancetype)initWithController:(AugmentableInspectorController*)controller
636{
637 self = [super init];
638 if (!self)
639 return nil;
640 ASSERT(controller);
641 _controller = controller;
642 return self;
643}
644
645- (void)dealloc
646{
647 [_databaseEventDispatcher release];
648 [super dealloc];
649}
650
651- (RWIProtocolDatabaseDomainEventDispatcher *)databaseEventDispatcher
652{
653 if (!_databaseEventDispatcher)
654 _databaseEventDispatcher = [[RWIProtocolDatabaseDomainEventDispatcher alloc] initWithController:_controller];
655 return _databaseEventDispatcher;
656}
657
658@end
659
660
661### End File: RWIProtocolConfiguration.mm
662
663### Begin File: RWIProtocolConfiguration.h
664/*
665 * Copyright (C) 2013 Google Inc. All rights reserved.
666 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
667 * Copyright (C) 2014 University of Washington. All rights reserved.
668 *
669 * Redistribution and use in source and binary forms, with or without
670 * modification, are permitted provided that the following conditions
671 * are met:
672 * 1. Redistributions of source code must retain the above copyright
673 * notice, this list of conditions and the following disclaimer.
674 * 2. Redistributions in binary form must reproduce the above copyright
675 * notice, this list of conditions and the following disclaimer in the
676 * documentation and/or other materials provided with the distribution.
677 *
678 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
679 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
680 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
681 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
682 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
683 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
684 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
685 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
686 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
687 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
688 * THE POSSIBILITY OF SUCH DAMAGE.
689 */
690
691// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
692// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
693
694#import "RWIProtocol.h"
695
696__attribute__((visibility ("default")))
697@interface RWIProtocolConfiguration : NSObject
698@property (nonatomic, readonly) RWIProtocolDatabaseDomainEventDispatcher *databaseEventDispatcher;
699@end
700
701
702### End File: RWIProtocolConfiguration.h
703
704### Begin File: RWIProtocolBackendDispatchers.mm
705/*
706 * Copyright (C) 2013 Google Inc. All rights reserved.
707 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
708 * Copyright (C) 2014 University of Washington. All rights reserved.
709 *
710 * Redistribution and use in source and binary forms, with or without
711 * modification, are permitted provided that the following conditions
712 * are met:
713 * 1. Redistributions of source code must retain the above copyright
714 * notice, this list of conditions and the following disclaimer.
715 * 2. Redistributions in binary form must reproduce the above copyright
716 * notice, this list of conditions and the following disclaimer in the
717 * documentation and/or other materials provided with the distribution.
718 *
719 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
720 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
721 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
722 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
723 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
724 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
725 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
726 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
727 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
728 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
729 * THE POSSIBILITY OF SUCH DAMAGE.
730 */
731
732// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
733// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
734
735#import "config.h"
736#import "RWIProtocolBackendDispatchers.h"
737
738#include "RWIProtocolInternal.h"
739#include "RWIProtocolEnumConversionHelpers.h"
740#include <JavaScriptCore/InspectorFrontendChannel.h>
741#include <JavaScriptCore/InspectorValues.h>
742
743namespace Inspector {
744
745
746
747} // namespace Inspector
748
749### End File: RWIProtocolBackendDispatchers.mm
750
751### Begin File: RWIProtocolEnumConversionHelpers.h
752/*
753 * Copyright (C) 2013 Google Inc. All rights reserved.
754 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
755 * Copyright (C) 2014 University of Washington. All rights reserved.
756 *
757 * Redistribution and use in source and binary forms, with or without
758 * modification, are permitted provided that the following conditions
759 * are met:
760 * 1. Redistributions of source code must retain the above copyright
761 * notice, this list of conditions and the following disclaimer.
762 * 2. Redistributions in binary form must reproduce the above copyright
763 * notice, this list of conditions and the following disclaimer in the
764 * documentation and/or other materials provided with the distribution.
765 *
766 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
767 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
768 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
769 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
770 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
771 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
772 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
773 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
774 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
775 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
776 * THE POSSIBILITY OF SUCH DAMAGE.
777 */
778
779// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
780// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
781
782#import "RWIProtocolArrayConversionHelpers.h"
783
784namespace Inspector {
785
786template<typename ObjCEnumType>
787ObjCEnumType fromProtocolString(const String& value);
788
789
790
791} // namespace Inspector
792
793### End File: RWIProtocolEnumConversionHelpers.h
794
795### Begin File: RWIProtocolEventDispatchers.mm
796/*
797 * Copyright (C) 2013 Google Inc. All rights reserved.
798 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
799 * Copyright (C) 2014 University of Washington. All rights reserved.
800 *
801 * Redistribution and use in source and binary forms, with or without
802 * modification, are permitted provided that the following conditions
803 * are met:
804 * 1. Redistributions of source code must retain the above copyright
805 * notice, this list of conditions and the following disclaimer.
806 * 2. Redistributions in binary form must reproduce the above copyright
807 * notice, this list of conditions and the following disclaimer in the
808 * documentation and/or other materials provided with the distribution.
809 *
810 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
811 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
812 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
813 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
814 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
815 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
816 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
817 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
818 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
819 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
820 * THE POSSIBILITY OF SUCH DAMAGE.
821 */
822
823// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
824// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
825
826#import "config.h"
827#import "RWIProtocolInternal.h"
828
829#import "RWIProtocolEnumConversionHelpers.h"
830#import <JavaScriptCore/InspectorFrontendChannel.h>
831#import <JavaScriptCore/InspectorValues.h>
832
833using namespace Inspector;
834
835@implementation RWIProtocolDatabaseDomainEventDispatcher
836{
837 AugmentableInspectorController* _controller;
838}
839
840- (instancetype)initWithController:(AugmentableInspectorController*)controller;
841{
842 self = [super init];
843 if (!self)
844 return nil;
845 ASSERT(controller);
846 _controller = controller;
847 return self;
848}
849
850- (void)didExecuteOptionalParametersWithColumnNames:(NSArray/*<NSString>*/ **)columnNames notes:(NSString **)notes timestamp:(double *)timestamp values:(RWIProtocolJSONObject **)values payload:(RWIProtocolJSONObject **)payload sqlError:(RWIProtocolDatabaseError **)sqlError screenColor:(NSString **)screenColor alternateColors:(NSArray/*<NSString>*/ **)alternateColors printColor:(NSString **)printColor
851{
852 FrontendChannel* frontendChannel = _controller->frontendChannel();
853 if (!frontendChannel)
854 return;
855
856 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(columnNames, @"columnNames");
857 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(notes, @"notes");
858 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(values, @"values");
859 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(payload, @"payload");
860 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(sqlError, @"sqlError");
861 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(screenColor, @"screenColor");
862 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(alternateColors, @"alternateColors");
863 THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(printColor, @"printColor");
864
865 Ref<InspectorObject> jsonMessage = InspectorObject::create();
866 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteOptionalParameters"));
867 Ref<InspectorObject> paramsObject = InspectorObject::create();
868 if (columnNames)
869 paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray((*columnNames)));
870 if (notes)
871 paramsObject->setString(ASCIILiteral("notes"), (*notes));
872 if (timestamp)
873 paramsObject->setDouble(ASCIILiteral("timestamp"), (*timestamp));
874 if (values)
875 paramsObject->setObject(ASCIILiteral("values"), [(*values) toInspectorObject]);
876 if (payload)
877 paramsObject->setValue(ASCIILiteral("payload"), [(*payload) toInspectorObject]);
878 if (sqlError)
879 paramsObject->setObject(ASCIILiteral("sqlError"), [(*sqlError) toInspectorObject]);
880 if (screenColor)
881 paramsObject->setString(ASCIILiteral("screenColor"), (*screenColor));
882 if (alternateColors)
883 paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray((*alternateColors)));
884 if (printColor)
885 paramsObject->setString(ASCIILiteral("printColor"), (*printColor));
886 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject));
887 frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
888}
889
890- (void)didExecuteNoOptionalParametersWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload sqlError:(RWIProtocolDatabaseError *)sqlError screenColor:(NSString *)screenColor alternateColors:(NSArray/*<NSString>*/ *)alternateColors printColor:(NSString *)printColor
891{
892 FrontendChannel* frontendChannel = _controller->frontendChannel();
893 if (!frontendChannel)
894 return;
895
896 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(columnNames, @"columnNames");
897 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(notes, @"notes");
898 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(values, @"values");
899 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(payload, @"payload");
900 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(sqlError, @"sqlError");
901 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(screenColor, @"screenColor");
902 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(alternateColors, @"alternateColors");
903 THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(printColor, @"printColor");
904
905 Ref<InspectorObject> jsonMessage = InspectorObject::create();
906 jsonMessage->setString(ASCIILiteral("method"), ASCIILiteral("Database.didExecuteNoOptionalParameters"));
907 Ref<InspectorObject> paramsObject = InspectorObject::create();
908 paramsObject->setArray(ASCIILiteral("columnNames"), inspectorStringArray(columnNames));
909 paramsObject->setString(ASCIILiteral("notes"), notes);
910 paramsObject->setDouble(ASCIILiteral("timestamp"), timestamp);
911 paramsObject->setObject(ASCIILiteral("values"), [values toInspectorObject]);
912 paramsObject->setValue(ASCIILiteral("payload"), [payload toInspectorObject]);
913 paramsObject->setObject(ASCIILiteral("sqlError"), [sqlError toInspectorObject]);
914 paramsObject->setString(ASCIILiteral("screenColor"), screenColor);
915 paramsObject->setArray(ASCIILiteral("alternateColors"), inspectorStringArray(alternateColors));
916 paramsObject->setString(ASCIILiteral("printColor"), printColor);
917 jsonMessage->setObject(ASCIILiteral("params"), WTF::move(paramsObject));
918 frontendChannel->sendMessageToFrontend(jsonMessage->toJSONString());
919}
920
921@end
922
923
924### End File: RWIProtocolEventDispatchers.mm
925
926### Begin File: RWIProtocol.h
927/*
928 * Copyright (C) 2013 Google Inc. All rights reserved.
929 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
930 * Copyright (C) 2014 University of Washington. All rights reserved.
931 *
932 * Redistribution and use in source and binary forms, with or without
933 * modification, are permitted provided that the following conditions
934 * are met:
935 * 1. Redistributions of source code must retain the above copyright
936 * notice, this list of conditions and the following disclaimer.
937 * 2. Redistributions in binary form must reproduce the above copyright
938 * notice, this list of conditions and the following disclaimer in the
939 * documentation and/or other materials provided with the distribution.
940 *
941 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
942 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
943 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
944 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
945 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
946 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
947 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
948 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
949 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
950 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
951 * THE POSSIBILITY OF SUCH DAMAGE.
952 */
953
954// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
955// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
956
957#import <Foundation/Foundation.h>
958
959#import <WebInspector/RWIProtocolJSONObject.h>
960
961
962@class RWIProtocolDatabaseError;
963
964
965
966
967__attribute__((visibility ("default")))
968@interface RWIProtocolDatabaseError : RWIProtocolJSONObject
969- (instancetype)initWithMessage:(NSString *)message code:(int)code;
970/* required */ @property (nonatomic, copy) NSString *message;
971/* required */ @property (nonatomic, assign) int code;
972@end
973
974
975
976__attribute__((visibility ("default")))
977@interface RWIProtocolDatabaseDomainEventDispatcher : NSObject
978- (void)didExecuteOptionalParametersWithColumnNames:(NSArray/*<NSString>*/ **)columnNames notes:(NSString **)notes timestamp:(double *)timestamp values:(RWIProtocolJSONObject **)values payload:(RWIProtocolJSONObject **)payload sqlError:(RWIProtocolDatabaseError **)sqlError screenColor:(NSString **)screenColor alternateColors:(NSArray/*<NSString>*/ **)alternateColors printColor:(NSString **)printColor;
979- (void)didExecuteNoOptionalParametersWithColumnNames:(NSArray/*<NSString>*/ *)columnNames notes:(NSString *)notes timestamp:(double)timestamp values:(RWIProtocolJSONObject *)values payload:(RWIProtocolJSONObject *)payload sqlError:(RWIProtocolDatabaseError *)sqlError screenColor:(NSString *)screenColor alternateColors:(NSArray/*<NSString>*/ *)alternateColors printColor:(NSString *)printColor;
980@end
981
982
983### End File: RWIProtocol.h
984
985### Begin File: RWIProtocolTypes.mm
986/*
987 * Copyright (C) 2013 Google Inc. All rights reserved.
988 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
989 * Copyright (C) 2014 University of Washington. All rights reserved.
990 *
991 * Redistribution and use in source and binary forms, with or without
992 * modification, are permitted provided that the following conditions
993 * are met:
994 * 1. Redistributions of source code must retain the above copyright
995 * notice, this list of conditions and the following disclaimer.
996 * 2. Redistributions in binary form must reproduce the above copyright
997 * notice, this list of conditions and the following disclaimer in the
998 * documentation and/or other materials provided with the distribution.
999 *
1000 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
1001 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
1002 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1003 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
1004 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1005 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1006 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1007 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1008 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1009 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
1010 * THE POSSIBILITY OF SUCH DAMAGE.
1011 */
1012
1013// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
1014// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
1015
1016#import "config.h"
1017#import "RWIProtocolInternal.h"
1018
1019#import "RWIProtocolEnumConversionHelpers.h"
1020#import <JavaScriptCore/InspectorValues.h>
1021#import <wtf/Assertions.h>
1022
1023using namespace Inspector;
1024
1025
1026@implementation RWIProtocolDatabaseError
1027
1028- (instancetype)initWithMessage:(NSString *)message code:(int)code;
1029{
1030 self = [super init];
1031 if (!self)
1032 return nil;
1033
1034 THROW_EXCEPTION_FOR_REQUIRED_PROPERTY(message, @"message");
1035
1036 self.message = message;
1037 self.code = code;
1038
1039 return self;
1040}
1041
1042- (void)setMessage:(NSString *)message
1043{
1044 [super setString:message forKey:@"message"];
1045}
1046
1047- (NSString *)message
1048{
1049 return [super stringForKey:@"message"];
1050}
1051
1052- (void)setCode:(int)code
1053{
1054 [super setInteger:code forKey:@"code"];
1055}
1056
1057- (int)code
1058{
1059 return [super integerForKey:@"code"];
1060}
1061
1062@end
1063
1064
1065### End File: RWIProtocolTypes.mm
1066
1067### Begin File: RWIProtocolInternal.h
1068/*
1069 * Copyright (C) 2013 Google Inc. All rights reserved.
1070 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
1071 * Copyright (C) 2014 University of Washington. All rights reserved.
1072 *
1073 * Redistribution and use in source and binary forms, with or without
1074 * modification, are permitted provided that the following conditions
1075 * are met:
1076 * 1. Redistributions of source code must retain the above copyright
1077 * notice, this list of conditions and the following disclaimer.
1078 * 2. Redistributions in binary form must reproduce the above copyright
1079 * notice, this list of conditions and the following disclaimer in the
1080 * documentation and/or other materials provided with the distribution.
1081 *
1082 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
1083 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
1084 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1085 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
1086 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1087 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1088 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1089 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1090 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1091 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
1092 * THE POSSIBILITY OF SUCH DAMAGE.
1093 */
1094
1095// DO NOT EDIT THIS FILE. It is automatically generated from events-with-optional-parameters.json
1096// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
1097
1098#import "RWIProtocol.h"
1099#import "RWIProtocolJSONObjectInternal.h"
1100#import <JavaScriptCore/AugmentableInspectorController.h>
1101#import <JavaScriptCore/InspectorValues.h>
1102
1103@interface RWIProtocolDatabaseDomainEventDispatcher (Private)
1104- (instancetype)initWithController:(Inspector::AugmentableInspectorController*)controller;
1105@end
1106
1107
1108### End File: RWIProtocolInternal.h