diff -r 380473e13443 -r d746aee05493 supl/locationsuplfw/gateway/inc/epos_csuplsessionretryq.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/supl/locationsuplfw/gateway/inc/epos_csuplsessionretryq.h Thu Jul 15 19:06:58 2010 +0300 @@ -0,0 +1,72 @@ +/* +* ============================================================================== +* Name : epos_csuplsessionretryq.h +* Part of : SUPL Framework / SUPL Server +* Interface : -- +* Description : Class to handle retries of failed requests. It waits for all the current sessions to end and then +* notifies the failed sessions that they can retry. +* Version : +* +* Copyright (c) 2010 Nokia Corporation. +* This material, including documentation and any related +* computer programs, is protected by copyright controlled by +* Nokia Corporation. All rights are reserved. Copying, +* including reproducing, storing, adapting or translating, any +* or all of this material requires the prior written consent of +* Nokia Corporation. This material also contains confidential +* information which may not be disclosed to others without the +* prior written consent of Nokia Corporation. +* ============================================================================== +*/ + +#ifndef EPOS_CSUPLSESSIONRETRYQ_H +#define EPOS_CSUPLSESSIONRETRYQ_H + +// INCLUDES +#include + +// CLASS DECLARATION +class CSuplSessionRequest; + +/** + * Class to handle retries of failed requests. It waits for all the current sessions to end and then + * notifies the failed sessions that they can retry. + */ +class CSuplSessionRetryQ : public CTimer + { + public: + static CSuplSessionRetryQ* NewL(); + ~CSuplSessionRetryQ(); + + void AddToQueueL(CSuplSessionRequest& aSessionRequest); + void RemoveFromQueueL(CSuplSessionRequest& aSessionRequest); + void SessionStarted(); + void SessionEnded(); + + private: + CSuplSessionRetryQ(); + void ConstructL(); + + // By default, prohibit copy constructor + CSuplSessionRetryQ( const CSuplSessionRetryQ& ); + // Prohibit assigment operator + CSuplSessionRetryQ& operator= ( const CSuplSessionRetryQ& ); + + protected: // Functions from base classes + + /** + * From CActive. + * Called when timer completes + */ + void RunL(); + + private: // Data + RPointerArray iSessionRequests; + TInt iSessionCount; + TBool iSomeSessionEnded; + TTime iTimeOfLastEndedSession; + }; + +#endif // EPOS_CSUPLSESSIONRETRYQ_H + +// End of File