Public Types | |
enum | Type { Get, Set, Result, Error } |
typedef boost::shared_ptr< IQ > | ref |
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< Payload > | getPayloadOfSameType (boost::shared_ptr< Payload >) const |
const JID & | getFrom () const |
void | setFrom (const JID &from) |
const JID & | getTo () 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< IQ > | createRequest (Type type, const JID &to, const std::string &id, boost::shared_ptr< Payload > payload) |
static boost::shared_ptr< IQ > | createResult (const JID &to, const std::string &id, boost::shared_ptr< Payload > payload=boost::shared_ptr< Payload >()) |
static boost::shared_ptr< IQ > | createResult (const JID &to, const JID &from, const std::string &id, boost::shared_ptr< Payload > payload=boost::shared_ptr< Payload >()) |
static boost::shared_ptr< 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 boost::shared_ptr< 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 >()) |
Definition at line 16 of file IQ.h.
typedef boost::shared_ptr<IQ> Swift::IQ::ref |
Reimplemented from Swift::Stanza.
enum Swift::IQ::Type |
void Swift::Stanza::addPayload | ( | boost::shared_ptr< Payload > | payload | ) | [inline, inherited] |
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] |
Referenced by Swift::Responder< T >::sendError().
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] |
Referenced by Swift::Responder< T >::sendResponse().
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] |
const std::string& Swift::Stanza::getID | ( | ) | const [inline, inherited] |
boost::shared_ptr<T> Swift::Stanza::getPayload | ( | ) | const [inline, inherited] |
boost::shared_ptr<Payload> Swift::Stanza::getPayloadOfSameType | ( | boost::shared_ptr< Payload > | ) | const [inherited] |
std::vector< boost::shared_ptr<T> > Swift::Stanza::getPayloads | ( | ) | const [inline, inherited] |
const std::vector< boost::shared_ptr<Payload> >& Swift::Stanza::getPayloads | ( | ) | const [inline, inherited] |
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] |
void Swift::Stanza::setFrom | ( | const JID & | from | ) | [inline, inherited] |
void Swift::Stanza::setID | ( | const std::string & | id | ) | [inline, inherited] |
void Swift::Stanza::setTo | ( | const JID & | to | ) | [inline, inherited] |
void Swift::Stanza::updatePayload | ( | boost::shared_ptr< Payload > | payload | ) | [inherited] |
Referenced by Swift::Message::setBody(), and Swift::Message::setSubject().