diff -r ebe688cedc25 -r 7fdbb852d323 messagingappbase/msgerrorwatcher/inc/MsgErrorDiskSpaceObserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingappbase/msgerrorwatcher/inc/MsgErrorDiskSpaceObserver.h Wed Sep 01 12:31:54 2010 +0100 @@ -0,0 +1,102 @@ +/* +* Copyright (c) 2002 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: +* CMsgErrorDiskSpaceObserver declaration file +* +*/ + + + +#ifndef MSGERRORDISKSPACEOBSERVER_H +#define MSGERRORDISKSPACEOBSERVER_H + +// INCLUDES +#include +#include + +// FORWARD DECLARATIONS +class CMsgErrorWatcher; +class CMsvSession; + +// CLASS DECLARATION + +/** +* CMsgErrorDiskSpaceObserver +* +* @lib msgerrorwatcher.dll +* @since 2.0 +*/ +class CMsgErrorDiskSpaceObserver : public CActive + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * + * @param aWatcher A pointer to CMsgErrorWatcher + * @param aSession A reference to message server session + * @param aFs A reference to file session + */ + static CMsgErrorDiskSpaceObserver* NewL( CMsgErrorWatcher* aWatcher, CMsvSession& aSession, RFs& aFs ); + + /** + * Destructor. + */ + virtual ~CMsgErrorDiskSpaceObserver(); + + public: // New functions + + /** + * Updates the trigger limit to aLimit, if it + * is smaller than current limit. (Re)activates + * the active object. + * + * @param aLimit The trigger limit in bytes + */ + void SetLimitAndActivateL( TInt32 aLimit ); + + private: + + /** + * Private C++ constructor. + * + * @param aWatcher A pointer to CMsgErrorWatcher + * @param aSession A reference to message server session + * @param aFs A reference to file session + */ + CMsgErrorDiskSpaceObserver( CMsgErrorWatcher* aWatcher, CMsvSession& aSession, RFs& aFs ); + + private: + + /** + * From CActive + */ + void RunL(); + + /** + * From CActive + */ + void DoCancel(); + + private: // Data + + CMsgErrorWatcher* iWatcher; + CMsvSession& iSession; + RFs& iFs; + TInt32 iLimit; + }; + +#endif // MSGERRORDISKSPACEOBSERVER_H + +// End of File