emailservices/nmailbase/inc/nmaddress.h
branchRCL_3
changeset 24 d189ee25cf9d
equal deleted inserted replaced
23:dcf0eedfc1a3 24:d189ee25cf9d
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef NMADDRESS_H_
       
    19 #define NMADDRESS_H_
       
    20 
       
    21 #include <QExplicitlySharedDataPointer>
       
    22 
       
    23 #include "nmbasedef.h"
       
    24 
       
    25 
       
    26 class NMBASE_EXPORT NmAddressPrivate : public QSharedData
       
    27 {
       
    28 public:
       
    29     NmAddressPrivate();
       
    30     virtual ~NmAddressPrivate();
       
    31 
       
    32 public:
       
    33     QString mDisplayName;
       
    34     QString mAddress;
       
    35 };
       
    36 
       
    37 class NMBASE_EXPORT NmAddress
       
    38 {
       
    39 public:
       
    40     NmAddress();
       
    41     NmAddress(const QString &displayName, const QString &address);
       
    42     NmAddress(const QString &address);
       
    43     NmAddress(const NmAddress &nmAddress);
       
    44     NmAddress(QExplicitlySharedDataPointer<NmAddressPrivate> nmPrivateAddress);
       
    45     NmAddress &operator=(const NmAddress &nmAddress);
       
    46     virtual ~NmAddress();
       
    47 
       
    48     bool operator==(const NmAddress &otherAddress) const;
       
    49     bool operator!=(const NmAddress &otherAddress) const;
       
    50 
       
    51     void setDisplayName(const QString &displayName);
       
    52     QString displayName() const;
       
    53     void setAddress(const QString &address);
       
    54     QString address() const;
       
    55 
       
    56 private:
       
    57     // Data object shared between Symbian and QT data types.
       
    58     QExplicitlySharedDataPointer<NmAddressPrivate> d;
       
    59 
       
    60     friend class CFSMailAddress;
       
    61 };
       
    62 
       
    63 #endif /* NMADDRESS_H_ */
       
    64 
       
    65 
       
    66 
       
    67 
       
    68