flexoff.h

00001 /*
00002   Copyright (c) 2005-2007 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
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       // reimplemented from DiscoHandler
00096       virtual void handleDiscoInfoResult( Stanza *stanza, int context );
00097 
00098       // reimplemented from DiscoHandler
00099       virtual void handleDiscoItemsResult( Stanza *stanza, int context );
00100 
00101       // reimplemented from DiscoHandler
00102       virtual void handleDiscoError( Stanza *stanza, int context );
00103 
00104       // reimplemented from IqHandler
00105       virtual bool handleIqID( Stanza *stanza, int context );
00106 
00107       // reimplemented from IqHandler
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__

Generated on Sat Nov 10 08:50:27 2007 for gloox by  doxygen 1.5.3-20071008