tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebKitDOM_DOMPluginArray.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     Copyright (C) 2011 Samsung Electronics
6
7     This library is free software; you can redistribute it and/or
8     modify it under the terms of the GNU Lesser General Public
9     License as published by the Free Software Foundation; either
10     version 2.1 of the License, or (at your option) any later version.
11
12     This library is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15     Lesser General Public License for more details.
16
17     You should have received a copy of the GNU Lesser General Public
18     License along with this library; if not, write to the Free Software
19     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
20 */
21
22 #include "config.h"
23 #include "WebKitDOM_DOMPluginArray.h"
24 #include "WebKitDOM_DOMPluginArray_Private.h"
25
26 #include "DOMPlugin.h"
27 #include "DOMPluginArray.h"
28 #include "KURL.h"
29 #include "WebKitDOM_DOMPlugin.h"
30 #include "WebKitDOM_DOMPlugin_Private.h"
31 #include "WebKitDOM_String.h"
32 #include "WebKitDOM_String_Private.h"
33 #include "wtf/text/AtomicString.h"
34 #include <wtf/text/CString.h>
35 #include <wtf/GetPtr.h>
36 #include <wtf/RefPtr.h>
37
38 unsigned ewk_webkitdom_dompluginarray_get_length(WebKitDOM_DOMPluginArray* self)
39 {
40     if (!self)
41         return unsigned();
42
43     WebCore::DOMPluginArray* coreObj = _to_webcore_dompluginarray(self);
44     return coreObj->length();
45 }
46
47 void ewk_webkitdom_dompluginarray_item(WebKitDOM_DOMPluginArray* self, unsigned index, WebKitDOM_DOMPlugin* ret)
48 {
49     if (!self)
50         return;
51
52     WebCore::DOMPluginArray* coreObj = _to_webcore_dompluginarray(self);
53     RefPtr<WebCore::DOMPlugin> result = WTF::getPtr(coreObj->item(index));
54     _to_webkit_domplugin(result.get(), ret);
55
56 }
57
58 void ewk_webkitdom_dompluginarray_named_item(WebKitDOM_DOMPluginArray* self, WebKitDOM_String* name, WebKitDOM_DOMPlugin* ret)
59 {
60     if (!self)
61         return;
62
63     WebCore::DOMPluginArray* coreObj = _to_webcore_dompluginarray(self);
64     RefPtr<WebCore::DOMPlugin> result = WTF::getPtr(coreObj->namedItem(_to_webcore_string_value(name)));
65     _to_webkit_domplugin(result.get(), ret);
66
67 }
68
69 void ewk_webkitdom_dompluginarray_refresh(WebKitDOM_DOMPluginArray* self, Eina_Bool reload)
70 {
71     if (!self)
72         return;
73
74     WebCore::DOMPluginArray* coreObj = _to_webcore_dompluginarray(self);
75     coreObj->refresh(reload);
76 }
77
78
79 void ewk_webkitdom_dompluginarray_deinit(const WebKitDOM_Object* objPtr)
80 {
81     if( WEBKITDOM_ISNULL(objPtr) )
82        return;
83     ((WebCore::DOMPluginArray*)(objPtr->p_coreObject))->deref();
84     (((WebKitDOM_Object*)(objPtr))->p_coreObject) = 0;
85 }
86
87 void _copy_webkit_dompluginarray(WebKitDOM_DOMPluginArray* kitObjSrc, WebKitDOM_DOMPluginArray* ret)
88 {
89     if (WEBKITDOM_COREOBJ(kitObjSrc) == WEBKITDOM_COREOBJ(ret))
90         return;
91     WebCore::DOMPluginArray* tmpPtr = _to_webcore_dompluginarray(ret);
92     if (tmpPtr)
93         tmpPtr->deref();
94     if (!WEBKITDOM_ISNULL(kitObjSrc))
95         _to_webcore_dompluginarray(kitObjSrc)->ref();
96     ((WebKitDOM_Object*)ret)->p_coreObject = WEBKITDOM_COREOBJ(kitObjSrc);
97 }
98
99 WebCore::DOMPluginArray* _to_webcore_dompluginarray(const WebKitDOM_DOMPluginArray* kitObj)
100 {
101     return (WebCore::DOMPluginArray*)WEBKITDOM_COREOBJ(kitObj);
102 }
103
104 WebKitDOM_DOMPluginArray* _to_webkit_dompluginarray(WebCore::DOMPluginArray* coreObj, WebKitDOM_DOMPluginArray* ret)
105 {
106     WebCore::DOMPluginArray* tmpPtr = _to_webcore_dompluginarray(ret);
107     if (tmpPtr && tmpPtr != coreObj)
108         tmpPtr->deref();
109     if (coreObj)
110         coreObj->ref();
111     ((WebKitDOM_Object*)ret)->p_coreObject = coreObj;
112     return ret;
113 }
114