All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
xmpp.h
Go to the documentation of this file.
/*
* xmpp.h
*
* Extensible Messaging and Presence Protocol (XMPP) Core
*
* Portable Windows Library
*
* Copyright (c) 2004 Reitek S.p.A.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Portable Windows Library.
*
* The Initial Developer of the Original Code is Post Increment
*
* Contributor(s): ______________________________________.
*
* $Revision: 25387 $
* $Author: rjongbloed $
* $Date: 2011-03-22 22:51:09 -0500 (Tue, 22 Mar 2011) $
*/
#ifndef PTLIB_XMPP_H
#define PTLIB_XMPP_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#include <ptlib.h>
#if P_EXPAT
#include <ptclib/pxml.h>
#include <ptlib/notifier_ext.h>
namespace XMPP
{
extern const PCaselessString & LanguageTag();
extern const PCaselessString & NamespaceTag();
extern const PCaselessString & MessageStanzaTag();
extern const PCaselessString & PresenceStanzaTag();
extern const PCaselessString & IQStanzaTag();
extern const PCaselessString & IQQueryTag();
class JID : public PObject
{
PCLASSINFO(JID, PObject);
public:
JID(const char * jid = 0);
JID(const PString& jid);
JID(const PString& user, const PString& server, const PString& resource = PString::Empty());
virtual Comparison Compare(
const PObject & obj
) const;
JID& operator=(
const PString & jid
);
operator const PString&() const;
virtual PObject * Clone() const { return new JID(m_JID); }
PString GetUser() const { return m_User; }
PString GetServer() const { return m_Server; }
virtual PString GetResource() const { return m_Resource; }
virtual void SetUser(const PString& user);
virtual void SetServer(const PString& server);
virtual void SetResource(const PString& resource);
virtual PBoolean IsBare() const { return m_Resource.IsEmpty(); }
virtual void PrintOn(ostream & strm) const;
protected:
virtual void ParseJID(const PString& jid);
virtual void BuildJID() const;
PString m_User;
PString m_Server;
PString m_Resource;
mutable PString m_JID;
mutable PBoolean m_IsDirty;
};
// A bare jid is a jid with no resource
class BareJID : public JID
{
PCLASSINFO(BareJID, JID);
public:
BareJID(const char * jid = 0) : JID(jid) { }
BareJID(const PString& jid) : JID(jid) { }
BareJID(const PString& user, const PString& server, const PString& resource = PString::Empty())
: JID(user, server, resource) { }
virtual Comparison Compare(
const PObject & obj
) const;
BareJID& operator=(
const PString & jid
);
virtual PObject * Clone() const { return new BareJID(m_JID); }
virtual PString GetResource() const { return PString::Empty(); }
virtual void SetResource(const PString&) { }
virtual PBoolean IsBare() const { return true; }
};
class Transport : public PIndirectChannel
{
PCLASSINFO(Transport, PIndirectChannel);
public:
virtual PBoolean Open() = 0;
virtual PBoolean Close() = 0;
};
class Stream : public PIndirectChannel
{
PCLASSINFO(Stream, PIndirectChannel);
public:
Stream(Transport * transport = 0);
~Stream();
virtual PBoolean OnOpen() { return m_OpenHandlers.Fire(*this); }
PNotifierList& OpenHandlers() { return m_OpenHandlers; }
virtual PBoolean Close();
virtual void OnClose() { m_CloseHandlers.Fire(*this); }
PNotifierList& CloseHandlers() { return m_CloseHandlers; }
virtual PBoolean Write(const void * buf, PINDEX len);
virtual PBoolean Write(const PString& data);
virtual PBoolean Write(const PXML& pdu);
virtual PXML * Read();
virtual void Reset();
PXMLStreamParser * GetParser() { return m_Parser; }
protected:
PXMLStreamParser * m_Parser;
PNotifierList m_OpenHandlers;
PNotifierList m_CloseHandlers;
};
class BaseStreamHandler : public PThread
{
PCLASSINFO(BaseStreamHandler, PThread);
public:
BaseStreamHandler();
~BaseStreamHandler();
virtual PBoolean Start(Transport * transport = 0);
virtual PBoolean Stop(const PString& error = PString::Empty());
void SetAutoReconnect(PBoolean b = true, long timeout = 1000);
PNotifierList& ElementHandlers() { return m_ElementHandlers; }
Stream * GetStream() { return m_Stream; }
virtual PBoolean Write(const void * buf, PINDEX len);
virtual PBoolean Write(const PString& data);
virtual PBoolean Write(const PXML& pdu);
virtual void OnElement(PXML& pdu);
virtual void Main();
protected:
PDECLARE_NOTIFIER(Stream, BaseStreamHandler, OnOpen);
PDECLARE_NOTIFIER(Stream, BaseStreamHandler, OnClose);
Stream * m_Stream;
PBoolean m_AutoReconnect;
PTimeInterval m_ReconnectTimeout;
PNotifierList m_ElementHandlers;
};
class Stanza : public PXML
{
PCLASSINFO(Stanza, PXML)
public:
static const PCaselessString & IDTag();
static const PCaselessString & FromTag();
static const PCaselessString & ToTag();
virtual PBoolean IsValid() const = 0;
virtual PString GetID() const;
virtual PString GetFrom() const;
virtual PString GetTo() const;
virtual void SetID(const PString& id);
virtual void SetFrom(const PString& from);
virtual void SetTo(const PString& to);
virtual PXMLElement * GetElement(const PString& name, PINDEX i = 0);
virtual void AddElement(PXMLElement * elem);
static PString GenerateID();
};
PLIST(StanzaList, Stanza);
class Message : public Stanza
{
PCLASSINFO(Message, Stanza)
public:
enum MessageType {
Normal,
Chat,
Error,
GroupChat,
HeadLine,
Unknown = 999
};
static const PCaselessString & TypeTag();
static const PCaselessString & SubjectTag();
static const PCaselessString & BodyTag();
static const PCaselessString & ThreadTag();
Message();
Message(PXML& pdu);
Message(PXML * pdu);
virtual PBoolean IsValid() const;
static PBoolean IsValid(const PXML * pdu);
virtual MessageType GetType(PString * typeName = 0) const;
virtual PString GetLanguage() const;
virtual PString GetSubject(const PString& lang = PString::Empty());
virtual PString GetBody(const PString& lang = PString::Empty());
virtual PString GetThread();
virtual PXMLElement * GetSubjectElement(const PString& lang = PString::Empty());
virtual PXMLElement * GetBodyElement(const PString& lang = PString::Empty());
virtual void SetType(MessageType type);
virtual void SetType(const PString& type); // custom, possibly non standard, type
virtual void SetLanguage(const PString& lang);
virtual void SetSubject(const PString& subj, const PString& lang = PString::Empty());
virtual void SetBody(const PString& body, const PString& lang = PString::Empty());
virtual void SetThread(const PString& thrd);
};
class Presence : public Stanza
{
PCLASSINFO(Presence, Stanza)
public:
enum PresenceType {
Available,
Unavailable,
Subscribe,
Subscribed,
Unsubscribe,
Unsubscribed,
Probe,
Error,
Unknown = 999
};
enum ShowType {
Online,
Away,
Chat,
DND,
XA,
Other = 999
};
static const PCaselessString & TypeTag();
static const PCaselessString & ShowTag();
static const PCaselessString & StatusTag();
static const PCaselessString & PriorityTag();
Presence();
Presence(PXML& pdu);
Presence(PXML * pdu);
virtual PBoolean IsValid() const;
static PBoolean IsValid(const PXML * pdu);
virtual PresenceType GetType(PString * typeName = 0) const;
virtual ShowType GetShow(PString * showName = 0) const;
virtual BYTE GetPriority() const;
virtual PString GetStatus(const PString& lang = PString::Empty());
virtual PXMLElement * GetStatusElement(const PString& lang = PString::Empty());
virtual void SetType(PresenceType type);
virtual void SetType(const PString& type); // custom, possibly non standard, type
virtual void SetShow(ShowType show);
virtual void SetShow(const PString& show); // custom, possibly non standard, type
virtual void SetPriority(BYTE priority);
virtual void SetStatus(const PString& status, const PString& lang = PString::Empty());
};
class IQ : public Stanza
{
PCLASSINFO(IQ, Stanza)
public:
enum IQType {
Get,
Set,
Result,
Error,
Unknown = 999
};
static const PCaselessString & TypeTag();
IQ(IQType type, PXMLElement * body = 0);
IQ(PXML& pdu);
IQ(PXML * pdu);
~IQ();
virtual PBoolean IsValid() const;
static PBoolean IsValid(const PXML * pdu);
void SetProcessed() { m_Processed = true; }
PBoolean HasBeenProcessed() const { return m_Processed; }
virtual IQType GetType(PString * typeName = 0) const;
virtual PXMLElement * GetBody();
virtual void SetType(IQType type);
virtual void SetType(const PString& type); // custom, possibly non standard, type
virtual void SetBody(PXMLElement * body);
// If the this message is response, returns a pointer to the
// original set/get message
virtual IQ * GetOriginalMessage() const { return m_OriginalIQ; }
virtual void SetOriginalMessage(IQ * iq);
virtual IQ * BuildResult() const;
virtual IQ * BuildError(const PString& type, const PString& code) const;
virtual PNotifierList GetResponseHandlers() { return m_ResponseHandlers; }
protected:
PBoolean m_Processed;
IQ * m_OriginalIQ;
PNotifierList m_ResponseHandlers;
};
namespace Disco
{
class Item : public PObject
{
PCLASSINFO(Item, PObject);
public:
Item(PXMLElement * item);
Item(const PString& jid, const PString& node = PString::Empty());
const JID& GetJID() const { return m_JID; }
const PString& GetNode() const { return m_Node; }
PXMLElement * AsXML(PXMLElement * parent) const;
protected:
const JID m_JID;
const PString m_Node;
};
PDECLARE_LIST(ItemList, Item)
public:
ItemList(PXMLElement * list);
PXMLElement * AsXML(PXMLElement * parent) const;
};
class Identity : public PObject
{
PCLASSINFO(Identity, PObject);
public:
Identity(PXMLElement * identity);
Identity(const PString& category, const PString& type, const PString& name);
const PString& GetCategory() const { return m_Category; }
const PString& GetType() const { return m_Type; }
const PString& GetName() const { return m_Name; }
PXMLElement * AsXML(PXMLElement * parent) const;
protected:
const PString m_Category;
const PString m_Type;
const PString m_Name;
};
PDECLARE_LIST(IdentityList, Identity)
public:
IdentityList(PXMLElement * list);
PXMLElement * AsXML(PXMLElement * parent) const;
};
class Info : public PObject
{
PCLASSINFO(Info, PObject);
public:
Info(PXMLElement * info);
IdentityList& GetIdentities() { return m_Identities; }
PStringSet& GetFeatures() { return m_Features; }
PXMLElement * AsXML(PXMLElement * parent) const;
protected:
IdentityList m_Identities;
PStringSet m_Features;
};
} // namespace Disco
}; // class XMPP
#endif // P_EXPAT
#endif // PTLIB_XMPP_H
// End of File ///////////////////////////////////////////////////////////////
XMPP::Presence::PriorityTag
static const PCaselessString & PriorityTag()
XMPP::IQ::Unknown
Definition: xmpp.h:389
XMPP::BaseStreamHandler::ElementHandlers
PNotifierList & ElementHandlers()
Definition: xmpp.h:196
XMPP::JID::SetUser
virtual void SetUser(const PString &user)
XMPP::JID::JID
JID(const char *jid=0)
XMPP::IQ::SetType
virtual void SetType(IQType type)
XMPP::Transport::Close
virtual PBoolean Close()=0
Close the channel.
XMPP::BaseStreamHandler::SetAutoReconnect
void SetAutoReconnect(PBoolean b=true, long timeout=1000)
XMPP::Message::SubjectTag
static const PCaselessString & SubjectTag()
XMPP::BareJID::BareJID
BareJID(const char *jid=0)
Definition: xmpp.h:110
XMPP::Message::TypeTag
static const PCaselessString & TypeTag()
Various constant strings.
XMPP::Presence::SetStatus
virtual void SetStatus(const PString &status, const PString &lang=PString::Empty())
XMPP::Message::HeadLine
Definition: xmpp.h:262
XMPP::Stream::m_OpenHandlers
PNotifierList m_OpenHandlers
Definition: xmpp.h:178
XMPP::IQQueryTag
const PCaselessString & IQQueryTag()
PTimeInterval
This class defines an arbitrary time interval to millisecond accuracy.
Definition: timeint.h:55
XMPP::Message::SetType
virtual void SetType(MessageType type)
XMPP::IQ::~IQ
~IQ()
XMPP::Presence::Unsubscribe
Definition: xmpp.h:321
PXMLStreamParser
Definition: pxml.h:515
XMPP::Identity::m_Category
const PString m_Category
Definition: xmpp.h:481
XMPP::Presence::XA
Definition: xmpp.h:333
PCLASSINFO
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
XMPP::JID::m_User
PString m_User
Definition: xmpp.h:96
XMPP::Message::GetType
virtual MessageType GetType(PString *typeName=0) const
XMPP::Message::Unknown
Definition: xmpp.h:263
XMPP::IQ::BuildResult
virtual IQ * BuildResult() const
Creates a new response iq for this message (that must be of the set/get type!)
notifier_ext.h
XMPP::BaseStreamHandler::GetStream
Stream * GetStream()
Definition: xmpp.h:197
XMPP::NamespaceTag
const PCaselessString & NamespaceTag()
XMPP::Stanza::ToTag
static const PCaselessString & ToTag()
XMPP::Message::ThreadTag
static const PCaselessString & ThreadTag()
XMPP::Message::SetThread
virtual void SetThread(const PString &thrd)
XMPP::Identity::m_Type
const PString m_Type
Definition: xmpp.h:482
XMPP::Stream
This class represents a XMPP stream, i.e.
Definition: xmpp.h:147
XMPP::BaseStreamHandler::m_Stream
Stream * m_Stream
Definition: xmpp.h:210
XMPP::BareJID::BareJID
BareJID(const PString &jid)
Definition: xmpp.h:111
XMPP::Message::SetBody
virtual void SetBody(const PString &body, const PString &lang=PString::Empty())
XMPP::Presence::SetShow
virtual void SetShow(ShowType show)
Info::m_Features
PStringSet m_Features
Definition: xmpp.h:505
XMPP::Message::GetSubject
virtual PString GetSubject(const PString &lang=PString::Empty())
Get the subject for the specified language.
XMPP::BaseStreamHandler::Stop
virtual PBoolean Stop(const PString &error=PString::Empty())
XMPP::Presence::ShowType
ShowType
Definition: xmpp.h:328
XMPP::BaseStreamHandler::BaseStreamHandler
BaseStreamHandler()
XMPP::BareJID::GetResource
virtual PString GetResource() const
Definition: xmpp.h:124
XMPP::Presence::GetPriority
virtual BYTE GetPriority() const
XMPP::Presence::Available
Definition: xmpp.h:317
XMPP::BaseStreamHandler::Write
virtual PBoolean Write(const void *buf, PINDEX len)
XMPP::Presence::SetType
virtual void SetType(PresenceType type)
XMPP::Stanza::IDTag
static const PCaselessString & IDTag()
Various constant strings.
XMPP::BaseStreamHandler::PDECLARE_NOTIFIER
PDECLARE_NOTIFIER(Stream, BaseStreamHandler, OnOpen)
XMPP::Disco::ItemList
ItemList(PXMLElement *list)
PObject::Comparison
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
XMPP::IQ
Definition: xmpp.h:379
XMPP::JID::SetServer
virtual void SetServer(const PString &server)
XMPP::Presence::ShowTag
static const PCaselessString & ShowTag()
XMPP::Stream::Close
virtual PBoolean Close()
Close the channel.
XMPP::JID::ParseJID
virtual void ParseJID(const PString &jid)
PIndirectChannel
This is a channel that operates indirectly through another channel(s).
Definition: indchan.h:49
PCaselessString
This class is a variation of a string that ignores case.
Definition: pstring.h:1708
XMPP::Stanza::GetID
virtual PString GetID() const
XMPP::IQ::Error
Definition: xmpp.h:388
XMPP::Identity
Definition: xmpp.h:467
XMPP::Stream::OnOpen
virtual PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
Definition: xmpp.h:155
XMPP::Disco::Item::GetJID
const JID & GetJID() const
Definition: xmpp.h:451
XMPP::BaseStreamHandler::Main
virtual void Main()
User override function for the main execution routine of the thread.
XMPP::Presence::GetStatusElement
virtual PXMLElement * GetStatusElement(const PString &lang=PString::Empty())
XMPP::Message::GroupChat
Definition: xmpp.h:261
XMPP::Presence::GetShow
virtual ShowType GetShow(PString *showName=0) const
XMPP::Stanza::AddElement
virtual void AddElement(PXMLElement *elem)
XMPP::Stanza::GetTo
virtual PString GetTo() const
XMPP::Stream::m_Parser
PXMLStreamParser * m_Parser
Definition: xmpp.h:177
XMPP::Message::IsValid
virtual PBoolean IsValid() const
XMPP::Presence::Probe
Definition: xmpp.h:323
XMPP::Presence::GetStatus
virtual PString GetStatus(const PString &lang=PString::Empty())
Get the status for the specified language.
XMPP::BareJID::operator=
BareJID & operator=(const PString &jid)
XMPP::Presence::Error
Definition: xmpp.h:324
XMPP::BaseStreamHandler::m_AutoReconnect
PBoolean m_AutoReconnect
Definition: xmpp.h:211
XMPP::Message::Message
Message()
Construct a new empty message.
XMPP::JID::m_IsDirty
PBoolean m_IsDirty
Definition: xmpp.h:101
XMPP::Presence::GetType
virtual PresenceType GetType(PString *typeName=0) const
XMPP::Message::Normal
Definition: xmpp.h:258
XMPP::Stream::CloseHandlers
PNotifierList & CloseHandlers()
Definition: xmpp.h:160
XMPP::Stanza::FromTag
static const PCaselessString & FromTag()
XMPP::Presence::Other
Definition: xmpp.h:334
XMPP::JID::GetServer
PString GetServer() const
Definition: xmpp.h:81
XMPP::JID
Definition: xmpp.h:59
PString::IsEmpty
virtual PBoolean IsEmpty() const
Determine if the string is empty.
XMPP::Stream::Write
virtual PBoolean Write(const void *buf, PINDEX len)
Low level write to the channel.
PXML
Definition: pxml.h:114
XMPP::IQ::GetOriginalMessage
virtual IQ * GetOriginalMessage() const
Definition: xmpp.h:421
XMPP::Presence::Subscribed
Definition: xmpp.h:320
PBoolean
BOOL PBoolean
Definition: object.h:102
XMPP::IQ::IQType
IQType
Definition: xmpp.h:384
XMPP::PresenceStanzaTag
const PCaselessString & PresenceStanzaTag()
XMPP::IQ::IQ
IQ(IQType type, PXMLElement *body=0)
XMPP::Presence::StatusTag
static const PCaselessString & StatusTag()
XMPP::Stanza::GetFrom
virtual PString GetFrom() const
XMPP::Identity::GetType
const PString & GetType() const
Definition: xmpp.h:475
XMPP::JID::BuildJID
virtual void BuildJID() const
XMPP::Message::GetLanguage
virtual PString GetLanguage() const
XMPP::Stream::m_CloseHandlers
PNotifierList m_CloseHandlers
Definition: xmpp.h:179
XMPP::Disco::Item::m_Node
const PString m_Node
Definition: xmpp.h:458
XMPP::Presence::SetPriority
virtual void SetPriority(BYTE priority)
XMPP::IQ::GetBody
virtual PXMLElement * GetBody()
XMPP::Message::SetLanguage
virtual void SetLanguage(const PString &lang)
Info::GetIdentities
IdentityList & GetIdentities()
Definition: xmpp.h:498
XMPP::Presence::Presence
Presence()
Construct a new empty presence.
XMPP::IQ::SetBody
virtual void SetBody(PXMLElement *body)
XMPP::Stanza::SetID
virtual void SetID(const PString &id)
XMPP::Message::GetBody
virtual PString GetBody(const PString &lang=PString::Empty())
XMPP::Disco::AsXML
PXMLElement * AsXML(PXMLElement *parent) const
XMPP::Stanza::GetElement
virtual PXMLElement * GetElement(const PString &name, PINDEX i=0)
XMPP::BaseStreamHandler::OnElement
virtual void OnElement(PXML &pdu)
XMPP::IQ::TypeTag
static const PCaselessString & TypeTag()
Various constant strings.
XMPP::Stream::Read
virtual PXML * Read()
Read a XMPP stanza from the stream.
XMPP::BareJID::SetResource
virtual void SetResource(const PString &)
Definition: xmpp.h:125
XMPP::Disco::Item
Definition: xmpp.h:444
XMPP::Stream::OnClose
virtual void OnClose()
Definition: xmpp.h:159
XMPP::LanguageTag
const PCaselessString & LanguageTag()
Various constant strings.
XMPP::Presence::Unsubscribed
Definition: xmpp.h:322
Info::m_Identities
IdentityList m_Identities
Definition: xmpp.h:504
XMPP::Presence::DND
Definition: xmpp.h:332
XMPP::JID::SetResource
virtual void SetResource(const PString &resource)
XMPP::JID::m_Server
PString m_Server
Definition: xmpp.h:97
XMPP::Message::BodyTag
static const PCaselessString & BodyTag()
XMPP::Disco::Item::AsXML
PXMLElement * AsXML(PXMLElement *parent) const
XMPP::Presence::Online
Definition: xmpp.h:329
PString
The character string class.
Definition: pstring.h:108
XMPP::BareJID
Definition: xmpp.h:105
XMPP::Stream::GetParser
PXMLStreamParser * GetParser()
Definition: xmpp.h:174
XMPP::Stream::Reset
virtual void Reset()
Reset the parser.
XMPP::JID::Clone
virtual PObject * Clone() const
Create a copy of the class on the heap.
Definition: xmpp.h:78
XMPP::JID::GetUser
PString GetUser() const
Definition: xmpp.h:80
PStringSet
This is a set collection class of PString objects.
Definition: pstring.h:2391
XMPP::Presence
Definition: xmpp.h:311
XMPP::Message::GetBodyElement
virtual PXMLElement * GetBodyElement(const PString &lang=PString::Empty())
XMPP::IQ::Get
Definition: xmpp.h:385
XMPP::Message::Chat
Definition: xmpp.h:259
PXMLElement
Definition: pxml.h:353
PString::Empty
static PString Empty()
Return an empty string.
XMPP::Presence::IsValid
virtual PBoolean IsValid() const
XMPP::Stanza::GenerateID
static PString GenerateID()
XMPP::BaseStreamHandler::m_ElementHandlers
PNotifierList m_ElementHandlers
Definition: xmpp.h:214
XMPP::BareJID::Compare
virtual Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
XMPP::JID::GetResource
virtual PString GetResource() const
Definition: xmpp.h:83
XMPP::Presence::Unknown
Definition: xmpp.h:325
XMPP::Message::Error
Definition: xmpp.h:260
PThread
This class defines a thread of execution in the system.
Definition: thread.h:66
XMPP::IQ::Set
Definition: xmpp.h:386
XMPP::Presence::Chat
Definition: xmpp.h:331
XMPP::Presence::Subscribe
Definition: xmpp.h:319
XMPP::IQ::HasBeenProcessed
PBoolean HasBeenProcessed() const
Definition: xmpp.h:410
XMPP::Identity::m_Name
const PString m_Name
Definition: xmpp.h:483
XMPP::IQ::BuildError
virtual IQ * BuildError(const PString &type, const PString &code) const
Creates an error response for this message.
XMPP::Stream::~Stream
~Stream()
XMPP::IQ::GetResponseHandlers
virtual PNotifierList GetResponseHandlers()
Definition: xmpp.h:433
XMPP::JID::operator=
JID & operator=(const PString &jid)
XMPP::Presence::Away
Definition: xmpp.h:330
XMPP::JID::Compare
virtual Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
XMPP::Stanza
XMPP stanzas: the following classes represent the three stanzas (PDUs) defined by the xmpp protocol...
Definition: xmpp.h:222
XMPP::IQ::GetType
virtual IQType GetType(PString *typeName=0) const
XMPP::JID::IsBare
virtual PBoolean IsBare() const
Definition: xmpp.h:89
XMPP::Transport
This interface is the base class of each XMPP transport class.
Definition: xmpp.h:134
XMPP::BareJID::Clone
virtual PObject * Clone() const
Create a copy of the class on the heap.
Definition: xmpp.h:123
XMPP::IQStanzaTag
const PCaselessString & IQStanzaTag()
XMPP::Identity::GetName
const PString & GetName() const
Definition: xmpp.h:476
pxml.h
XMPP::Stream::Stream
Stream(Transport *transport=0)
XMPP::BareJID::BareJID
BareJID(const PString &user, const PString &server, const PString &resource=PString::Empty())
Definition: xmpp.h:112
XMPP::Message::SetSubject
virtual void SetSubject(const PString &subj, const PString &lang=PString::Empty())
XMPP::IQ::m_ResponseHandlers
PNotifierList m_ResponseHandlers
Definition: xmpp.h:438
XMPP::Stream::OpenHandlers
PNotifierList & OpenHandlers()
Definition: xmpp.h:156
PDECLARE_LIST
#define PDECLARE_LIST(cls, T)
Begin declaration of list class.
Definition: lists.h:455
Info::GetFeatures
PStringSet & GetFeatures()
Definition: xmpp.h:499
XMPP::Presence::TypeTag
static const PCaselessString & TypeTag()
Various constant strings.
XMPP::PLIST
PLIST(StanzaList, Stanza)
XMPP::BaseStreamHandler::m_ReconnectTimeout
PTimeInterval m_ReconnectTimeout
Definition: xmpp.h:212
XMPP::BareJID::IsBare
virtual PBoolean IsBare() const
Definition: xmpp.h:126
XMPP::BaseStreamHandler
Definition: xmpp.h:183
XMPP::IQ::m_OriginalIQ
IQ * m_OriginalIQ
Definition: xmpp.h:437
XMPP::IQ::IsValid
virtual PBoolean IsValid() const
XMPP::IQ::Result
Definition: xmpp.h:387
XMPP::IQ::SetProcessed
void SetProcessed()
This method signals that the message was taken care of If the stream handler, after firing all the no...
Definition: xmpp.h:409
XMPP::Message::MessageType
MessageType
Definition: xmpp.h:257
XMPP::Disco::Item::m_JID
const JID m_JID
Definition: xmpp.h:457
XMPP::Stanza::SetTo
virtual void SetTo(const PString &to)
XMPP::MessageStanzaTag
const PCaselessString & MessageStanzaTag()
PNotifierList
Definition: notifier_ext.h:102
XMPP::Disco::Item::GetNode
const PString & GetNode() const
Definition: xmpp.h:452
XMPP::Message
Definition: xmpp.h:252
PObject
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
XMPP::JID::m_Resource
PString m_Resource
Definition: xmpp.h:98
XMPP::Stanza::IsValid
virtual PBoolean IsValid() const =0
XMPP::Presence::PresenceType
PresenceType
Definition: xmpp.h:316
PNotifierList::Fire
PBoolean Fire(PObject &obj, INT val=0)
XMPP::JID::m_JID
PString m_JID
Definition: xmpp.h:100
XMPP::JID::PrintOn
virtual void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
XMPP::Disco::Item::Item
Item(PXMLElement *item)
XMPP::IQ::m_Processed
PBoolean m_Processed
Definition: xmpp.h:436
XMPP::Presence::Unavailable
Definition: xmpp.h:318
XMPP::Transport::Open
virtual PBoolean Open()=0
XMPP::Identity::GetCategory
const PString & GetCategory() const
Definition: xmpp.h:474
XMPP::Message::GetThread
virtual PString GetThread()
XMPP::IdentityList
IdentityList(PXMLElement *list)
Info
Definition: xmpp.h:492
XMPP::BaseStreamHandler::~BaseStreamHandler
~BaseStreamHandler()
XMPP::Stanza::SetFrom
virtual void SetFrom(const PString &from)
XMPP::BaseStreamHandler::Start
virtual PBoolean Start(Transport *transport=0)
XMPP::IQ::SetOriginalMessage
virtual void SetOriginalMessage(IQ *iq)
XMPP::Message::GetSubjectElement
virtual PXMLElement * GetSubjectElement(const PString &lang=PString::Empty())