23 #include <utl/UtlString.h> 24 #include <utl/UtlDList.h> 27 #define CONTENT_TYPE_TEXT_PLAIN "text/plain" 28 #define CONTENT_TYPE_TEXT_HTML "text/html" 29 #define CONTENT_SMIME_PKCS7 "application/pkcs7-mime" 30 #define CONTENT_TYPE_PIDF "application/pidf+xml" 31 #define CONTENT_TYPE_MULTIPART "multipart/" 32 #define CONTENT_TYPE_MULTIPART_RELATED "multipart/related" 33 #define CONTENT_TYPE_CONTENT_INDIRECTION "message/external-body" 34 #define DIALOG_EVENT_CONTENT_TYPE "application/dialog-info+xml" 36 #define MULTIPART_BOUNDARY_PARAMETER "boundary" 38 #define MAX_HTTP_BODY_PARTS 20 76 const char* contentType = NULL);
101 const char* contentType,
102 const char* contentEncoding);
106 const UtlDList& parameters);
116 virtual void getBytes(
const char** bytes,
int* length)
const;
117 virtual void getBytes(UtlString* bytes,
int* length)
const;
118 virtual const char*
getBytes()
const;
157 static unsigned boundaryCounter;
159 static void nextBoundary(UtlString& boundary);
177 #endif // _HttpBody_h_ Definition: HttpBody.h:64
UtlBoolean getMultipartBytes(int partIndex, const char **bytes, int *length, int *start) const
Definition: HttpBody.cpp:496
virtual const char * getBytes() const
Definition: HttpBody.cpp:476
UtlString mMultipartBoundary
Definition: HttpBody.h:148
int mBodyPartCount
Definition: HttpBody.h:149
int bodyLength
Definition: HttpBody.h:146
MimeBodyPart * mpBodyParts[MAX_HTTP_BODY_PARTS]
Definition: HttpBody.h:150
Definition: HttpBody.h:69
int getMultipartCount() const
Definition: HttpBody.cpp:577
friend class HttpBodyMultipart
Definition: HttpBody.h:57
Definition: HttpBody.h:68
Definition: HttpBody.h:65
static HttpBody * copyBody(const HttpBody &sourceBody)
Copy the source HttpBody using the correct derived class constructor.
Definition: HttpBody.cpp:247
HttpBody(const char *bytes=NULL, int length=-1, const char *contentType=NULL)
Definition: HttpBody.cpp:53
virtual ~HttpBody()
Definition: HttpBody.cpp:200
BodyClassTypes getClassType() const
Definition: HttpBody.cpp:481
BodyClassTypes
Definition: HttpBody.h:62
#define MAX_HTTP_BODY_PARTS
Definition: HttpBody.h:38
Definition: HttpBody.h:66
Definition: HttpBody.h:165
const char * getMultipartBoundary() const
Get the multipart boundary string.
Definition: HttpBody.cpp:486
Definition: HttpBody.h:67
void appendBodyPart(const HttpBody &body, const UtlDList ¶meters)
Append a multipart body part to an existing multiparty body.
Definition: HttpBody.cpp:342
UtlBoolean isMultipart() const
Definition: HttpBody.cpp:583
BodyClassTypes mClassType
Definition: HttpBody.h:151
const MimeBodyPart * getMultipart(int partIndex) const
Definition: HttpBody.cpp:566
virtual int getLength() const
Definition: HttpBody.cpp:443
UtlString mBody
Definition: HttpBody.h:147
const char * getContentType() const
Get the content type string.
Definition: HttpBody.cpp:491
class to contain an HTTP body
Definition: HttpBody.h:55
Definition: MimeBodyPart.h:34
static HttpBody * createBody(const char *bodyBytes, int bodyBytesLength, const char *contentType, const char *contentEncoding)
Pseudo body factory.
Definition: HttpBody.cpp:291
HttpBody & operator=(const HttpBody &rhs)
Definition: HttpBody.cpp:217