tizen beta release
[framework/web/webkit-efl.git] / Source / WebKit / chromium / public / WebBlobData.h
index b6a665a..a17a4fc 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2011 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WebBlobData_h
-#define WebBlobData_h
-
-#include "WebThreadSafeData.h"
-#include "WebString.h"
-#include "WebURL.h"
-
-#if WEBKIT_IMPLEMENTATION
-namespace WebCore { class BlobData; }
-namespace WTF { template <typename T> class PassOwnPtr; }
+#ifndef WEBKIT_MIGRATE_HEADERS_TO_PLATFORM
+#include "platform/WebBlobData.h"
 #endif
-
-namespace WebKit {
-
-class WebBlobDataPrivate;
-
-class WebBlobData {
-public:
-    struct Item {
-        enum { TypeData, TypeFile, TypeBlob } type;
-        WebThreadSafeData data;
-        WebString filePath;
-        WebURL blobURL;
-        long long offset;
-        long long length; // -1 means go to the end of the file/blob.
-        double expectedModificationTime; // 0.0 means that the time is not set.
-    };
-
-    ~WebBlobData() { reset(); }
-
-    WebBlobData() : m_private(0) { }
-
-    WEBKIT_EXPORT void initialize();
-    WEBKIT_EXPORT void reset();
-
-    bool isNull() const { return !m_private; }
-
-    // Returns the number of items.
-    WEBKIT_EXPORT size_t itemCount() const;
-
-    // Retrieves the values of the item at the given index.  Returns false if
-    // index is out of bounds.
-    WEBKIT_EXPORT bool itemAt(size_t index, Item& result) const;
-
-    WEBKIT_EXPORT WebString contentType() const;
-
-    WEBKIT_EXPORT WebString contentDisposition() const;
-
-#if WEBKIT_IMPLEMENTATION
-    WebBlobData(const WTF::PassOwnPtr<WebCore::BlobData>&);
-    WebBlobData& operator=(const WTF::PassOwnPtr<WebCore::BlobData>&);
-    operator WTF::PassOwnPtr<WebCore::BlobData>();
-#endif
-
-private:
-#if WEBKIT_IMPLEMENTATION
-    void assign(const WTF::PassOwnPtr<WebCore::BlobData>&);
-#endif
-    WebBlobDataPrivate* m_private;
-};
-
-} // namespace WebKit
-
-#endif // WebBlobData_h