htmlTextPart Class Reference

Text part of type 'text/html'. More...

Inheritance diagram for htmlTextPart:
Inheritance graph
[legend]
Collaboration diagram for htmlTextPart:
Collaboration graph
[legend]

List of all members.

Classes

class  embeddedObject
 Embedded object (eg: image for <IMG> tag). More...

Public Member Functions

 htmlTextPart ()
 ~htmlTextPart ()
const mediaType getType () const
const charsetgetCharset () const
void setCharset (const charset &ch)
const ref< const contentHandlergetPlainText () const
void setPlainText (ref< contentHandler > plainText)
const ref< const contentHandlergetText () const
void setText (ref< contentHandler > text)
bool hasObject (const string &id) const
const ref< const embeddedObjectfindObject (const string &id) const
int getObjectCount () const
const ref< const embeddedObjectgetObjectAt (const int pos) const
const string addObject (const string &data, const mediaType &type)
const string addObject (ref< contentHandler > data, const mediaType &type)
const string addObject (ref< contentHandler > data, const encoding &enc, const mediaType &type)
int getPartCount () const
void generateIn (ref< bodyPart > message, ref< bodyPart > parent) const
void parse (ref< const bodyPart > message, ref< const bodyPart > parent, ref< const bodyPart > textPart)

Detailed Description

Text part of type 'text/html'.


Constructor & Destructor Documentation

htmlTextPart (  ) 
~htmlTextPart (  ) 

Member Function Documentation

const string addObject ( ref< contentHandler data,
const encoding enc,
const mediaType type 
)

Embed an object and returns a string which identifies it.

The returned identifier is suitable for use in the 'src' attribute of an tag.

Parameters:
data object data
enc data encoding
type data type
Returns:
an unique object identifier used to identify the new object among all other embedded objects
const string addObject ( ref< contentHandler data,
const mediaType type 
)

Embed an object and returns a string which identifies it.

The returned identifier is suitable for use in the 'src' attribute of an tag.

Parameters:
data object data
type data type
Returns:
an unique object identifier used to identify the new object among all other embedded objects

References messageId::generateId(), and messageId::getId().

const string addObject ( const string data,
const mediaType type 
)

Embed an object and returns a string which identifies it.

The returned identifier is suitable for use in the 'src' attribute of an tag.

Deprecated:
Use the addObject() methods which take a 'contentHandler' parameter type instead.
Parameters:
data object data
type data type
Returns:
an unique object identifier used to identify the new object among all other embedded objects
const ref< const htmlTextPart::embeddedObject > findObject ( const string id  )  const

Return the embedded object with the specified identifier.

Exceptions:
exceptions::no_object_found() if no object has been found
Parameters:
id object identifier
Returns:
embedded object with the specified identifier
void generateIn ( ref< bodyPart message,
ref< bodyPart parent 
) const [virtual]

Generate the text part(s) into the specified message.

Parameters:
message the message
parent body part into which generate this part

Implements textPart.

References vmime::mediaTypes::TEXT, and vmime::mediaTypes::TEXT_HTML.

const charset & getCharset (  )  const [virtual]

Return the charset used to encode text in the text part.

Returns:
text charset

Implements textPart.

const ref< const htmlTextPart::embeddedObject > getObjectAt ( const int  pos  )  const

Return the embedded object at the specified position.

Parameters:
pos position of the embedded object
Returns:
embedded object at position 'pos'
int getObjectCount (  )  const

Return the number of embedded objects.

Returns:
number of embedded objects
int getPartCount (  )  const [virtual]

Return the actual body parts this text part is composed of.

For example, HTML parts are composed of two parts: one "text/html" part, and the plain text part "text/plain".

Returns:
number of body parts

Implements textPart.

const ref< const contentHandler > getPlainText (  )  const
const ref< const contentHandler > getText (  )  const [virtual]

Return the text contained in the part.

Returns:
text of the part

Implements textPart.

const mediaType getType (  )  const [virtual]

Return the type of text part (eg: "text/html").

Returns:
type of text part

Implements textPart.

bool hasObject ( const string id  )  const

Test the existence of an embedded object given its identifier.

Parameters:
id object identifier
Returns:
true if an object with this identifier exists, false otherwise
void parse ( ref< const bodyPart message,
ref< const bodyPart parent,
ref< const bodyPart textPart 
) [virtual]

Parse the text part(s) from the specified message.

Parameters:
message message containing the text part
parent part containing the text part
textPart actual text part

Implements textPart.

void setCharset ( const charset ch  )  [virtual]

Set the charset used to encode text in the text part.

Parameters:
ch text charset

Implements textPart.

void setPlainText ( ref< contentHandler plainText  ) 
void setText ( ref< contentHandler text  )  [virtual]

Set the text contained in the part.

Parameters:
text text of the part

Implements textPart.


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2