flexoff.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef FLEXOFF_H__
00015 #define FLEXOFF_H__
00016
00017 #include "clientbase.h"
00018 #include "discohandler.h"
00019 #include "flexoffhandler.h"
00020 #include "iqhandler.h"
00021
00022 namespace gloox
00023 {
00024
00033 class GLOOX_API FlexibleOffline : public DiscoHandler, public IqHandler
00034 {
00035 public:
00040 FlexibleOffline( ClientBase *parent );
00041
00045 virtual ~FlexibleOffline();
00046
00052 void checkSupport();
00053
00058 void getMsgCount();
00059
00064 void fetchHeaders();
00065
00073 void fetchMessages( const StringList& msgs );
00074
00081 void removeMessages( const StringList& msgs );
00082
00088 void registerFlexibleOfflineHandler( FlexibleOfflineHandler *foh );
00089
00093 void removeFlexibleOfflineHandler();
00094
00095
00096 virtual void handleDiscoInfoResult( Stanza *stanza, int context );
00097
00098
00099 virtual void handleDiscoItemsResult( Stanza *stanza, int context );
00100
00101
00102 virtual void handleDiscoError( Stanza *stanza, int context );
00103
00104
00105 virtual bool handleIqID( Stanza *stanza, int context );
00106
00107
00108 virtual bool handleIq( Stanza *stanza );
00109
00110 private:
00111 enum FOContext
00112 {
00113 FOCheckSupport,
00114 FORequestNum,
00115 FORequestHeaders,
00116 FORequestMsgs,
00117 FORemoveMsgs
00118 };
00119
00120 ClientBase *m_parent;
00121 FlexibleOfflineHandler *m_flexibleOfflineHandler;
00122 };
00123
00124 }
00125
00126 #endif // FLEXOFF_H__