diff -r 71ca22bcf22a -r 4f62049db6ac mmserv/tms/tmsserver/inc/cspcenreplistener.h --- a/mmserv/tms/tmsserver/inc/cspcenreplistener.h Tue Feb 02 01:08:46 2010 +0200 +++ b/mmserv/tms/tmsserver/inc/cspcenreplistener.h Fri Feb 19 23:19:48 2010 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (c) 2009 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" @@ -19,102 +19,97 @@ #define CSPCENREPLISTENER_H // INCLUDE FILES +#include #include #include namespace TMS { // Forward declarations -//class CRepository; -class MCSPCenRepObserver; - - // BASE CLASS +class MCSPCenRepObserver; + +/** + * TMSCenRepListener manages getting notification on CenRep key changes. + */ +class TMSCenRepListener : public CActive + { +public: - // CLASS DECLARATION + /** + * Two-phased construction. + * + * @param aUid cenrep Uid + * @param aKey key to be listened + * @param aObserver observer for key change. + * @return instance of the class + */ + static TMSCenRepListener* NewL(TUid aUid, TUint32 aKey, + MCSPCenRepObserver* aObserver); + + /** + * Destructor. + */ + virtual ~TMSCenRepListener(); + +public: /** - * CSPCenRepListener manages getting notification on CenRep key changes. + * Gets the current value of the monitored setting + * @param aValue the current value of the monitored setting + * @return gint Symbian OS error code from central repository */ -class CSPCenRepListener : public CActive - { - public: + gint Get(gint& aValue); - /** - * Two-phased construction. - * - * @param aUid cenrep Uid - * @param aKey key to be listened - * @param aObserver observer for key change. - * @return instance of the class - */ - static CSPCenRepListener* NewL(TUid aUid, TUint32 aKey, - MCSPCenRepObserver* aObserver); + gint Set(gint aValue); - /** - * Destructor. - */ - virtual ~CSPCenRepListener(); +protected: + // From CActive + void DoCancel(); + gint RunError(TInt aError); + void RunL(); - public: +private: - /** - * Gets the current value of the monitored setting - * @param aValue the current value of the monitored setting - * @return TInt Symbian OS error code from central repository - */ - TInt Get(TInt& aValue); - - TInt Set( TInt aValue ); - - protected: - // From CActive - - void DoCancel(); - TInt RunError(TInt aError); - void RunL(); + /** + * Constructor + * @param aUid cenrep Uid + * @param aKey key to be listened + * @param aObserver observer for key change. + */ + TMSCenRepListener(TUid aUid, TUint32 aKey, MCSPCenRepObserver* aObserver); - private: + /** + * Private constructing. + */ + void ConstructL(); - /** - * Constructor - * @param aUid cenrep Uid - * @param aKey key to be listened - * @param aObserver observer for key change. - */ - CSPCenRepListener(TUid aUid, TUint32 aKey, - MCSPCenRepObserver* aObserver); + /** + * Submits a notification request + */ + void SubmitNotifyRequestL(); - /** - * Private constructing. - */ - void ConstructL(); - - /** - * Submits a notification request - */ - void SubmitNotifyRequestL(); +private: + // Owned by this object - private: - // Owned by this object - - /** - * UID of CR key. - */ - TUid iUid; + /** + * UID of CR key. + */ + TUid iUid; - /** - * Repository access. - * Own. - */ - CRepository* iRepository; + /** + * Repository access. + * Own. + */ + CRepository* iRepository; - /** - * Identification number of the monitored setting. - */ - TUint32 iMonitorSetting; + /** + * Identification number of the monitored setting. + */ + TUint32 iMonitorSetting; - MCSPCenRepObserver* iObserver; - }; + MCSPCenRepObserver* iObserver; + }; } //namespace TMS + #endif // CSPCENREPLISTENER_H