| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 void appendData(const String& key, const WTF::CString& value) | 39 void appendData(const String& key, const WTF::CString& value) |
| 40 { | 40 { |
| 41 appendString(key); | 41 appendString(key); |
| 42 appendString(value); | 42 appendString(value); |
| 43 } | 43 } |
| 44 void appendData(const String& key, int value) | 44 void appendData(const String& key, int value) |
| 45 { | 45 { |
| 46 appendString(key); | 46 appendString(key); |
| 47 appendString(String::number(value)); | 47 appendString(String::number(value)); |
| 48 } | 48 } |
| 49 void appendBlob(const String& key, PassRefPtr<Blob> blob) | 49 void appendBlob(const String& key, PassRefPtr<Blob>); |
| 50 { | |
| 51 appendString(key); | |
| 52 m_list.append(blob); | |
| 53 } | |
| 54 | 50 |
| 55 class Item { | 51 const BlobItemList& items() const { return m_items; } |
| 56 public: | |
| 57 Item() { } | |
| 58 Item(const WTF::CString& data) : m_data(data) { } | |
| 59 Item(PassRefPtr<Blob> blob) : m_blob(blob) { } | |
| 60 | |
| 61 const WTF::CString& data() const { return m_data; } | |
| 62 Blob* blob() const { return m_blob.get(); } | |
| 63 | |
| 64 private: | |
| 65 WTF::CString m_data; | |
| 66 RefPtr<Blob> m_blob; | |
| 67 }; | |
| 68 | |
| 69 const Vector<Item>& list() const { return m_list; } | |
| 70 const TextEncoding& encoding() const { return m_encoding; } | 52 const TextEncoding& encoding() const { return m_encoding; } |
| 71 | 53 |
| 72 private: | 54 private: |
| 73 void appendString(const WTF::CString&); | 55 void appendString(const WTF::CString&); |
| 74 void appendString(const String&); | 56 void appendString(const String&); |
| 75 | 57 |
| 76 TextEncoding m_encoding; | 58 TextEncoding m_encoding; |
| 77 Vector<Item> m_list; | 59 BlobItemList m_items; |
| 78 }; | 60 }; |
| 79 | 61 |
| 80 } // namespace WebCore | 62 } // namespace WebCore |
| 81 | 63 |
| 82 #endif // FormDataList_h | 64 #endif // FormDataList_h |
| OLD | NEW |