emailservices/emailstore/message_store/client/src/MsgStoreAddress.cpp
changeset 0 8466d47a6819
child 8 e1b6206813b4
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Message store address client implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 //<cmail>
       
    21 #include "MsgStoreAddress.h"
       
    22 //</cmail>
       
    23 
       
    24 // --------------------------
       
    25 // CLASSES
       
    26 // --------------------------
       
    27 
       
    28 // --------------------------
       
    29 // RMsgStoreAddress
       
    30 // --------------------------
       
    31 EXPORT_C void RMsgStoreAddress::Close()
       
    32     {
       
    33     iEmailAddress.Close();
       
    34     iDisplayName.Close();
       
    35     }
       
    36 
       
    37 
       
    38 
       
    39 // --------------------------
       
    40 // RMsgStoreAddress
       
    41 // --------------------------
       
    42 // ==========================================================================
       
    43 // FUNCTION: SetMRUAddressListL
       
    44 // ==========================================================================
       
    45 EXPORT_C CMsgStoreAddress* CMsgStoreAddress::NewL( const TDesC& aEmailAddress, const TDesC& aDisplayName )
       
    46     {
       
    47     CMsgStoreAddress* self = new(ELeave) CMsgStoreAddress();
       
    48     CleanupStack::PushL( self );
       
    49     self->ConstructL( aEmailAddress, aDisplayName );
       
    50     CleanupStack::Pop( self );
       
    51     return self;
       
    52     }
       
    53 
       
    54 // ==========================================================================
       
    55 // FUNCTION: CMsgStoreAddress
       
    56 // ==========================================================================
       
    57 CMsgStoreAddress::CMsgStoreAddress()
       
    58     {
       
    59     //do nothing
       
    60     }
       
    61 
       
    62 // ==========================================================================
       
    63 // FUNCTION: EmailAddress
       
    64 // ==========================================================================
       
    65 EXPORT_C const TDesC& CMsgStoreAddress::EmailAddress()
       
    66     {
       
    67     return iEmailAddress;
       
    68     }
       
    69         
       
    70 // ==========================================================================
       
    71 // FUNCTION: DisplayName
       
    72 // ==========================================================================
       
    73 EXPORT_C const TDesC& CMsgStoreAddress::DisplayName()
       
    74     {
       
    75     return iDisplayName;
       
    76     }
       
    77 
       
    78 // ==========================================================================
       
    79 // FUNCTION: ~CMsgStoreAddress
       
    80 // ==========================================================================
       
    81 EXPORT_C CMsgStoreAddress::~CMsgStoreAddress()
       
    82     {
       
    83     iDisplayName.Close();
       
    84     iEmailAddress.Close();
       
    85     }
       
    86         
       
    87 // ==========================================================================
       
    88 // FUNCTION: ~CMsgStoreAddress
       
    89 // ==========================================================================
       
    90 void CMsgStoreAddress::ConstructL( const TDesC& aEmailAddress, const TDesC& aDisplayName )
       
    91     {
       
    92     iEmailAddress.CreateL( aEmailAddress );
       
    93     iDisplayName.CreateL( aDisplayName );
       
    94     }