4 * PWLib application header file for XMPPTest
6 * Copyright 2004 Reitek S.p.A.
9 * Revision 1.2 2004/05/09 07:23:49 rjongbloed
10 * More work on XMPP, thanks Federico Pinna and Reitek S.p.A.
12 * Revision 1.1 2004/04/26 01:51:58 rjongbloed
13 * More implementation of XMPP, thanks a lot to Federico Pinna & Reitek S.p.A.
17 #ifndef _XMPPTest_MAIN_H
18 #define _XMPPTest_MAIN_H
21 #include "MainFrame.h"
23 #include <ptlib/notifier_ext.h>
24 #include <ptclib/xmpp_c2s.h>
25 #include <ptclib/xmpp_roster.h>
26 #include <ptclib/xmpp_muc.h>
29 class XMPPFrameBase
: public PObject
31 PCLASSINFO(XMPPFrameBase
, PObject
);
32 PDECLARE_SMART_NOTIFIEE
;
34 XMPPFrameBase() { PCREATE_SMART_NOTIFIEE
; }
35 PDECLARE_SMART_NOTIFIER(XMPP::C2S::StreamHandler
, XMPPFrameBase
, OnSessionEstablished
) = 0;
36 PDECLARE_SMART_NOTIFIER(XMPP::C2S::StreamHandler
, XMPPFrameBase
, OnSessionReleased
) = 0;
37 PDECLARE_SMART_NOTIFIER(XMPP::Message
, XMPPFrameBase
, OnMessage
) = 0;
38 PDECLARE_SMART_NOTIFIER(XMPP::Roster
, XMPPFrameBase
, OnRosterChanged
) = 0;
42 class XMPPFrame
: public MainFrame
, public XMPPFrameBase
44 // DECLARE_EVENT_TABLE()
51 virtual void OnConnect(wxCommandEvent
& event
);
52 virtual void OnDisconnect(wxCommandEvent
& event
);
53 virtual void OnQuit(wxCommandEvent
& event
);
56 virtual void OnSessionEstablished(XMPP::C2S::StreamHandler
&, INT
);
57 virtual void OnSessionReleased(XMPP::C2S::StreamHandler
&, INT
);
58 virtual void OnMessage(XMPP::Message
&, INT
);
59 virtual void OnRosterChanged(XMPP::Roster
&, INT
);
62 XMPP::Roster
* m_Roster
;
63 XMPP::C2S::StreamHandler
* m_Client
;
67 class XMPPTest
: public wxApp
, public PProcess
69 PCLASSINFO(XMPPTest
, PProcess
);
77 // Initialise wxWidgets
78 virtual bool OnInit();
81 #endif // _XMPPTest_MAIN_H
84 // End of File ///////////////////////////////////////////////////////////////