#include <HttpCollection.h>
|
virtual bool | onFileStart (const PartHeader &header, void **ppCallbackData, String &strCallbackError) |
virtual bool | onFileData (const void *pData, size_t nSize, void *pCallbackData, String &strCallbackError) |
virtual bool | onFileEnd (const PartHeader &header, void *pCallbackData, bool bDataSuccess, String &strCallbackError) |
virtual | ~Object () |
| Object () |
Definition at line 223 of file HttpCollection.h.
◆ BufferedHttpFormData()
BufferedHttpFormData::BufferedHttpFormData |
( |
| ) |
|
Definition at line 900 of file HttpCollection.cpp.
901{
902 __handle = new PointerArray();
904}
#define __DCL_ASSERT(expr)
◆ ~BufferedHttpFormData()
BufferedHttpFormData::~BufferedHttpFormData |
( |
| ) |
|
|
virtual |
Definition at line 906 of file HttpCollection.cpp.
907{
909 PointerArray* p =
__V();
910 PointerArray& v = *p;
911 for(size_t i = 0; i < v.size(); i++)
912 delete (FileInfoArray*)v[i];
913 v.clear();
914 delete p;
915}
◆ byName()
BufferedHttpFormData::FileInfoArray & BufferedHttpFormData::byName |
( |
const wchar_t * | _name | ) |
|
Definition at line 938 of file HttpCollection.cpp.
940{
942
943 FileInfoArray* pV =
NULL;
944 PointerArray& v = *(PointerArray*)__handle;
945 for(size_t i = 0; i < v.size(); i++)
946 {
947 pV = (FileInfoArray*)(v[i]);
948 if (pV->__name == _name)
949 return *pV;
950 }
951
952 pV = new FileInfoArray(_name);
953 v.add(pV);
954 return *pV;
955}
◆ isEmpty()
bool BufferedHttpFormData::isEmpty |
( |
| ) |
const |
◆ onFileData()
bool BufferedHttpFormData::onFileData |
( |
const void * | pData, |
|
|
size_t | nSize, |
|
|
void * | pCallbackData, |
|
|
String & | strCallbackError ) |
|
protectedvirtual |
Reimplemented from HttpFormData.
Definition at line 983 of file HttpCollection.cpp.
989{
990 BytesOutputStream* pOut = (BytesOutputStream*)pCallbackData;
992
993 try {
994 pOut->write(pData, nSize);
995 }
996 catch(IOException* e) {
997 delete pOut;
998
1001 return false;
1002 }
1003
1004 return true;
1005}
virtual String toString() const
◆ onFileEnd()
bool BufferedHttpFormData::onFileEnd |
( |
const PartHeader & | header, |
|
|
void * | pCallbackData, |
|
|
bool | bDataSuccess, |
|
|
String & | strCallbackError ) |
|
protectedvirtual |
Reimplemented from HttpFormData.
Definition at line 1007 of file HttpCollection.cpp.
1013{
1014 BytesOutputStream* pOut = (BytesOutputStream*)pCallbackData;
1016
1017 if (bDataSuccess) {
1018 FileInfo* pInfo = new FileInfo;
1019
1020 pInfo->filename = header.filename;
1021 pInfo->contentType = header.contentType;
1022 pInfo->fileData = pOut->toByteString();
1023
1024 delete pOut;
1025
1026 insert(header.name, pInfo);
1027 }
1028
1029 return true;
1030}
◆ onFileStart()
bool BufferedHttpFormData::onFileStart |
( |
const PartHeader & | header, |
|
|
void ** | ppCallbackData, |
|
|
String & | strCallbackError ) |
|
protectedvirtual |
Reimplemented from HttpFormData.
Definition at line 969 of file HttpCollection.cpp.
974{
975 BytesOutputStream* pOut = new BytesOutputStream;
977
978 *ppCallbackData = pOut;
979
980 return true;
981}
◆ operator[]()
BufferedHttpFormData::FileInfoArray & BufferedHttpFormData::operator[] |
( |
size_t | _index | ) |
|
◆ size()
size_t BufferedHttpFormData::size |
( |
| ) |
const |
The documentation for this class was generated from the following files: