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_Blob.h"
24 #include "WebKitDOM_Blob_Private.h"
28 #include "WebKitDOM_String.h"
29 #include "WebKitDOM_String_Private.h"
30 #include "wtf/text/AtomicString.h"
31 #include <wtf/text/CString.h>
32 #include <wtf/GetPtr.h>
33 #include <wtf/RefPtr.h>
35 unsigned long long ewk_webkitdom_blob_get_size(WebKitDOM_Blob* self)
40 WebCore::Blob* coreObj = _to_webcore_blob(self);
41 return coreObj->size();
44 void ewk_webkitdom_blob_get_type(WebKitDOM_Blob* self, WebKitDOM_String* ret)
49 WebCore::Blob* coreObj = _to_webcore_blob(self);
50 WTF::String result = coreObj->type();
51 _to_webkit_string(&result, ret);
55 void ewk_webkitdom_blob_deinit(const WebKitDOM_Object* objPtr)
57 if( WEBKITDOM_ISNULL(objPtr) )
59 ((WebCore::Blob*)(objPtr->p_coreObject))->deref();
60 (((WebKitDOM_Object*)(objPtr))->p_coreObject) = 0;
63 void _copy_webkit_blob(WebKitDOM_Blob* kitObjSrc, WebKitDOM_Blob* ret)
65 if (WEBKITDOM_COREOBJ(kitObjSrc) == WEBKITDOM_COREOBJ(ret))
67 WebCore::Blob* tmpPtr = _to_webcore_blob(ret);
70 if (!WEBKITDOM_ISNULL(kitObjSrc))
71 _to_webcore_blob(kitObjSrc)->ref();
72 ((WebKitDOM_Object*)ret)->p_coreObject = WEBKITDOM_COREOBJ(kitObjSrc);
75 WebCore::Blob* _to_webcore_blob(const WebKitDOM_Blob* kitObj)
77 return (WebCore::Blob*)WEBKITDOM_COREOBJ(kitObj);
80 WebKitDOM_Blob* _to_webkit_blob(WebCore::Blob* coreObj, WebKitDOM_Blob* ret)
82 WebCore::Blob* tmpPtr = _to_webcore_blob(ret);
83 if (tmpPtr && tmpPtr != coreObj)
87 ((WebKitDOM_Object*)ret)->p_coreObject = coreObj;