epoc32/include/mw/cmessageaddress.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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