2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #ifndef FormDataList_h
22 #define FormDataList_h
26 #include "TextEncoding.h"
32 FormDataList(const TextEncoding
&);
34 void appendData(const String
& key
, const String
& value
)
35 { appendString(key
); appendString(value
); }
36 void appendData(const String
& key
, const CString
& value
)
37 { appendString(key
); appendString(value
); }
38 void appendData(const String
& key
, int value
)
39 { appendString(key
); appendString(String::number(value
)); }
40 void appendFile(const String
& key
, PassRefPtr
<File
> file
)
41 { appendString(key
); m_list
.append(file
); }
46 Item(const CString
& data
) : m_data(data
) { }
47 Item(PassRefPtr
<File
> file
) : m_file(file
) { }
49 const CString
& data() const { return m_data
; }
50 File
* file() const { return m_file
.get(); }
57 const Vector
<Item
>& list() const { return m_list
; }
60 void appendString(const CString
&);
61 void appendString(const String
&);
63 TextEncoding m_encoding
;
67 } // namespace WebCore
69 #endif // FormDataList_h