MSN::Message Class Reference

#include <message.h>

List of all members.

Public Member Functions

 Message (std::string body, std::string mimeHeader="MIME-Version: 1.0\r\nContent-Type: text/plain; charset=UTF-8\r\n\r\n")
std::string asString () const
std::string operator[] (const std::string header) const
std::string getBody () const
std::string getFontName () const
void setFontName (const std::string &fontName)
std::vector< int > getColor () const
void setColor (std::vector< int > color)
int getFontEffects () const
void setFontEffects (int fontEffects)
CharacterSet getFontCharacterSet () const
void setFontCharacterSet (CharacterSet cs)
FontFamily getFontFamily () const
FontPitch getFontPitch () const
void setFontFamilyAndPitch (Message::FontFamily fontFamily, Message::FontPitch fontPitch)
bool isRightAligned () const


Detailed Description

This class represents an MSN message

It may or may not represent an instant message.

Todo:
Complete read/write support for formatting messages.

Constructor & Destructor Documentation

MSN::Message::Message ( std::string  body,
std::string  mimeHeader = "MIME-Version: 1.0\r\nContent-Type: text/plain; charset=UTF-8\r\n\r\n" 
)

Create a message with the specified body and mimeHeader.


Member Function Documentation

std::string MSN::Message::asString (  )  const

Convert the Message into a string.

This returns a string containing the MIME headers separated from the message body by a blank line.

std::string MSN::Message::getBody (  )  const [inline]

Return the body portion of this Message.

std::vector< int > MSN::Message::getColor (  )  const

Get the color used in this Message.

Message::CharacterSet MSN::Message::getFontCharacterSet (  )  const

Return the character set that the font uses in this Message.

int MSN::Message::getFontEffects (  )  const

Return the font effects used in this Message.

Returns:
An integer that is a bitwise-or of Message::FontEffects members.

Message::FontFamily MSN::Message::getFontFamily (  )  const

Return the font family used in this Message.

std::string MSN::Message::getFontName (  )  const

Return the font name used in this Message.

Returns:
The font name used for this Message, or "" if none specified.

Message::FontPitch MSN::Message::getFontPitch (  )  const

Return the font pitch used in this Message.

bool MSN::Message::isRightAligned (  )  const

Is the Message to be right-aligned?

std::string MSN::Message::operator[] ( const std::string  header  )  const

Return the value of the MIME header named header.

Returns:
The value of the MIME header if present, or "" if not found.

void MSN::Message::setColor ( std::vector< int >  color  ) 

Set the color used in this Message.

void MSN::Message::setFontCharacterSet ( CharacterSet  cs  ) 

Set the character set that the font should use for this Message.

void MSN::Message::setFontEffects ( int  fontEffects  ) 

Set the font effects for use in this Message.

Parameters:
fontEffects Bitwise-or of Message::FontEffects members.

void MSN::Message::setFontFamilyAndPitch ( Message::FontFamily  fontFamily,
Message::FontPitch  fontPitch 
)

Set the font family and pitch to be used for this Message.

void MSN::Message::setFontName ( const std::string &  fontName  ) 

Set font name for use in this Message.


Generated on Wed Jul 22 17:19:56 2009 for libmsn by  doxygen 1.5.9