emailservices/emailserver/cmailhandlerplugin/inc/cmailmessagedetails.h
changeset 0 8466d47a6819
child 8 e1b6206813b4
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2008 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: This file defines class CMailMessageDetails.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMAILCPSHANDLERUTILS_H_
       
    20 #define CMAILCPSHANDLERUTILS_H_
       
    21 
       
    22 #include <e32def.h>
       
    23 #include <e32base.h>
       
    24 //<cmail>
       
    25 #include "CFSMailCommon.h"
       
    26 //</cmail>
       
    27 
       
    28 class CMailMailboxDetails;
       
    29 
       
    30 /**
       
    31  *  Class holding data related to message
       
    32  * 
       
    33  *  @lib fsmailserver.exe
       
    34  *  @since S60 v5.1
       
    35  */
       
    36 NONSHARABLE_CLASS( CMailMessageDetails ) : public CBase
       
    37     {
       
    38 public:
       
    39     /**
       
    40      * Two-phased constructor.
       
    41      * @param aMsgId Id of the message
       
    42      * @param aMailboxDetails pointer to the mailbox details object
       
    43      * @param aSender data
       
    44      * @param aSubject data
       
    45      * @param aTimeStamp data
       
    46      */ 
       
    47     static CMailMessageDetails* NewL(
       
    48         TFSMailMsgId aMsgId,
       
    49         CMailMailboxDetails* aMailboxDetails,
       
    50         const TDesC& aSender, 
       
    51         const TDesC& aSubject,
       
    52         const TTime aTimeStamp );
       
    53     
       
    54     /**
       
    55     * Destructor.
       
    56     */
       
    57     virtual ~CMailMessageDetails();
       
    58 
       
    59 private:
       
    60     /**
       
    61      * ConstructL
       
    62      * @param aSender data
       
    63      * @param aSubject data
       
    64      */ 
       
    65     void ConstructL( const TDesC& aSender, const TDesC& aSubject );
       
    66     
       
    67     /**
       
    68      * Constructor
       
    69      * @param aMsgId Id of the message
       
    70      * @param aMailboxDetails pointer to the mailbox details object
       
    71      * @param aTimeStamp data
       
    72      */ 
       
    73     CMailMessageDetails(
       
    74         TFSMailMsgId aMsgId, 
       
    75         CMailMailboxDetails* aMailboxDetails, 
       
    76         const TTime aTimeStamp );
       
    77 
       
    78 public: // data
       
    79     // For bookkeeping
       
    80     // id of the message in the message store
       
    81     TFSMailMsgId     iMsgId;
       
    82     // cross reference to the mailbox details object
       
    83     CMailMailboxDetails* iMailboxDetails;
       
    84     // Data
       
    85     // sender of the message
       
    86     HBufC*           iSender;
       
    87     // subject of the message
       
    88     HBufC*           iSubject;
       
    89     // timestamp of the message
       
    90     TTime            iTimeStamp;
       
    91     };
       
    92 
       
    93 #endif /*CMAILCPSHANDLERUTILS_H_*/