2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
5 Copyright (C) 2011 Samsung Electronics
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.
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.
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
23 #include "WebKitDOM_DOMMimeTypeArray.h"
24 #include "WebKitDOM_DOMMimeTypeArray_Private.h"
26 #include "DOMMimeType.h"
27 #include "DOMMimeTypeArray.h"
29 #include "WebKitDOM_DOMMimeType.h"
30 #include "WebKitDOM_DOMMimeType_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>
38 unsigned ewk_webkitdom_dommimetypearray_get_length(WebKitDOM_DOMMimeTypeArray* self)
43 WebCore::DOMMimeTypeArray* coreObj = _to_webcore_dommimetypearray(self);
44 return coreObj->length();
47 void ewk_webkitdom_dommimetypearray_item(WebKitDOM_DOMMimeTypeArray* self, unsigned index, WebKitDOM_DOMMimeType* ret)
52 WebCore::DOMMimeTypeArray* coreObj = _to_webcore_dommimetypearray(self);
53 RefPtr<WebCore::DOMMimeType> result = WTF::getPtr(coreObj->item(index));
54 _to_webkit_dommimetype(result.get(), ret);
58 void ewk_webkitdom_dommimetypearray_named_item(WebKitDOM_DOMMimeTypeArray* self, WebKitDOM_String* name, WebKitDOM_DOMMimeType* ret)
63 WebCore::DOMMimeTypeArray* coreObj = _to_webcore_dommimetypearray(self);
64 RefPtr<WebCore::DOMMimeType> result = WTF::getPtr(coreObj->namedItem(_to_webcore_string_value(name)));
65 _to_webkit_dommimetype(result.get(), ret);
70 void ewk_webkitdom_dommimetypearray_deinit(const WebKitDOM_Object* objPtr)
72 if( WEBKITDOM_ISNULL(objPtr) )
74 ((WebCore::DOMMimeTypeArray*)(objPtr->p_coreObject))->deref();
75 (((WebKitDOM_Object*)(objPtr))->p_coreObject) = 0;
78 void _copy_webkit_dommimetypearray(WebKitDOM_DOMMimeTypeArray* kitObjSrc, WebKitDOM_DOMMimeTypeArray* ret)
80 if (WEBKITDOM_COREOBJ(kitObjSrc) == WEBKITDOM_COREOBJ(ret))
82 WebCore::DOMMimeTypeArray* tmpPtr = _to_webcore_dommimetypearray(ret);
85 if (!WEBKITDOM_ISNULL(kitObjSrc))
86 _to_webcore_dommimetypearray(kitObjSrc)->ref();
87 ((WebKitDOM_Object*)ret)->p_coreObject = WEBKITDOM_COREOBJ(kitObjSrc);
90 WebCore::DOMMimeTypeArray* _to_webcore_dommimetypearray(const WebKitDOM_DOMMimeTypeArray* kitObj)
92 return (WebCore::DOMMimeTypeArray*)WEBKITDOM_COREOBJ(kitObj);
95 WebKitDOM_DOMMimeTypeArray* _to_webkit_dommimetypearray(WebCore::DOMMimeTypeArray* coreObj, WebKitDOM_DOMMimeTypeArray* ret)
97 WebCore::DOMMimeTypeArray* tmpPtr = _to_webcore_dommimetypearray(ret);
98 if (tmpPtr && tmpPtr != coreObj)
102 ((WebKitDOM_Object*)ret)->p_coreObject = coreObj;