2010-04-29 Xan Lopez <xlopez@igalia.com>
[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      switch (prop_id) {
549     case PROP_INT_ATTR:
550     {
551          coreSelf->setIntAttr((g_value_get_long(value)) );
552          break;
553     }
554     case PROP_UNSIGNED_LONG_LONG_ATTR:
555     {
556          coreSelf->setUnsignedLongLongAttr((g_value_get_uint64(value)) );
557          break;
558     }
559     case PROP_STRING_ATTR:
560     {
561          coreSelf->setStringAttr(WebCore::String::fromUTF8(g_value_get_string(value)) );
562          break;
563     }
564     case PROP_ATTR_WITH_EXCEPTION:
565     {
566          coreSelf->setAttrWithException((g_value_get_long(value)) );
567          break;
568     }
569     case PROP_ATTR_WITH_SETTER_EXCEPTION:
570     {
571          coreSelf->setAttrWithSetterException((g_value_get_long(value)) );
572          break;
573     }
574     case PROP_ATTR_WITH_GETTER_EXCEPTION:
575     {
576          coreSelf->setAttrWithGetterException((g_value_get_long(value)) );
577          break;
578     }
579     case PROP_CUSTOM_ATTR:
580     {
581          coreSelf->setCustomAttr((g_value_get_long(value)) );
582          break;
583     }
584      default:
585         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
586         break;
587     }
588 }
589
590
591 static void webkit_dom_test_obj_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
592 {
593      WebKitDOMTestObj* self = WEBKIT_DOM_TEST_OBJ(object);
594     WebCore::TestObj* coreSelf = WebKit::core(self);
595      switch (prop_id) {
596     case PROP_READ_ONLY_INT_ATTR:
597     {
598          g_value_set_long(value, coreSelf->readOnlyIntAttr());
599          break;
600     }
601     case PROP_READ_ONLY_STRING_ATTR:
602     {
603          g_value_take_string(value, convertToUTF8String(coreSelf->readOnlyStringAttr()));
604          break;
605     }
606     case PROP_READ_ONLY_TEST_OBJ_ATTR:
607     {
608          RefPtr<WebCore::TestObj> ptr = coreSelf->readOnlyTestObjAttr();
609         g_value_set_object(value, WebKit::kit(ptr.get()));
610          break;
611     }
612     case PROP_INT_ATTR:
613     {
614          g_value_set_long(value, coreSelf->intAttr());
615          break;
616     }
617     case PROP_LONG_LONG_ATTR:
618     {
619          g_value_set_int64(value, coreSelf->longLongAttr());
620          break;
621     }
622     case PROP_UNSIGNED_LONG_LONG_ATTR:
623     {
624          g_value_set_uint64(value, coreSelf->unsignedLongLongAttr());
625          break;
626     }
627     case PROP_STRING_ATTR:
628     {
629          g_value_take_string(value, convertToUTF8String(coreSelf->stringAttr()));
630          break;
631     }
632     case PROP_TEST_OBJ_ATTR:
633     {
634          RefPtr<WebCore::TestObj> ptr = coreSelf->testObjAttr();
635         g_value_set_object(value, WebKit::kit(ptr.get()));
636          break;
637     }
638     case PROP_ATTR_WITH_EXCEPTION:
639     {
640          g_value_set_long(value, coreSelf->attrWithException());
641          break;
642     }
643     case PROP_ATTR_WITH_SETTER_EXCEPTION:
644     {
645          g_value_set_long(value, coreSelf->attrWithSetterException());
646          break;
647     }
648     case PROP_ATTR_WITH_GETTER_EXCEPTION:
649     {
650          g_value_set_long(value, coreSelf->attrWithGetterException());
651          break;
652     }
653     case PROP_CUSTOM_ATTR:
654     {
655          g_value_set_long(value, coreSelf->customAttr());
656          break;
657     }
658      default:
659         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
660         break;
661     }
662 }
663
664
665 static void webkit_dom_test_obj_class_init(WebKitDOMTestObjClass* requestClass)
666 {
667     GObjectClass *gobjectClass = G_OBJECT_CLASS(requestClass);
668     gobjectClass->finalize = webkit_dom_test_obj_finalize;
669     gobjectClass->set_property = webkit_dom_test_obj_set_property;
670     gobjectClass->get_property = webkit_dom_test_obj_get_property;
671
672     g_object_class_install_property(gobjectClass,
673                                     PROP_READ_ONLY_INT_ATTR,
674                                     g_param_spec_long("read-only-int-attr", /* name */
675                                                            "test_obj_read-only-int-attr", /* short description */
676                                                            "read-only  glong TestObj.read-only-int-attr", /* longer - could do with some extra doc stuff here */
677                                                            G_MINLONG, /* min */
678 G_MAXLONG, /* max */
679 0, /* default */
680                                                            WEBKIT_PARAM_READABLE));
681      g_object_class_install_property(gobjectClass,
682                                     PROP_READ_ONLY_STRING_ATTR,
683                                     g_param_spec_string("read-only-string-attr", /* name */
684                                                            "test_obj_read-only-string-attr", /* short description */
685                                                            "read-only  gchar*  TestObj.read-only-string-attr", /* longer - could do with some extra doc stuff here */
686                                                            "", /* default */
687                                                            WEBKIT_PARAM_READABLE));
688      g_object_class_install_property(gobjectClass,
689                                     PROP_READ_ONLY_TEST_OBJ_ATTR,
690                                     g_param_spec_object("read-only-test-obj-attr", /* name */
691                                                            "test_obj_read-only-test-obj-attr", /* short description */
692                                                            "read-only  WebKitDOMTestObj*  TestObj.read-only-test-obj-attr", /* longer - could do with some extra doc stuff here */
693                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
694                                                            WEBKIT_PARAM_READABLE));
695      g_object_class_install_property(gobjectClass,
696                                     PROP_INT_ATTR,
697                                     g_param_spec_long("int-attr", /* name */
698                                                            "test_obj_int-attr", /* short description */
699                                                            "read-write  glong TestObj.int-attr", /* longer - could do with some extra doc stuff here */
700                                                            G_MINLONG, /* min */
701 G_MAXLONG, /* max */
702 0, /* default */
703                                                            WEBKIT_PARAM_READWRITE));
704      g_object_class_install_property(gobjectClass,
705                                     PROP_LONG_LONG_ATTR,
706                                     g_param_spec_int64("long-long-attr", /* name */
707                                                            "test_obj_long-long-attr", /* short description */
708                                                            "read-write  gint64 TestObj.long-long-attr", /* longer - could do with some extra doc stuff here */
709                                                            G_MININT64, /* min */
710 G_MAXINT64, /* max */
711 0, /* default */
712                                                            WEBKIT_PARAM_READWRITE));
713      g_object_class_install_property(gobjectClass,
714                                     PROP_UNSIGNED_LONG_LONG_ATTR,
715                                     g_param_spec_uint64("unsigned-long-long-attr", /* name */
716                                                            "test_obj_unsigned-long-long-attr", /* short description */
717                                                            "read-write  guint64 TestObj.unsigned-long-long-attr", /* longer - could do with some extra doc stuff here */
718                                                            0, /* min */
719 G_MAXUINT64, /* min */
720 0, /* default */
721                                                            WEBKIT_PARAM_READWRITE));
722      g_object_class_install_property(gobjectClass,
723                                     PROP_STRING_ATTR,
724                                     g_param_spec_string("string-attr", /* name */
725                                                            "test_obj_string-attr", /* short description */
726                                                            "read-write  gchar*  TestObj.string-attr", /* longer - could do with some extra doc stuff here */
727                                                            "", /* default */
728                                                            WEBKIT_PARAM_READWRITE));
729      g_object_class_install_property(gobjectClass,
730                                     PROP_TEST_OBJ_ATTR,
731                                     g_param_spec_object("test-obj-attr", /* name */
732                                                            "test_obj_test-obj-attr", /* short description */
733                                                            "read-write  WebKitDOMTestObj*  TestObj.test-obj-attr", /* longer - could do with some extra doc stuff here */
734                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
735                                                            WEBKIT_PARAM_READWRITE));
736      g_object_class_install_property(gobjectClass,
737                                     PROP_ATTR_WITH_EXCEPTION,
738                                     g_param_spec_long("attr-with-exception", /* name */
739                                                            "test_obj_attr-with-exception", /* short description */
740                                                            "read-write  glong TestObj.attr-with-exception", /* longer - could do with some extra doc stuff here */
741                                                            G_MINLONG, /* min */
742 G_MAXLONG, /* max */
743 0, /* default */
744                                                            WEBKIT_PARAM_READWRITE));
745      g_object_class_install_property(gobjectClass,
746                                     PROP_ATTR_WITH_SETTER_EXCEPTION,
747                                     g_param_spec_long("attr-with-setter-exception", /* name */
748                                                            "test_obj_attr-with-setter-exception", /* short description */
749                                                            "read-write  glong TestObj.attr-with-setter-exception", /* longer - could do with some extra doc stuff here */
750                                                            G_MINLONG, /* min */
751 G_MAXLONG, /* max */
752 0, /* default */
753                                                            WEBKIT_PARAM_READWRITE));
754      g_object_class_install_property(gobjectClass,
755                                     PROP_ATTR_WITH_GETTER_EXCEPTION,
756                                     g_param_spec_long("attr-with-getter-exception", /* name */
757                                                            "test_obj_attr-with-getter-exception", /* short description */
758                                                            "read-write  glong TestObj.attr-with-getter-exception", /* longer - could do with some extra doc stuff here */
759                                                            G_MINLONG, /* min */
760 G_MAXLONG, /* max */
761 0, /* default */
762                                                            WEBKIT_PARAM_READWRITE));
763      g_object_class_install_property(gobjectClass,
764                                     PROP_CUSTOM_ATTR,
765                                     g_param_spec_long("custom-attr", /* name */
766                                                            "test_obj_custom-attr", /* short description */
767                                                            "read-write  glong TestObj.custom-attr", /* longer - could do with some extra doc stuff here */
768                                                            G_MINLONG, /* min */
769 G_MAXLONG, /* max */
770 0, /* default */
771                                                            WEBKIT_PARAM_READWRITE));
772
773
774
775 }
776
777 static void webkit_dom_test_obj_init(WebKitDOMTestObj* request)
778 {
779 }
780