Improve code generator scripts to support converting ScriptString.
[WebKit-https.git] / WebCore / bindings / scripts / test / GObject / WebKitDOMTestObj.cpp
1 /*
2     This file is part of the WebKit open source project.
3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Library General Public
7     License as published by the Free Software Foundation; either
8     version 2 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Library General Public License for more details.
14
15     You should have received a copy of the GNU Library General Public License
16     along with this library; see the file COPYING.LIB.  If not, write to
17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18     Boston, MA 02110-1301, USA.
19 */
20
21 #include <glib-object.h>
22 #include "config.h"
23
24 #include <wtf/GetPtr.h>
25 #include <wtf/RefPtr.h>
26 #include "ExceptionCode.h"
27 #include "TestObj.h"
28 #include "WebKitDOMBinding.h"
29 #include "gobject/ConvertToUTF8String.h"
30 #include "webkit/WebKitDOMSerializedScriptValue.h"
31 #include "webkit/WebKitDOMSerializedScriptValuePrivate.h"
32 #include "webkit/WebKitDOMTestObj.h"
33 #include "webkit/WebKitDOMTestObjPrivate.h"
34 #include "webkitmarshal.h"
35 #include "webkitprivate.h"
36
37 namespace WebKit {
38     
39 gpointer kit(WebCore::TestObj* obj)
40 {
41     g_return_val_if_fail(obj != 0, 0);
42
43     if (gpointer ret = DOMObjectCache::get(obj))
44         return ret;
45
46     return DOMObjectCache::put(obj, WebKit::wrapTestObj(obj));
47 }
48     
49 } // namespace WebKit //
50
51 void
52 webkit_dom_test_obj_void_method (WebKitDOMTestObj *self)
53 {
54     g_return_if_fail (self);
55     WebCore::TestObj * item = WebKit::core(self);
56     item->voidMethod();
57
58 }
59
60 void
61 webkit_dom_test_obj_void_method_with_args (WebKitDOMTestObj *self, glong int_arg, gchar*  str_arg, WebKitDOMTestObj*  obj_arg)
62 {
63     g_return_if_fail (self);
64     WebCore::TestObj * item = WebKit::core(self);
65     g_return_if_fail (str_arg);
66     g_return_if_fail (obj_arg);
67     WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);
68     WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);
69     g_return_if_fail (_g_obj_arg);
70     item->voidMethodWithArgs(int_arg, _g_str_arg, _g_obj_arg);
71
72 }
73
74 glong
75 webkit_dom_test_obj_int_method (WebKitDOMTestObj *self)
76 {
77     g_return_val_if_fail (self, 0);
78     WebCore::TestObj * item = WebKit::core(self);
79     glong res = item->intMethod();
80     return res;
81
82 }
83
84 glong
85 webkit_dom_test_obj_int_method_with_args (WebKitDOMTestObj *self, glong int_arg, gchar*  str_arg, WebKitDOMTestObj*  obj_arg)
86 {
87     g_return_val_if_fail (self, 0);
88     WebCore::TestObj * item = WebKit::core(self);
89     g_return_val_if_fail (str_arg, 0);
90     g_return_val_if_fail (obj_arg, 0);
91     WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);
92     WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);
93     g_return_val_if_fail (_g_obj_arg, 0);
94     glong res = item->intMethodWithArgs(int_arg, _g_str_arg, _g_obj_arg);
95     return res;
96
97 }
98
99 WebKitDOMTestObj* 
100 webkit_dom_test_obj_obj_method (WebKitDOMTestObj *self)
101 {
102     g_return_val_if_fail (self, 0);
103     WebCore::TestObj * item = WebKit::core(self);
104     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethod());
105     WebKitDOMTestObj*  res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
106     return res;
107
108 }
109
110 WebKitDOMTestObj* 
111 webkit_dom_test_obj_obj_method_with_args (WebKitDOMTestObj *self, glong int_arg, gchar*  str_arg, WebKitDOMTestObj*  obj_arg)
112 {
113     g_return_val_if_fail (self, 0);
114     WebCore::TestObj * item = WebKit::core(self);
115     g_return_val_if_fail (str_arg, 0);
116     g_return_val_if_fail (obj_arg, 0);
117     WebCore::String _g_str_arg = WebCore::String::fromUTF8(str_arg);
118     WebCore::TestObj * _g_obj_arg = WebKit::core(obj_arg);
119     g_return_val_if_fail (_g_obj_arg, 0);
120     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethodWithArgs(int_arg, _g_str_arg, _g_obj_arg));
121     WebKitDOMTestObj*  res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
122     return res;
123
124 }
125
126 void
127 webkit_dom_test_obj_serialized_value (WebKitDOMTestObj *self, WebKitDOMSerializedScriptValue*  serialized_arg)
128 {
129     g_return_if_fail (self);
130     WebCore::TestObj * item = WebKit::core(self);
131     g_return_if_fail (serialized_arg);
132     WebCore::SerializedScriptValue * _g_serialized_arg = WebKit::core(serialized_arg);
133     g_return_if_fail (_g_serialized_arg);
134     item->serializedValue(_g_serialized_arg);
135
136 }
137
138 void
139 webkit_dom_test_obj_method_with_exception (WebKitDOMTestObj *self, GError **error)
140 {
141     g_return_if_fail (self);
142     WebCore::TestObj * item = WebKit::core(self);
143     WebCore::ExceptionCode ec = 0;
144     item->methodWithException(ec);
145     if (ec) {
146         WebCore::ExceptionCodeDescription ecdesc;
147         WebCore::getExceptionCodeDescription(ec, ecdesc);
148         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
149     }
150
151 }
152
153
154 /* TODO: event function webkit_dom_test_obj_add_event_listener */
155
156
157 /* TODO: event function webkit_dom_test_obj_remove_event_listener */
158
159 void
160 webkit_dom_test_obj_with_dynamic_frame (WebKitDOMTestObj *self)
161 {
162     g_return_if_fail (self);
163     WebCore::TestObj * item = WebKit::core(self);
164     item->withDynamicFrame();
165
166 }
167
168 void
169 webkit_dom_test_obj_with_dynamic_frame_and_arg (WebKitDOMTestObj *self, glong int_arg)
170 {
171     g_return_if_fail (self);
172     WebCore::TestObj * item = WebKit::core(self);
173     item->withDynamicFrameAndArg(int_arg);
174
175 }
176
177 void
178 webkit_dom_test_obj_with_dynamic_frame_and_optional_arg (WebKitDOMTestObj *self, glong int_arg, glong optional_arg)
179 {
180     g_return_if_fail (self);
181     WebCore::TestObj * item = WebKit::core(self);
182     item->withDynamicFrameAndOptionalArg(int_arg, optional_arg);
183
184 }
185
186 void
187 webkit_dom_test_obj_with_dynamic_frame_and_user_gesture (WebKitDOMTestObj *self, glong int_arg)
188 {
189     g_return_if_fail (self);
190     WebCore::TestObj * item = WebKit::core(self);
191     item->withDynamicFrameAndUserGesture(int_arg);
192
193 }
194
195 void
196 webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad (WebKitDOMTestObj *self, glong int_arg, glong optional_arg)
197 {
198     g_return_if_fail (self);
199     WebCore::TestObj * item = WebKit::core(self);
200     item->withDynamicFrameAndUserGestureASAD(int_arg, optional_arg);
201
202 }
203
204 void
205 webkit_dom_test_obj_with_script_state_void (WebKitDOMTestObj *self)
206 {
207     g_return_if_fail (self);
208     WebCore::TestObj * item = WebKit::core(self);
209     item->withScriptStateVoid();
210
211 }
212
213 WebKitDOMTestObj* 
214 webkit_dom_test_obj_with_script_state_obj (WebKitDOMTestObj *self)
215 {
216     g_return_val_if_fail (self, 0);
217     WebCore::TestObj * item = WebKit::core(self);
218     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObj());
219     WebKitDOMTestObj*  res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
220     return res;
221
222 }
223
224 void
225 webkit_dom_test_obj_with_script_state_void_exception (WebKitDOMTestObj *self, GError **error)
226 {
227     g_return_if_fail (self);
228     WebCore::TestObj * item = WebKit::core(self);
229     WebCore::ExceptionCode ec = 0;
230     item->withScriptStateVoidException(ec);
231     if (ec) {
232         WebCore::ExceptionCodeDescription ecdesc;
233         WebCore::getExceptionCodeDescription(ec, ecdesc);
234         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
235     }
236
237 }
238
239 WebKitDOMTestObj* 
240 webkit_dom_test_obj_with_script_state_obj_exception (WebKitDOMTestObj *self, GError **error)
241 {
242     g_return_val_if_fail (self, 0);
243     WebCore::TestObj * item = WebKit::core(self);
244     WebCore::ExceptionCode ec = 0;
245     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->withScriptStateObjException(ec));
246     if (ec) {
247         WebCore::ExceptionCodeDescription ecdesc;
248         WebCore::getExceptionCodeDescription(ec, ecdesc);
249         g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
250     }
251     WebKitDOMTestObj*  res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
252     return res;
253
254 }
255
256 void
257 webkit_dom_test_obj_method_with_optional_arg (WebKitDOMTestObj *self, glong opt)
258 {
259     g_return_if_fail (self);
260     WebCore::TestObj * item = WebKit::core(self);
261     item->methodWithOptionalArg(opt);
262
263 }
264
265 void
266 webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg (WebKitDOMTestObj *self, glong non_opt, glong opt)
267 {
268     g_return_if_fail (self);
269     WebCore::TestObj * item = WebKit::core(self);
270     item->methodWithNonOptionalArgAndOptionalArg(non_opt, opt);
271
272 }
273
274 void
275 webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args (WebKitDOMTestObj *self, glong non_opt, glong opt1, glong opt2)
276 {
277     g_return_if_fail (self);
278     WebCore::TestObj * item = WebKit::core(self);
279     item->methodWithNonOptionalArgAndTwoOptionalArgs(non_opt, opt1, opt2);
280
281 }
282
283 glong
284 webkit_dom_test_obj_get_read_only_int_attr (WebKitDOMTestObj *self)
285 {
286     g_return_val_if_fail (self, 0);
287     WebCore::TestObj * item = WebKit::core(self);
288     glong res = item->readOnlyIntAttr();
289     return res;
290
291 }
292
293 gchar* 
294 webkit_dom_test_obj_get_read_only_string_attr (WebKitDOMTestObj *self)
295 {
296     g_return_val_if_fail (self, 0);
297     WebCore::TestObj * item = WebKit::core(self);
298     gchar*  res = convertToUTF8String(item->readOnlyStringAttr());
299     return res;
300
301 }
302
303 WebKitDOMTestObj* 
304 webkit_dom_test_obj_get_read_only_test_obj_attr (WebKitDOMTestObj *self)
305 {
306     g_return_val_if_fail (self, 0);
307     WebCore::TestObj * item = WebKit::core(self);
308     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->readOnlyTestObjAttr());
309     WebKitDOMTestObj*  res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
310     return res;
311
312 }
313
314 glong
315 webkit_dom_test_obj_get_int_attr (WebKitDOMTestObj *self)
316 {
317     g_return_val_if_fail (self, 0);
318     WebCore::TestObj * item = WebKit::core(self);
319     glong res = item->intAttr();
320     return res;
321
322 }
323
324 void
325 webkit_dom_test_obj_set_int_attr (WebKitDOMTestObj *self, glong value)
326 {
327     g_return_if_fail (self);
328     WebCore::TestObj * item = WebKit::core(self);
329     item->setIntAttr(value);
330
331 }
332
333 gint64
334 webkit_dom_test_obj_get_long_long_attr (WebKitDOMTestObj *self)
335 {
336     g_return_val_if_fail (self, 0);
337     WebCore::TestObj * item = WebKit::core(self);
338     gint64 res = item->longLongAttr();
339     return res;
340
341 }
342
343 void
344 webkit_dom_test_obj_set_long_long_attr (WebKitDOMTestObj *self, gint64 value)
345 {
346     g_return_if_fail (self);
347     WebCore::TestObj * item = WebKit::core(self);
348     item->setLongLongAttr(value);
349
350 }
351
352 guint64
353 webkit_dom_test_obj_get_unsigned_long_long_attr (WebKitDOMTestObj *self)
354 {
355     g_return_val_if_fail (self, 0);
356     WebCore::TestObj * item = WebKit::core(self);
357     guint64 res = item->unsignedLongLongAttr();
358     return res;
359
360 }
361
362 void
363 webkit_dom_test_obj_set_unsigned_long_long_attr (WebKitDOMTestObj *self, guint64 value)
364 {
365     g_return_if_fail (self);
366     WebCore::TestObj * item = WebKit::core(self);
367     item->setUnsignedLongLongAttr(value);
368
369 }
370
371 gchar* 
372 webkit_dom_test_obj_get_string_attr (WebKitDOMTestObj *self)
373 {
374     g_return_val_if_fail (self, 0);
375     WebCore::TestObj * item = WebKit::core(self);
376     gchar*  res = convertToUTF8String(item->stringAttr());
377     return res;
378
379 }
380
381 void
382 webkit_dom_test_obj_set_string_attr (WebKitDOMTestObj *self, gchar*  value)
383 {
384     g_return_if_fail (self);
385     WebCore::TestObj * item = WebKit::core(self);
386     g_return_if_fail (value);
387     WebCore::String _g_value = WebCore::String::fromUTF8(value);
388     item->setStringAttr(_g_value);
389
390 }
391
392 WebKitDOMTestObj* 
393 webkit_dom_test_obj_get_test_obj_attr (WebKitDOMTestObj *self)
394 {
395     g_return_val_if_fail (self, 0);
396     WebCore::TestObj * item = WebKit::core(self);
397     PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->testObjAttr());
398     WebKitDOMTestObj*  res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
399     return res;
400
401 }
402
403 void
404 webkit_dom_test_obj_set_test_obj_attr (WebKitDOMTestObj *self, WebKitDOMTestObj*  value)
405 {
406     g_return_if_fail (self);
407     WebCore::TestObj * item = WebKit::core(self);
408     g_return_if_fail (value);
409     WebCore::TestObj * _g_value = WebKit::core(value);
410     g_return_if_fail (_g_value);
411     item->setTestObjAttr(_g_value);
412
413 }
414
415 glong
416 webkit_dom_test_obj_get_attr_with_exception (WebKitDOMTestObj *self)
417 {
418     g_return_val_if_fail (self, 0);
419     WebCore::TestObj * item = WebKit::core(self);
420     glong res = item->attrWithException();
421     return res;
422
423 }
424
425 void
426 webkit_dom_test_obj_set_attr_with_exception (WebKitDOMTestObj *self, glong value)
427 {
428     g_return_if_fail (self);
429     WebCore::TestObj * item = WebKit::core(self);
430     item->setAttrWithException(value);
431
432 }
433
434 glong
435 webkit_dom_test_obj_get_attr_with_setter_exception (WebKitDOMTestObj *self)
436 {
437     g_return_val_if_fail (self, 0);
438     WebCore::TestObj * item = WebKit::core(self);
439     glong res = item->attrWithSetterException();
440     return res;
441
442 }
443
444 void
445 webkit_dom_test_obj_set_attr_with_setter_exception (WebKitDOMTestObj *self, glong value)
446 {
447     g_return_if_fail (self);
448     WebCore::TestObj * item = WebKit::core(self);
449     item->setAttrWithSetterException(value);
450
451 }
452
453 glong
454 webkit_dom_test_obj_get_attr_with_getter_exception (WebKitDOMTestObj *self)
455 {
456     g_return_val_if_fail (self, 0);
457     WebCore::TestObj * item = WebKit::core(self);
458     glong res = item->attrWithGetterException();
459     return res;
460
461 }
462
463 void
464 webkit_dom_test_obj_set_attr_with_getter_exception (WebKitDOMTestObj *self, glong value)
465 {
466     g_return_if_fail (self);
467     WebCore::TestObj * item = WebKit::core(self);
468     item->setAttrWithGetterException(value);
469
470 }
471
472 gchar* 
473 webkit_dom_test_obj_get_script_string_attr (WebKitDOMTestObj *self)
474 {
475     g_return_val_if_fail (self, 0);
476     WebCore::TestObj * item = WebKit::core(self);
477     gchar*  res = convertToUTF8String(item->scriptStringAttr());
478     return res;
479
480 }
481
482
483 G_DEFINE_TYPE(WebKitDOMTestObj, webkit_dom_test_obj, WEBKIT_TYPE_DOM_OBJECT)
484
485 namespace WebKit {
486
487 WebKitDOMTestObj* wrapTestObj(WebCore::TestObj* coreObject)
488 {
489     g_return_val_if_fail(coreObject != 0, 0);
490     
491     WebKitDOMTestObj* wrapper = WEBKIT_DOM_TEST_OBJ(g_object_new(WEBKIT_TYPE_DOM_TEST_OBJ, NULL));
492     g_return_val_if_fail(wrapper != 0, 0);
493
494     /* We call ref() rather than using a C++ smart pointer because we can't store a C++ object
495      * in a C-allocated GObject structure.  See the finalize() code for the
496      * matching deref().
497      */
498
499     coreObject->ref();
500     WEBKIT_DOM_OBJECT(wrapper)->coreObject = coreObject;
501
502     return wrapper;
503 }
504
505 WebCore::TestObj* core(WebKitDOMTestObj* request)
506 {
507     g_return_val_if_fail(request != 0, 0);
508     
509     WebCore::TestObj* coreObject = static_cast<WebCore::TestObj*>(WEBKIT_DOM_OBJECT(request)->coreObject);
510     g_return_val_if_fail(coreObject != 0, 0);
511     
512     return coreObject;
513 }
514
515 } // namespace WebKit
516 enum {
517     PROP_0,
518     PROP_READ_ONLY_INT_ATTR,
519     PROP_READ_ONLY_STRING_ATTR,
520     PROP_READ_ONLY_TEST_OBJ_ATTR,
521     PROP_INT_ATTR,
522     PROP_LONG_LONG_ATTR,
523     PROP_UNSIGNED_LONG_LONG_ATTR,
524     PROP_STRING_ATTR,
525     PROP_TEST_OBJ_ATTR,
526     PROP_ATTR_WITH_EXCEPTION,
527     PROP_ATTR_WITH_SETTER_EXCEPTION,
528     PROP_ATTR_WITH_GETTER_EXCEPTION,
529     PROP_CUSTOM_ATTR,
530     PROP_SCRIPT_STRING_ATTR,
531 };
532
533
534 static void webkit_dom_test_obj_finalize(GObject* object)
535 {
536     WebKitDOMObject* dom_object = WEBKIT_DOM_OBJECT(object);
537     
538     if (dom_object->coreObject != NULL) {
539         WebCore::TestObj* coreObject = static_cast<WebCore::TestObj *>(dom_object->coreObject);
540
541         WebKit::DOMObjectCache::forget(coreObject);
542         coreObject->deref();
543
544         dom_object->coreObject = NULL;
545     }
546
547     G_OBJECT_CLASS(webkit_dom_test_obj_parent_class)->finalize(object);
548 }
549
550 static void webkit_dom_test_obj_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
551 {
552      WebKitDOMTestObj *self = WEBKIT_DOM_TEST_OBJ(object);
553     WebCore::TestObj* coreSelf = WebKit::core(self);
554      switch (prop_id) {
555     case PROP_INT_ATTR:
556     {
557          coreSelf->setIntAttr((g_value_get_long(value)) );
558          break;
559     }
560     case PROP_UNSIGNED_LONG_LONG_ATTR:
561     {
562          coreSelf->setUnsignedLongLongAttr((g_value_get_uint64(value)) );
563          break;
564     }
565     case PROP_STRING_ATTR:
566     {
567          coreSelf->setStringAttr(WebCore::String::fromUTF8(g_value_get_string(value)) );
568          break;
569     }
570     case PROP_ATTR_WITH_EXCEPTION:
571     {
572          coreSelf->setAttrWithException((g_value_get_long(value)) );
573          break;
574     }
575     case PROP_ATTR_WITH_SETTER_EXCEPTION:
576     {
577          coreSelf->setAttrWithSetterException((g_value_get_long(value)) );
578          break;
579     }
580     case PROP_ATTR_WITH_GETTER_EXCEPTION:
581     {
582          coreSelf->setAttrWithGetterException((g_value_get_long(value)) );
583          break;
584     }
585      default:
586         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
587         break;
588     }
589 }
590
591
592 static void webkit_dom_test_obj_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
593 {
594      WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
595     WebCore::TestObj* coreSelf = WebKit::core(self);
596      switch (prop_id) {
597     case PROP_READ_ONLY_INT_ATTR:
598     {
599          g_value_set_long(value, coreSelf->readOnlyIntAttr());
600          break;
601     }
602     case PROP_READ_ONLY_STRING_ATTR:
603     {
604          g_value_take_string(value, convertToUTF8String(coreSelf->readOnlyStringAttr()));
605          break;
606     }
607     case PROP_READ_ONLY_TEST_OBJ_ATTR:
608     {
609          RefPtr<WebCore::TestObj> ptr = coreSelf->readOnlyTestObjAttr();
610         g_value_set_object(value, WebKit::kit(ptr.get()));
611          break;
612     }
613     case PROP_INT_ATTR:
614     {
615          g_value_set_long(value, coreSelf->intAttr());
616          break;
617     }
618     case PROP_LONG_LONG_ATTR:
619     {
620          g_value_set_int64(value, coreSelf->longLongAttr());
621          break;
622     }
623     case PROP_UNSIGNED_LONG_LONG_ATTR:
624     {
625          g_value_set_uint64(value, coreSelf->unsignedLongLongAttr());
626          break;
627     }
628     case PROP_STRING_ATTR:
629     {
630          g_value_take_string(value, convertToUTF8String(coreSelf->stringAttr()));
631          break;
632     }
633     case PROP_TEST_OBJ_ATTR:
634     {
635          RefPtr<WebCore::TestObj> ptr = coreSelf->testObjAttr();
636         g_value_set_object(value, WebKit::kit(ptr.get()));
637          break;
638     }
639     case PROP_ATTR_WITH_EXCEPTION:
640     {
641          g_value_set_long(value, coreSelf->attrWithException());
642          break;
643     }
644     case PROP_ATTR_WITH_SETTER_EXCEPTION:
645     {
646          g_value_set_long(value, coreSelf->attrWithSetterException());
647          break;
648     }
649     case PROP_ATTR_WITH_GETTER_EXCEPTION:
650     {
651          g_value_set_long(value, coreSelf->attrWithGetterException());
652          break;
653     }
654     case PROP_SCRIPT_STRING_ATTR:
655     {
656          g_value_take_string(value, convertToUTF8String(coreSelf->scriptStringAttr()));
657          break;
658     }
659      default:
660         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
661         break;
662     }
663 }
664
665
666 static void webkit_dom_test_obj_class_init(WebKitDOMTestObjClass* requestClass)
667 {
668     GObjectClass *gobjectClass = G_OBJECT_CLASS(requestClass);
669     gobjectClass->finalize = webkit_dom_test_obj_finalize;
670     gobjectClass->set_property = webkit_dom_test_obj_set_property;
671     gobjectClass->get_property = webkit_dom_test_obj_get_property;
672
673     g_object_class_install_property(gobjectClass,
674                                     PROP_READ_ONLY_INT_ATTR,
675                                     g_param_spec_long("read-only-int-attr", /* name */
676                                                            "test_obj_read-only-int-attr", /* short description */
677                                                            "read-only  glong TestObj.read-only-int-attr", /* longer - could do with some extra doc stuff here */
678                                                            G_MINLONG, /* min */
679 G_MAXLONG, /* max */
680 0, /* default */
681                                                            WEBKIT_PARAM_READABLE));
682      g_object_class_install_property(gobjectClass,
683                                     PROP_READ_ONLY_STRING_ATTR,
684                                     g_param_spec_string("read-only-string-attr", /* name */
685                                                            "test_obj_read-only-string-attr", /* short description */
686                                                            "read-only  gchar*  TestObj.read-only-string-attr", /* longer - could do with some extra doc stuff here */
687                                                            "", /* default */
688                                                            WEBKIT_PARAM_READABLE));
689      g_object_class_install_property(gobjectClass,
690                                     PROP_READ_ONLY_TEST_OBJ_ATTR,
691                                     g_param_spec_object("read-only-test-obj-attr", /* name */
692                                                            "test_obj_read-only-test-obj-attr", /* short description */
693                                                            "read-only  WebKitDOMTestObj*  TestObj.read-only-test-obj-attr", /* longer - could do with some extra doc stuff here */
694                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
695                                                            WEBKIT_PARAM_READABLE));
696      g_object_class_install_property(gobjectClass,
697                                     PROP_INT_ATTR,
698                                     g_param_spec_long("int-attr", /* name */
699                                                            "test_obj_int-attr", /* short description */
700                                                            "read-write  glong TestObj.int-attr", /* longer - could do with some extra doc stuff here */
701                                                            G_MINLONG, /* min */
702 G_MAXLONG, /* max */
703 0, /* default */
704                                                            WEBKIT_PARAM_READWRITE));
705      g_object_class_install_property(gobjectClass,
706                                     PROP_LONG_LONG_ATTR,
707                                     g_param_spec_int64("long-long-attr", /* name */
708                                                            "test_obj_long-long-attr", /* short description */
709                                                            "read-write  gint64 TestObj.long-long-attr", /* longer - could do with some extra doc stuff here */
710                                                            G_MININT64, /* min */
711 G_MAXINT64, /* max */
712 0, /* default */
713                                                            WEBKIT_PARAM_READWRITE));
714      g_object_class_install_property(gobjectClass,
715                                     PROP_UNSIGNED_LONG_LONG_ATTR,
716                                     g_param_spec_uint64("unsigned-long-long-attr", /* name */
717                                                            "test_obj_unsigned-long-long-attr", /* short description */
718                                                            "read-write  guint64 TestObj.unsigned-long-long-attr", /* longer - could do with some extra doc stuff here */
719                                                            0, /* min */
720 G_MAXUINT64, /* min */
721 0, /* default */
722                                                            WEBKIT_PARAM_READWRITE));
723      g_object_class_install_property(gobjectClass,
724                                     PROP_STRING_ATTR,
725                                     g_param_spec_string("string-attr", /* name */
726                                                            "test_obj_string-attr", /* short description */
727                                                            "read-write  gchar*  TestObj.string-attr", /* longer - could do with some extra doc stuff here */
728                                                            "", /* default */
729                                                            WEBKIT_PARAM_READWRITE));
730      g_object_class_install_property(gobjectClass,
731                                     PROP_TEST_OBJ_ATTR,
732                                     g_param_spec_object("test-obj-attr", /* name */
733                                                            "test_obj_test-obj-attr", /* short description */
734                                                            "read-write  WebKitDOMTestObj*  TestObj.test-obj-attr", /* longer - could do with some extra doc stuff here */
735                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
736                                                            WEBKIT_PARAM_READWRITE));
737      g_object_class_install_property(gobjectClass,
738                                     PROP_ATTR_WITH_EXCEPTION,
739                                     g_param_spec_long("attr-with-exception", /* name */
740                                                            "test_obj_attr-with-exception", /* short description */
741                                                            "read-write  glong TestObj.attr-with-exception", /* longer - could do with some extra doc stuff here */
742                                                            G_MINLONG, /* min */
743 G_MAXLONG, /* max */
744 0, /* default */
745                                                            WEBKIT_PARAM_READWRITE));
746      g_object_class_install_property(gobjectClass,
747                                     PROP_ATTR_WITH_SETTER_EXCEPTION,
748                                     g_param_spec_long("attr-with-setter-exception", /* name */
749                                                            "test_obj_attr-with-setter-exception", /* short description */
750                                                            "read-write  glong TestObj.attr-with-setter-exception", /* longer - could do with some extra doc stuff here */
751                                                            G_MINLONG, /* min */
752 G_MAXLONG, /* max */
753 0, /* default */
754                                                            WEBKIT_PARAM_READWRITE));
755      g_object_class_install_property(gobjectClass,
756                                     PROP_ATTR_WITH_GETTER_EXCEPTION,
757                                     g_param_spec_long("attr-with-getter-exception", /* name */
758                                                            "test_obj_attr-with-getter-exception", /* short description */
759                                                            "read-write  glong TestObj.attr-with-getter-exception", /* longer - could do with some extra doc stuff here */
760                                                            G_MINLONG, /* min */
761 G_MAXLONG, /* max */
762 0, /* default */
763                                                            WEBKIT_PARAM_READWRITE));
764      g_object_class_install_property(gobjectClass,
765                                     PROP_SCRIPT_STRING_ATTR,
766                                     g_param_spec_string("script-string-attr", /* name */
767                                                            "test_obj_script-string-attr", /* short description */
768                                                            "read-only  gchar*  TestObj.script-string-attr", /* longer - could do with some extra doc stuff here */
769                                                            "", /* default */
770                                                            WEBKIT_PARAM_READABLE));
771
772
773
774 }
775
776 static void webkit_dom_test_obj_init(WebKitDOMTestObj* request)
777 {
778 }
779