Public Types | Public Member Functions

Swift::Message Class Reference

Inheritance diagram for Swift::Message:
Collaboration diagram for Swift::Message:

List of all members.

Public Types

enum  Type {
  Normal, Chat, Error, Groupchat,
  Headline
}
typedef boost::shared_ptr
< Message
ref

Public Member Functions

 Message ()
std::string getSubject () const
void setSubject (const std::string &subject)
bool hasSubject ()
std::string getBody () const
void setBody (const std::string &body)
bool isError ()
Type getType () const
void setType (Type type)
template<typename T >
boost::shared_ptr< T > getPayload () const
template<typename T >
std::vector< boost::shared_ptr
< T > > 
getPayloads () const
const std::vector
< boost::shared_ptr< Payload > > & 
getPayloads () const
void addPayload (boost::shared_ptr< Payload > payload)
void updatePayload (boost::shared_ptr< Payload > payload)
boost::shared_ptr< PayloadgetPayloadOfSameType (boost::shared_ptr< Payload >) const
const JIDgetFrom () const
void setFrom (const JID &from)
const JIDgetTo () const
void setTo (const JID &to)
const std::string & getID () const
void setID (const std::string &id)
boost::optional
< boost::posix_time::ptime > 
getTimestamp () const
boost::optional
< boost::posix_time::ptime > 
getTimestampFrom (const JID &jid) const

Detailed Description

Definition at line 21 of file Message.h.


Member Typedef Documentation

typedef boost::shared_ptr<Message> Swift::Message::ref

Reimplemented from Swift::Stanza.

Definition at line 23 of file Message.h.


Member Enumeration Documentation

Enumerator:
Normal 
Chat 
Error 
Groupchat 
Headline 

Definition at line 25 of file Message.h.


Constructor & Destructor Documentation

Swift::Message::Message (  )  [inline]

Definition at line 27 of file Message.h.


Member Function Documentation

void Swift::Stanza::addPayload ( boost::shared_ptr< Payload payload  )  [inline, inherited]

Definition at line 57 of file Stanza.h.

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

Definition at line 45 of file Message.h.

const JID& Swift::Stanza::getFrom (  )  const [inline, inherited]

Definition at line 65 of file Stanza.h.

const std::string& Swift::Stanza::getID (  )  const [inline, inherited]

Definition at line 71 of file Stanza.h.

template<typename T >
boost::shared_ptr<T> Swift::Stanza::getPayload (  )  const [inline, inherited]

Definition at line 30 of file Stanza.h.

boost::shared_ptr<Payload> Swift::Stanza::getPayloadOfSameType ( boost::shared_ptr< Payload  )  const [inherited]
template<typename T >
std::vector< boost::shared_ptr<T> > Swift::Stanza::getPayloads (  )  const [inline, inherited]

Definition at line 41 of file Stanza.h.

const std::vector< boost::shared_ptr<Payload> >& Swift::Stanza::getPayloads (  )  const [inline, inherited]

Definition at line 53 of file Stanza.h.

std::string Swift::Message::getSubject (  )  const [inline]

Definition at line 29 of file Message.h.

boost::optional<boost::posix_time::ptime> Swift::Stanza::getTimestamp (  )  const [inherited]
boost::optional<boost::posix_time::ptime> Swift::Stanza::getTimestampFrom ( const JID jid  )  const [inherited]
const JID& Swift::Stanza::getTo (  )  const [inline, inherited]

Definition at line 68 of file Stanza.h.

Type Swift::Message::getType (  )  const [inline]

Definition at line 62 of file Message.h.

Referenced by isError().

bool Swift::Message::hasSubject (  )  [inline]

Definition at line 41 of file Message.h.

bool Swift::Message::isError (  )  [inline]

Definition at line 57 of file Message.h.

References Error, and getType().

void Swift::Message::setBody ( const std::string &  body  )  [inline]

Definition at line 53 of file Message.h.

References Swift::Stanza::updatePayload().

void Swift::Stanza::setFrom ( const JID from  )  [inline, inherited]

Definition at line 66 of file Stanza.h.

void Swift::Stanza::setID ( const std::string &  id  )  [inline, inherited]

Definition at line 72 of file Stanza.h.

void Swift::Message::setSubject ( const std::string &  subject  )  [inline]

Definition at line 37 of file Message.h.

References Swift::Stanza::updatePayload().

void Swift::Stanza::setTo ( const JID to  )  [inline, inherited]

Definition at line 69 of file Stanza.h.

void Swift::Message::setType ( Type  type  )  [inline]

Definition at line 63 of file Message.h.

void Swift::Stanza::updatePayload ( boost::shared_ptr< Payload payload  )  [inherited]

Referenced by setBody(), and setSubject().