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