Qore Mime Module Reference  1.3.2
 All Classes Namespaces Functions Variables Groups Pages
Mime::MultiPartRelatedMessage Class Reference

implements a MultiPartRelatedMessage class, a specialization of MultiPartMessage More...

Inheritance diagram for Mime::MultiPartRelatedMessage:

Public Member Functions

 addPart (data data, string id, string content_type, *hash hdr)
 adds a message part to the end of the list More...
 
 constructor (string boundary=MultiPartMessage::getBoundary())
 creates the object More...
 
hash getMsgAndHeaders ()
 returns a hash of the message More...
 
 splicePart (data data, string id, string content_type, *hash hdr)
 adds a message part to the start of the list More...
 
- Public Member Functions inherited from Mime::MultiPartMessage
 constructor (string mptype, string boundary=MultiPartMessage::getBoundary())
 creates the object More...
 
binary serialize ()
 serializes the message and returns a binary object ready to send over a socket
 

Additional Inherited Members

- Static Public Member Functions inherited from Mime::MultiPartMessage
static string getBoundary ()
 returns a string embedded with the current timestamp designed to be used as MultiPart boundary string
 
static string getRandomString (int len)
 returns a string of random characters More...
 
static hash parseBody (string boundary, string body, bool decode=True)
 returns a hash representing a parsed multipart message body from a boundary string and body arguments More...
 
static binary serializeHeaders (hash hdr)
 serializes a header hash to a binary object More...
 

Detailed Description

implements a MultiPartRelatedMessage class, a specialization of MultiPartMessage

Member Function Documentation

Mime::MultiPartRelatedMessage::addPart ( data  data,
string  id,
string  content_type,
*hash  hdr 
)

adds a message part to the end of the list

Parameters
datathe data for the part
idthe multipart/related ID for the part
content_typethe content_type for the part
hdran optional hash of headers for the part
Exceptions
MULTIPART-RELATED-ERRORif the id parameter is empty, this exception is thrown
Mime::MultiPartRelatedMessage::constructor ( string  boundary = MultiPartMessage::getBoundary())

creates the object

Parameters
boundarythe boundary to use between parts
hash Mime::MultiPartRelatedMessage::getMsgAndHeaders ( )

returns a hash of the message

Returns
a hash of the message with the following keys:
  • hdr: a hash of header information
  • msg: a binary object of serialized message parts
Mime::MultiPartRelatedMessage::splicePart ( data  data,
string  id,
string  content_type,
*hash  hdr 
)

adds a message part to the start of the list

Parameters
datathe data for the part
idthe multipart/related ID for the part
content_typethe content_type for the part
hdran optional hash of headers for the part
Exceptions
MULTIPART-RELATED-ERRORif the id parameter is empty, this exception is thrown