wvuing/wvuieng/EngInc/MCALoggerHeadersInterface.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:  Offers information regarding a given header to the UI.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __MCALOGGERHEADERSINTERFACE_H__
       
    20 #define __MCALOGGERHEADERSINTERFACE_H__
       
    21 
       
    22 // INCLUDES
       
    23 #include    "PublicEngineDefinitions.h"
       
    24 
       
    25 #include    <e32std.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class RWriteStream;
       
    29 class MCAMessagesReadInterface;
       
    30 class MCALoggerMessageHeader;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  Interface class for UI->Engine communication ( UI retrieves information ).
       
    36 *  Offers information regarding a given header to the UI.
       
    37 *
       
    38 *  @lib CAEngine.lib
       
    39 *  @since 2.1
       
    40 */
       
    41 class MCALoggerHeadersInterface
       
    42     {
       
    43     public: // New functions
       
    44 
       
    45         /**
       
    46         * Returns the number data items ( headers count ).
       
    47         * @return Number of data items.
       
    48         * @since 2.5
       
    49         */
       
    50         virtual TInt HeaderCount() const = 0;
       
    51 
       
    52         /**
       
    53         * Returns name of recorded chat
       
    54         * @param aIndex is index of recorded chat
       
    55         * @return Reference to name of recorded chat
       
    56         */
       
    57         virtual const TDesC& Name( TInt aIndex ) const = 0;
       
    58 
       
    59         /**
       
    60         * Returns the type of the chat data.
       
    61         * @param aIndex is the index to the header array.
       
    62         * @return Message type.
       
    63         */
       
    64         virtual TChatType ChatType( TInt aIndex ) const = 0;
       
    65 
       
    66         /**
       
    67         * Returns time when history save started.
       
    68         * @param aIndex is the index to the header array.
       
    69         * @return Start time
       
    70         */
       
    71         virtual TTime StartTime( TInt aIndex ) const = 0;
       
    72 
       
    73         /**
       
    74         * Returns time when history save ended.
       
    75         * @param aIndex is the header index.
       
    76         * @return End time.
       
    77         */
       
    78         virtual TTime EndTime( TInt aIndex ) const = 0;
       
    79 
       
    80         /**
       
    81          * Returns identification information of history data
       
    82          * @param aIndex is the header index
       
    83          * @return Identication information of history data.
       
    84          */
       
    85         virtual const TDesC& Identification( TInt aIndex ) const = 0;
       
    86 
       
    87         /**
       
    88          *	Delete one history file recognized by index.
       
    89          *	@since 2.5
       
    90          *	@param aIndex Index of file to be deleted from db.
       
    91          */
       
    92         virtual void DeleteHistoryFileL( TInt aIndex  ) = 0;
       
    93 
       
    94         /**
       
    95          * Get message for sending it via MTM
       
    96          * @param aIndex Index of message to send
       
    97          * @param aStream Stream where message is written.
       
    98          * @since 2.5
       
    99          */
       
   100         virtual void GetMessageForSendingViaMTML(
       
   101             TInt aIndex, RWriteStream& aStream ) = 0;
       
   102 
       
   103         /**
       
   104          * Interface to access messages
       
   105          * @param aIndex Index of header whichs messages are accessed with interface
       
   106          * @return Access to messages.
       
   107          * @since 2.5
       
   108          */
       
   109         virtual MCAMessagesReadInterface& MessagesInterfaceL( TInt aIndex ) = 0;
       
   110 
       
   111         /**
       
   112          * Deletes message container of current recorded chat
       
   113          * from engine. Used to free memory when exiting current
       
   114          * recorded chat view i.e. called from DoDeactivate method
       
   115          * of view class.
       
   116          * @since 3.1
       
   117          */
       
   118         virtual void DeleteRecordedChatContainerL() = 0;
       
   119 
       
   120         /**
       
   121          * Finds index of recorded chat by name.
       
   122          * @since S60 v3.2
       
   123          * @param aName Name of recorded chat.
       
   124          * @return Index of chat or KErrNotFound if
       
   125          *         chat is not found.
       
   126          */
       
   127         virtual TInt Index( const TDesC& aName ) const = 0;
       
   128 
       
   129         //fix - refer Ui Spec Approved Version 1.0
       
   130         //(Instant Messaging NG 001 151006.pdf)
       
   131         //Section 10.2.10 Pg 131 -
       
   132         //"In case user has saved the image already or sent it
       
   133         //by himself, this option(save) is not available."
       
   134 
       
   135         /**
       
   136          * Note : Please dont delete while merging the wvui20 changes
       
   137          * Relogs the file and saves all the messages
       
   138          * only if the file has become dirty.
       
   139          * New implementation - Used if user saves an image
       
   140          * in saved conversations that info is stored back on
       
   141          * to the file and subsequently we dont allow resaving of the
       
   142          * same image
       
   143          * @since S60 v3.2
       
   144          * @param aIndex Index of header whichs messages are accessed with interface
       
   145          * @return void
       
   146          */
       
   147         virtual void ReLoggingL( TInt aIndex ) = 0;
       
   148     public:
       
   149 
       
   150         /**
       
   151          *	Destructor
       
   152          */
       
   153         virtual ~MCALoggerHeadersInterface() {};
       
   154     };
       
   155 
       
   156 #endif      // __MCALOGGERHEADERSINTERFACE_H__
       
   157 
       
   158 // End of File