257 ) { GetContentTypes().
SetAt(fileType, contentType); }
308 #endif // PTLIB_PMIME_H
virtual void PrintOn(ostream &strm) const
Output the contents of the MIME dictionary to the stream.
static const PCaselessString & ContentTypeTag()
bool DecodeMultiPartList(PMultiPartList &parts, const PString &body, const PCaselessString &key) const
Decode parts from a multipart body using the field value.
This class contains the Multipurpose Internet Mail Extensions parameters and variables.
Definition: mime.h:52
virtual bool InternalAddMIME(const PString &fieldName, const PString &fieldValue)
PString m_textBody
Definition: mime.h:291
bool GetComplex(const PString &key, PStringToString &info) const
Definition: mime.h:168
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
bool GetComplex(const char *key, PStringToString &info) const
Get a complex MIME field.
Definition: mime.h:164
static bool ParseComplex(const PString &str, PStringToString &info)
Parse the string as a complex field, see GetComplex()
This is a dictionary collection class of PString objects, keyed by another string.
Definition: pstring.h:2784
PBoolean Write(PInternetProtocol &socket) const
Write MIME information to the socket.
This class is a variation of a string that ignores case.
Definition: pstring.h:1708
bool AddMIME(const PString &line)
Add a MIME field given a "name: value" format string.
static PString GetContentType(const PString &fileType)
Look up the file type to MIME content type association dictionary and return the MIME content type st...
This template class maps the PAbstractList to a specific object type.
Definition: lists.h:321
PBYTEArray m_binaryBody
Definition: mime.h:292
A TCP/IP socket for process/application layer high level protocols.
Definition: inetprot.h:62
BOOL PBoolean
Definition: object.h:102
Array of unsigned characters.
Definition: array.h:670
Specialised version of PStringToString to contain a dictionary of options/attributes.
Definition: pstring.h:2845
static const PCaselessString & ContentDispositionTag()
PMIMEInfo m_mime
Definition: mime.h:290
static const PCaselessString & ContentTransferEncodingTag()
virtual ostream & PrintContents(ostream &strm) const
Output the contents without the trailing CRLF.
The character string class.
Definition: pstring.h:108
bool GetComplex(const PCaselessString &key, PStringToString &info) const
Definition: mime.h:172
PBoolean Read(PInternetProtocol &socket)
Read MIME information from the socket.
virtual PBoolean SetAt(const K &key, const PString &str)
Add a new object to the collection.
Definition: pstring.h:2590
bool AddMIME(const PString &fieldName, const PString &fieldValue)
Definition: mime.h:122
PMultiPartList()
Definition: mime.h:299
bool GetComplex(const PCaselessString &(*key)(), PStringToString &info) const
Definition: mime.h:176
static void SetAssociation(const PStringToString &allTypes, PBoolean merge=true)
Set an association between a file type and a MIME content type.
PString GetString(const char *key, const char *dflt=NULL) const
Get an option value.
Definition: pstring.h:2877
static const PCaselessString & ContentIdTag()
static void SetAssociation(const PString &fileType, const PString &contentType)
Definition: mime.h:254
bool DecodeMultiPartList(PMultiPartList &parts, const PString &body, const PCaselessString &(*key)()=ContentTypeTag) const
Decode parts from a multipart body using the field value.
Definition: mime.h:197
PMIMEInfo()
Definition: mime.h:55
static const PCaselessString & TextPlain()
This object describes the information associated with a multi-part bodies.
Definition: mime.h:286
virtual void ReadFrom(istream &strm)
Input the contents of the MIME dictionary from the stream.
PString AsString() const
Return a string presentation of the MIME.
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
static const PCaselessString & ContentDescriptionTag()