diff -r 594d59766373 -r 7d48bed6ce0c cbs/cbsui/inc/ccbsuitopiclistmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbs/cbsui/inc/ccbsuitopiclistmonitor.h Tue Aug 31 15:45:17 2010 +0300 @@ -0,0 +1,117 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#ifndef CCBSUITOPICLISTMONITOR_H +#define CCBSUITOPICLISTMONITOR_H + +// INCLUDES +#include +#include + + +// FORWARD DECLARATIONS +class MCbs; +class MCbsUiTopicMonitorObserver; + +// CLASS DEFINITIONS + + +/** +* Monitors topic related events. +*/ +class CCbsUiTopicListMonitor : public CActive + { + public: // New functions + + /** + * Create an instance of the class. + * + * @param aServer cbs server + */ + static CCbsUiTopicListMonitor* NewL( MCbs& aServer ); + + /** + * Destructor. + */ + ~CCbsUiTopicListMonitor(); + + /** + * Issues the request. + */ + void IssueRequest(); + + public: // From CActive + + /** + * It is called when server notifies. + */ + void RunL(); + + /** + * Cancels the request. + */ + void DoCancel(); + + public: // New functions + + /** + * Adds a observer to this monitor. + * + * @param aObserver Observer to be added. + */ + void AddObserverL( MCbsUiTopicMonitorObserver* aObserver ); + + private: + + typedef CArrayFixFlat + TCbsUiMonitorObservers; + + /** + * Constructor. + * + * @param aServer cbs server + */ + CCbsUiTopicListMonitor( MCbs& aServer ); + + /** + * Finalizes the construction. + */ + void ConstructL(); + + private: // Data + + // ETrue if request is active. + TBool iContinue; + + // To issue the request. + MCbs& iServer; + + // Observers who are interested in topic changes. + // Monitor doesn't own the observers. + TCbsUiMonitorObservers* iObservers; + + // Which topic handle the event is conserning. + TCbsTopicNumber iTopicNumber; + + // What kind of event has been. + TCbsTopicListEvent iEvent; + }; + +#endif // CCBSUITOPICLISTMONITOR_H + +// End of File