wvuing/wvlogger/Src/MCALoggerWriteObserver.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Channel for writer to inform about state changes to observer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __MCALOGGERWRITEOBSERVER_H__
       
    20 #define __MCALOGGERWRITEOBSERVER_H__
       
    21 
       
    22 //INCLUDES
       
    23 
       
    24 #include "PrivateDefinitions.h"
       
    25 
       
    26 //	FORWARD CLASS DECLERATIONS
       
    27 
       
    28 class MCALoggerMessageHeader;
       
    29 class MCALoggerWriteInterface;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  *  Channel for writer to inform about state changes to observer
       
    35  *
       
    36  *  @lib CALogger.dll
       
    37  *  @since 2.1
       
    38  */
       
    39 class MCALoggerWriteObserver
       
    40     {
       
    41     public: //Type definitions
       
    42 
       
    43 
       
    44     public: // Interface
       
    45 
       
    46         /**
       
    47          *	Add file to write buffer. Ownership of iFile transfered to observer
       
    48          *	@since 2.1
       
    49          *	@param iFile File information
       
    50          */
       
    51         virtual void AddFileL( TFileRelation aFile ) = 0;
       
    52 
       
    53         /**
       
    54          *	Remove file from write buffer.
       
    55          *	@since 2.1
       
    56          *	@param aWriter File to be removed is recognized with file writer pointer.
       
    57          */
       
    58         virtual void RemoveFileL( MCALoggerWriteInterface& aWriter ) = 0;
       
    59 
       
    60         /**
       
    61          *	Creates new filename for writer. Ownership is transfered to caller.
       
    62          *	@since 2.1
       
    63          *	@return Pointer to new filename.
       
    64          */
       
    65         virtual HBufC* CreateNewFilenameL() = 0;
       
    66 
       
    67         /**
       
    68          *	Checks memory situation. Check if there is enough memory to write
       
    69          *	file.
       
    70          *	@since 2.1
       
    71          *	@param aMemoryRequired Memory required in bytes.
       
    72          *	@return ETrue if there is enough memory and EFalse if not.
       
    73          */
       
    74         virtual TBool CheckMemoryL( TInt aMemoryRequired ) = 0;
       
    75 
       
    76     protected:
       
    77 
       
    78         /**
       
    79          * Destructor.
       
    80          */
       
    81         virtual ~MCALoggerWriteObserver() {};
       
    82     };
       
    83 
       
    84 #endif      // __MCALOGGERWRITEOBSERVER_H__
       
    85 
       
    86 // End of File