messagingfw/deprecate/send_ui_api/inc/CMessageAddress.h
branchRCL_3
changeset 23 d51193d814ea
parent 22 d2c4c66342f3
child 24 002ade1da91c
equal deleted inserted replaced
22:d2c4c66342f3 23:d51193d814ea
     1 /*
       
     2 * Copyright (c) 2002-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:   Encapsulates message real addressa and alias
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_MESSAGEADDRESS_H
       
    21 #define C_MESSAGEADDRESS_H
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 class CMessageAddressImpl;
       
    26 class RWriteStream;
       
    27 class RReadStream;
       
    28 
       
    29 /**
       
    30  *  Encapsulates message recipient real address and alias.
       
    31  *
       
    32  *  @lib sendui
       
    33  *  @since S60 v3.0
       
    34  */
       
    35 class CMessageAddress : public CBase
       
    36 {
       
    37 public:  // Constructors and destructor
       
    38 
       
    39     /**
       
    40     * Two-phased constructor.
       
    41     */
       
    42     IMPORT_C static CMessageAddress* NewL();
       
    43     
       
    44     /**
       
    45     * Two-phased constructor. Leaves object to cleanup stack.
       
    46     */
       
    47     IMPORT_C static CMessageAddress* NewLC();
       
    48     
       
    49     /**
       
    50     * Destructor.
       
    51     */
       
    52     IMPORT_C virtual ~CMessageAddress();
       
    53 
       
    54 public: // New functions
       
    55 
       
    56    /**
       
    57     * Sets real address.
       
    58     *
       
    59     * @since Series 60 3.0
       
    60     * @param aAddress Real address.
       
    61     * @return None.
       
    62     */
       
    63     IMPORT_C void SetAddressL( const TDesC& aAddress );
       
    64 
       
    65    /**
       
    66     * Returns real address.
       
    67     *
       
    68     * @since Series 60 3.0
       
    69     * @return Real address.
       
    70     */
       
    71     IMPORT_C const TPtrC Address() const;
       
    72 
       
    73     /**
       
    74     * Sets alias for the real address.
       
    75     *
       
    76     * @since Series 60 3.0
       
    77     * @param aAlias Alias for the real address.
       
    78     * @return None.
       
    79     */
       
    80     IMPORT_C void SetAliasL( const TDesC& aAlias );
       
    81 
       
    82    /**
       
    83     * Returns alias for the address.
       
    84     *
       
    85     * @since Series 60 3.0
       
    86     * @return Alias for the real address.
       
    87     */
       
    88     IMPORT_C const TPtrC Alias() const;
       
    89 
       
    90     /**
       
    91     * Externalizes address data to a stream
       
    92     *
       
    93     * @since Series 60 3.2
       
    94     * @param aStream Destination stream
       
    95     * @return None.
       
    96     */ 
       
    97     IMPORT_C void ExternalizeL( RWriteStream& aStream );
       
    98     
       
    99     /**
       
   100     * Internalizes message data from a stream
       
   101     *
       
   102     * @since Series 60 3.2
       
   103     * @param Source stream
       
   104     * @return None.
       
   105     */ 
       
   106     IMPORT_C void InternalizeL( RReadStream& aStream );
       
   107 
       
   108 private:
       
   109     
       
   110     /**
       
   111     * C++ default constructor.
       
   112     */
       
   113     CMessageAddress();
       
   114     
       
   115     /**
       
   116     * Symbian 2nd phase constructor.
       
   117     */
       
   118     void ConstructL();
       
   119 
       
   120 private:  // Data
       
   121 
       
   122     /**
       
   123      * Message address implementation.
       
   124      * Own.
       
   125      */
       
   126     CMessageAddressImpl* iMessageAddressImpl;
       
   127     };
       
   128 
       
   129 /**  Address array */
       
   130    
       
   131 typedef CArrayPtrFlat<CMessageAddress> CMessageAddressArray;
       
   132 
       
   133 #endif      // C_MESSAGEADDRESS_H
       
   134 
       
   135 // End of File