wvuing/wvlogger/Inc/MCALoggerWriteInterface.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:  Interface for getting write access to history files
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __MCALOGGERWRITEINTERFACE_H__
       
    20 #define __MCALOGGERWRITEINTERFACE_H__
       
    21 
       
    22 //INCLUDE FILES
       
    23 #include <e32base.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 
       
    27 class MCALoggerMessageHeader;
       
    28 class MCALoggerMessage;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  *  Interface for getting write access to history files
       
    34  *
       
    35  *  @lib CALogger.dll
       
    36  *  @since 2.1
       
    37  */
       
    38 class MCALoggerWriteInterface
       
    39     {
       
    40     public:
       
    41 
       
    42         /**
       
    43          *	Destructor
       
    44          */
       
    45         virtual ~MCALoggerWriteInterface() {}
       
    46 
       
    47     public: // Interface
       
    48 
       
    49         /**
       
    50          * Starts logging. Sets logging on. Informs observer to addfile.
       
    51          *	Leaves with KErrArgument if header is NULL.
       
    52          *	Leaves with KErrInUse if loggins is already on.
       
    53          *	Leaves if file creation fails.
       
    54          * @since 2.1
       
    55          * @param aFile Header information.
       
    56          */
       
    57         virtual void StartLoggingL( MCALoggerMessageHeader* aFile ) = 0;
       
    58 
       
    59         /**
       
    60          *	Ends logging. Close the file. Informs observer to remove file.
       
    61          *	Sets logging off.
       
    62          *	@since 2.1
       
    63          */
       
    64         virtual void EndLoggingL() = 0;
       
    65 
       
    66         /**
       
    67          *	Checks if logging is on.
       
    68          *	@since 2.1
       
    69          *	@return ETrue if logging is on. EFalse if logging is off.
       
    70          */
       
    71         virtual TBool IsLoggingOn() = 0;
       
    72 
       
    73         /**
       
    74          *	Logs message. Logs message if there is enough memory.
       
    75          *	Leaves if logging is not on with KErrNotReady
       
    76          *	Leaves if logging fails.
       
    77          *	@since 2.1
       
    78          *	@param aMessage Message information.
       
    79          */
       
    80         virtual void MakeLogL( MCALoggerMessage& aMessage ) = 0;
       
    81 
       
    82 
       
    83         //fix - refer Ui Spec Approved Version 1.0
       
    84         //(Instant Messaging NG 001 151006.pdf)
       
    85         //Section 10.2.10 Pg 131 -
       
    86         //"In case user has saved the image already or sent it
       
    87         //by himself, this option(save) is not available."
       
    88 
       
    89         /**
       
    90          * Note : Please dont delete while merging the wvui20 changes
       
    91          * Relogs the file and saves all the messages
       
    92          * only if the file has become dirty.
       
    93          * New implementation - Used if user saves an image
       
    94          * in saved conversations that info is stored back on
       
    95          * to the file and subsequently we dont allow resaving of the
       
    96          * same image
       
    97 
       
    98         /**
       
    99          * Starts relogging. Sets logging on.
       
   100          *	Leaves with KErrArgument if header is NULL.
       
   101          *	Leaves with KErrInUse if loggins is already on.
       
   102          *	Leaves if file replacing of file fails.
       
   103          * @since 3.2
       
   104          * @param aFile Header information.
       
   105          */
       
   106         virtual void ReLoggingL( MCALoggerMessageHeader& aFile ) = 0;
       
   107 
       
   108         /**
       
   109          *	Ends Relogging. Close the file.
       
   110          *	Sets logging off.
       
   111          *	@since 3.2
       
   112          */
       
   113         virtual void EndReLogging() = 0;
       
   114 
       
   115 
       
   116     };
       
   117 
       
   118 #endif      // __MCALOGGERWRITEINTERFACE_H__
       
   119 
       
   120 // End of File