diff -r f742655b05bf -r d38647835c2e richcallsettingsengine/rcse2/inc/rcsebackupobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/richcallsettingsengine/rcse2/inc/rcsebackupobserver.h Wed Sep 01 12:29:57 2010 +0100 @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2004-2007 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: Implements observer class for backup events +* +*/ + + + +#ifndef CRCSEBACKUPOBSERVER_H +#define CRCSEBACKUPOBSERVER_H + +#include +#include + +class MRCSEBackupObserver; + +/** + * Implements observer class for backup events. + * + * @lib rcse.lib + * @since S60 3.0 + */ +NONSHARABLE_CLASS( CRCSEBackupObserver ) : public CActive +{ +public: + static CRCSEBackupObserver* NewL( MRCSEBackupObserver& aObserver ); + + ~CRCSEBackupObserver(); + + /** + * Return backup / restore status + * + * @since S60 3.0 + * @return ETrue if backup or restore is ongoing, else EFalse + */ + TBool IsBackupOperationRunning(); + +protected: + + /** + * From CActive. + * Cancel. + * + * @since S60 3.0 + */ + void DoCancel(); + + /** + * From CActive. + * Handle backup event notification. + * + * @since S60 3.0 + */ + void RunL(); + +private: + + CRCSEBackupObserver( MRCSEBackupObserver& aObserver ); + void ConstructL(); + +private: + + /** + * Publish & Subscribe connection + */ + RProperty iBackupStatus; + + /** + * Observer object + */ + MRCSEBackupObserver& iObserver; + +private: + // For testing + #ifdef TEST_EUNIT + friend class UT_CRCSEBackupObserver; + #endif + + + +}; + +#endif // CRCSEBACKUPOBSERVER_H +