60 JID(
const char * jid = 0);
72 operator const PString&()
const;
86 virtual void PrintOn(ostream & strm)
const;
170 virtual void Reset();
506 #endif // PTLIB_XMPP_H
static const PCaselessString & PriorityTag()
virtual void SetUser(const PString &user)
virtual void SetType(IQType type)
virtual PBoolean Close()=0
Close the channel.
void SetAutoReconnect(PBoolean b=true, long timeout=1000)
static const PCaselessString & SubjectTag()
BareJID(const char *jid=0)
Definition: xmpp.h:106
static const PCaselessString & TypeTag()
Various constant strings.
virtual void SetStatus(const PString &status, const PString &lang=PString::Empty())
PNotifierList m_OpenHandlers
Definition: xmpp.h:176
const PCaselessString & IQQueryTag()
This class defines an arbitrary time interval to millisecond accuracy.
Definition: timeint.h:51
virtual void SetType(MessageType type)
void AddNotifier(const PNotifierTemplate< PXMLElement & > ¬ifier)
Definition: xmpp.h:194
virtual PXMLElement * Read()
Read a XMPP stanza from the stream.
const PString m_Category
Definition: xmpp.h:473
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:2164
PString m_User
Definition: xmpp.h:92
virtual MessageType GetType(PString *typeName=0) const
resource
Definition: xmpp.h:109
bool m_Processed
Definition: xmpp.h:428
virtual IQ * BuildResult() const
Creates a new response iq for this message (that must be of the set/get type!)
const PCaselessString & NamespaceTag()
static const PCaselessString & ToTag()
static const PCaselessString & ThreadTag()
virtual void SetThread(const PString &thrd)
const PString m_Type
Definition: xmpp.h:474
This class represents a XMPP stream, i.e.
Definition: xmpp.h:143
Stream * m_Stream
Definition: xmpp.h:209
BareJID(const PString &jid)
Definition: xmpp.h:107
virtual void SetBody(const PString &body, const PString &lang=PString::Empty())
virtual void SetShow(ShowType show)
PStringSet m_Features
Definition: xmpp.h:497
virtual PString GetSubject(const PString &lang=PString::Empty())
Get the subject for the specified language.
virtual PBoolean Stop(const PString &error=PString::Empty())
ShowType
Definition: xmpp.h:324
virtual PString GetResource() const
Definition: xmpp.h:120
virtual BYTE GetPriority() const
virtual PBoolean Write(const void *buf, PINDEX len)
virtual void SetType(PresenceType type)
bool Add(const Notifier &handler)
Add a notifier to the list.
Definition: notifier_ext.h:266
static const PCaselessString & IDTag()
Various constant strings.
PDECLARE_NOTIFIER(Stream, BaseStreamHandler, OnOpen)
ItemList(PXMLElement *list)
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:2251
virtual void SetServer(const PString &server)
static const PCaselessString & ShowTag()
virtual PBoolean Close()
Close the channel.
virtual void ParseJID(const PString &jid)
This is a channel that operates indirectly through another channel(s).
Definition: indchan.h:45
This class is a variation of a string that ignores case.
Definition: pstring.h:2012
virtual PString GetID() const
const JID & GetJID() const
Definition: xmpp.h:443
virtual void Main()
User override function for the main execution routine of the thread.
virtual PXMLElement * GetStatusElement(const PString &lang=PString::Empty())
virtual ShowType GetShow(PString *showName=0) const
virtual PString GetTo() const
PXMLStreamParser * m_Parser
Definition: xmpp.h:175
virtual PBoolean IsValid() const
virtual PString GetStatus(const PString &lang=PString::Empty())
Get the status for the specified language.
BareJID & operator=(const PString &jid)
bool m_AutoReconnect
Definition: xmpp.h:210
Message()
Construct a new empty message.
PBoolean m_IsDirty
Definition: xmpp.h:97
virtual PresenceType GetType(PString *typeName=0) const
PNotifierList & CloseHandlers()
Definition: xmpp.h:156
static const PCaselessString & FromTag()
PString GetServer() const
Definition: xmpp.h:77
virtual PBoolean IsEmpty() const
Determine if the string is empty.
virtual PBoolean Write(const void *buf, PINDEX len)
Low level write to the channel.
virtual IQ * GetOriginalMessage() const
Definition: xmpp.h:413
IQType
Definition: xmpp.h:378
const PCaselessString & PresenceStanzaTag()
static const PCaselessString & StatusTag()
virtual PString GetFrom() const
const PString & GetType() const
Definition: xmpp.h:467
virtual void BuildJID() const
virtual PString GetLanguage() const
PNotifierList m_CloseHandlers
Definition: xmpp.h:177
const PString m_Node
Definition: xmpp.h:450
virtual void SetPriority(BYTE priority)
virtual PXMLElement * GetBody()
virtual void SetLanguage(const PString &lang)
IdentityList & GetIdentities()
Definition: xmpp.h:490
Presence()
Construct a new empty presence.
The PNotifier and PNotifierFunction classes build a completely type safe mechanism for calling arbitr...
Definition: notifier.h:109
virtual void SetBody(PXMLElement *body)
virtual void SetID(const PString &id)
virtual PString GetBody(const PString &lang=PString::Empty())
Stream * GetStream() const
Definition: xmpp.h:196
PXMLElement * AsXML(PXMLElement *parent) const
virtual PXMLElement * GetElement(const PString &name, PINDEX i=0)
static const PCaselessString & TypeTag()
Various constant strings.
virtual void SetResource(const PString &)
Definition: xmpp.h:121
virtual void OnClose()
Definition: xmpp.h:155
const PCaselessString & LanguageTag()
Various constant strings.
bool PBoolean
Definition: object.h:174
IdentityList m_Identities
Definition: xmpp.h:496
virtual void SetResource(const PString &resource)
PString m_Server
Definition: xmpp.h:93
static const PCaselessString & BodyTag()
PXMLElement * AsXML(PXMLElement *parent) const
The character string class.
Definition: pstring.h:108
PXMLStreamParser * GetParser()
Definition: xmpp.h:171
virtual void Reset()
Reset the parser.
virtual PObject * Clone() const
Create a copy of the class on the heap.
Definition: xmpp.h:74
PString GetUser() const
Definition: xmpp.h:76
This is a set collection class of PString objects.
Definition: pstring.h:2821
virtual PXMLElement * GetBodyElement(const PString &lang=PString::Empty())
virtual PBoolean IsValid() const
static PString GenerateID()
virtual PString GetResource() const
Definition: xmpp.h:79
This class defines a thread of execution in the system.
Definition: thread.h:66
PBoolean HasBeenProcessed() const
Definition: xmpp.h:402
static const PString & Empty()
Return an empty string.
const PString m_Name
Definition: xmpp.h:475
virtual IQ * BuildError(const PString &type, const PString &code) const
Creates an error response for this message.
virtual PNotifierList GetResponseHandlers()
Definition: xmpp.h:425
JID & operator=(const PString &jid)
virtual Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
XMPP stanzas: the following classes represent the three stanzas (PDUs) defined by the xmpp protocol...
Definition: xmpp.h:221
virtual IQType GetType(PString *typeName=0) const
virtual PBoolean IsBare() const
Definition: xmpp.h:85
This interface is the base class of each XMPP transport class.
Definition: xmpp.h:130
virtual PObject * Clone() const
Create a copy of the class on the heap.
Definition: xmpp.h:119
server
Definition: xmpp.h:109
const PCaselessString & IQStanzaTag()
const PString & GetName() const
Definition: xmpp.h:468
Stream(Transport *transport=0)
virtual void SetSubject(const PString &subj, const PString &lang=PString::Empty())
PNotifierList m_ResponseHandlers
Definition: xmpp.h:430
PNotifierList & OpenHandlers()
Definition: xmpp.h:152
#define PDECLARE_LIST(cls, T)
Begin declaration of list class.
Definition: lists.h:467
PStringSet & GetFeatures()
Definition: xmpp.h:491
static const PCaselessString & TypeTag()
Various constant strings.
PNotifierListTemplate< PXMLElement & > m_ElementHandlers
Definition: xmpp.h:213
PLIST(StanzaList, Stanza)
PTimeInterval m_ReconnectTimeout
Definition: xmpp.h:211
virtual PBoolean IsBare() const
Definition: xmpp.h:122
IQ * m_OriginalIQ
Definition: xmpp.h:429
virtual PBoolean IsValid() const
virtual void OnElement(PXMLElement &pdu)
void SetProcessed()
This method signals that the message was taken care of If the stream handler, after firing all the n...
Definition: xmpp.h:401
MessageType
Definition: xmpp.h:255
const JID m_JID
Definition: xmpp.h:449
virtual void SetTo(const PString &to)
const PCaselessString & MessageStanzaTag()
const PString & GetNode() const
Definition: xmpp.h:444
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
PString m_Resource
Definition: xmpp.h:94
virtual PBoolean IsValid() const =0
PresenceType
Definition: xmpp.h:312
PString m_JID
Definition: xmpp.h:96
virtual void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
virtual bool OnOpen()
This callback is executed when the Open() function is called with open channels.
Definition: xmpp.h:151
virtual PBoolean Open()=0
const PString & GetCategory() const
Definition: xmpp.h:466
virtual PString GetThread()
IdentityList(PXMLElement *list)
virtual void SetFrom(const PString &from)
PXML m_Document
Definition: xmpp.h:174
virtual PBoolean Start(Transport *transport=0)
virtual void SetOriginalMessage(IQ *iq)
virtual PXMLElement * GetSubjectElement(const PString &lang=PString::Empty())