Public Types | Public Member Functions | Static Public Member Functions

Swift::IQ Class Reference

Inheritance diagram for Swift::IQ:
Collaboration diagram for Swift::IQ:

List of all members.

Public Types

enum  Type { Get, Set, Result, Error }
typedef boost::shared_ptr< IQref

Public Member Functions

 IQ (Type type=Get)
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

Static Public Member Functions

static boost::shared_ptr< IQcreateRequest (Type type, const JID &to, const std::string &id, boost::shared_ptr< Payload > payload)
static boost::shared_ptr< IQcreateResult (const JID &to, const std::string &id, boost::shared_ptr< Payload > payload=boost::shared_ptr< Payload >())
static boost::shared_ptr< IQcreateResult (const JID &to, const JID &from, const std::string &id, boost::shared_ptr< Payload > payload=boost::shared_ptr< Payload >())
static boost::shared_ptr< IQcreateError (const JID &to, const std::string &id, ErrorPayload::Condition condition=ErrorPayload::BadRequest, ErrorPayload::Type type=ErrorPayload::Cancel, boost::shared_ptr< Payload > payload=boost::shared_ptr< Payload >())
static boost::shared_ptr< IQcreateError (const JID &to, const JID &from, const std::string &id, ErrorPayload::Condition condition=ErrorPayload::BadRequest, ErrorPayload::Type type=ErrorPayload::Cancel, boost::shared_ptr< Payload > payload=boost::shared_ptr< Payload >())

Detailed Description

Definition at line 16 of file IQ.h.


Member Typedef Documentation

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

Reimplemented from Swift::Stanza.

Definition at line 18 of file IQ.h.


Member Enumeration Documentation

Enumerator:
Get 
Set 
Result 
Error 

Definition at line 20 of file IQ.h.


Constructor & Destructor Documentation

Swift::IQ::IQ ( Type  type = Get  )  [inline]

Definition at line 22 of file IQ.h.


Member Function Documentation

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

Definition at line 57 of file Stanza.h.

static boost::shared_ptr<IQ> Swift::IQ::createError ( const JID to,
const std::string &  id,
ErrorPayload::Condition  condition = ErrorPayload::BadRequest,
ErrorPayload::Type  type = ErrorPayload::Cancel,
boost::shared_ptr< Payload payload = boost::shared_ptr< Payload >() 
) [static]
static boost::shared_ptr<IQ> Swift::IQ::createError ( const JID to,
const JID from,
const std::string &  id,
ErrorPayload::Condition  condition = ErrorPayload::BadRequest,
ErrorPayload::Type  type = ErrorPayload::Cancel,
boost::shared_ptr< Payload payload = boost::shared_ptr< Payload >() 
) [static]
static boost::shared_ptr<IQ> Swift::IQ::createRequest ( Type  type,
const JID to,
const std::string &  id,
boost::shared_ptr< Payload payload 
) [static]
static boost::shared_ptr<IQ> Swift::IQ::createResult ( const JID to,
const std::string &  id,
boost::shared_ptr< Payload payload = boost::shared_ptr< Payload >() 
) [static]
static boost::shared_ptr<IQ> Swift::IQ::createResult ( const JID to,
const JID from,
const std::string &  id,
boost::shared_ptr< Payload payload = boost::shared_ptr< Payload >() 
) [static]
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.

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::IQ::getType (  )  const [inline]

Definition at line 24 of file IQ.h.

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::Stanza::setTo ( const JID to  )  [inline, inherited]

Definition at line 69 of file Stanza.h.

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

Definition at line 25 of file IQ.h.

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