#include <mime.h>
Inheritance diagram for PMIMEInfo:
Public Member Functions | |
PMIMEInfo (istream &strm) | |
PMIMEInfo (PInternetProtocol &socket) | |
virtual void | PrintOn (ostream &strm) const |
virtual void | ReadFrom (istream &strm) |
BOOL | SetAt (const char *key, const PString value) |
BOOL | SetAt (const PString &key, const PString value) |
BOOL | SetAt (const PCaselessString &key, const PString value) |
BOOL | Contains (const char *key) const |
BOOL | Contains (const PString &key) const |
BOOL | Contains (const PCaselessString &key) const |
BOOL | Read (PInternetProtocol &socket) |
BOOL | Write (PInternetProtocol &socket) const |
BOOL | AddMIME (const PString &line) |
PString | GetString (const PString &key, const PString &dflt) const |
long | GetInteger (const PString &key, long dflt=0) const |
void | SetInteger (const PCaselessString &key, long value) |
Static Public Member Functions | |
static void | SetAssociation (const PStringToString &allTypes, BOOL merge=TRUE) |
static void | SetAssociation (const PString &fileType, const PString &contentType) |
static PString | GetContentType (const PString &fileType) |
|
|
|
|
|
Add a MIME field given a "name: value" format string. Note that if the field name was already in the MIME dictionary then this will append the new value after a '
|
|
Determine if the specified key is present in the MIME information set.
|
|
Determine if the specified key is present in the MIME information set.
|
|
Determine if the specified key is present in the MIME information set.
|
|
Look up the file type to MIME content type association dictionary and return the MIME content type string. If the file type is not found in the dictionary then the string "application/octet-stream" is returned.
|
|
Get an integer value for the particular MIME info field with checking for existance. The dflt# parameter is substituted if the field does not exist in the MIME information read in.
|
|
Get a string for the particular MIME info field with checking for existance. The dflt# parameter is substituted if the field does not exist in the MIME information read in.
|
|
Output the contents of the MIME dictionary to the stream. This is primarily used by the standard #operator<<## function. |
|
Read MIME information from the socket.
|
|
Input the contents of the MIME dictionary from the stream. This is primarily used by the standard #operator>>## function. Reimplemented from PStringToString. |
|
|
|
Set an association between a file type and a MIME content type. The content type is then sent for any file in the directory sub-tree that has the same extension. Note that if the merge# parameter if TRUE then the dictionary is merged into the current association list and is not a simple replacement. The default values placed in this dictionary are: {verbatim} ".txt", "text/plain" ".text", "text/plain" ".html", "text/html" ".htm", "text/html" ".aif", "audio/aiff" ".aiff", "audio/aiff" ".au", "audio/basic" ".snd", "audio/basic" ".wav", "audio/wav" ".gif", "image/gif" ".xbm", "image/x-bitmap" ".tif", "image/tiff" ".tiff", "image/tiff" ".jpg", "image/jpeg" ".jpe", "image/jpeg" ".jpeg", "image/jpeg" ".avi", "video/avi" ".mpg", "video/mpeg" ".mpeg", "video/mpeg" ".qt", "video/quicktime" ".mov", "video/quicktime" {verbatim} The default content type will be "application/octet-stream". |
|
Add a new value to the MIME info. If the value is already in the dictionary then this overrides the previous value.
|
|
Add a new value to the MIME info. If the value is already in the dictionary then this overrides the previous value.
|
|
Add a new value to the MIME info. If the value is already in the dictionary then this overrides the previous value.
|
|
Set an integer value for the particular MIME info field. |
|
Write MIME information to the socket.
|