phonesrv_plat/telephony_mediator_api/inc/callremotepartyinformation.h
changeset 0 ff3b6d0fd310
child 3 a4a774cb6ea7
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2009-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:  Call remote party information
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CALLREMOTEPARTYINFORMATION_H
       
    20 #define CALLREMOTEPARTYINFORMATION_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <MCallRemotePartyInfo.h>
       
    24 
       
    25 class RWriteStream;
       
    26 
       
    27 /**  The category UID for the messages in this header file. */
       
    28 const TUid KCatCallRemotePartyInformation = { 0x10207906 }; 
       
    29 
       
    30 /**  Version number of this API */
       
    31 const TInt KCallRemotePartyInformationVersionMajor( 1 );
       
    32 const TInt KCallRemotePartyInformationVersionMinor( 0 );
       
    33 const TInt KCallRemotePartyInformationVersionBuild( 0 );
       
    34 
       
    35 /**
       
    36  * Holds single calls remote party information
       
    37  * 
       
    38  * @since S60 v5.1
       
    39  */
       
    40 NONSHARABLE_CLASS( CCallRemotePartyInfo ) : public CBase, public MCallRemotePartyInfo
       
    41     {
       
    42 public:
       
    43     
       
    44     inline static CCallRemotePartyInfo* NewL();
       
    45     inline static CCallRemotePartyInfo* NewLC();
       
    46     inline ~CCallRemotePartyInfo();
       
    47     
       
    48     inline void ExternalizeL( RWriteStream& aStream ) const;
       
    49     inline void InternalizeL( RReadStream& aStream );
       
    50     
       
    51     // Size of the descriptor required for this information
       
    52     // to be externalized
       
    53     inline TInt Size() const;
       
    54     
       
    55     inline void SetAddressL( const TDesC& aAddress );
       
    56     inline void SetMatchedNameL( const TDesC& aName );
       
    57     inline void SetNameFromNetworkL( const TDesC& aName );
       
    58     inline void SetCompanyNameL( const TDesC& aName );
       
    59     inline void SetCallIndex( TInt aCallIndex );
       
    60     inline void SetRemoteIdentity( TRemoteIdentityStatus aRemoteIdentity );
       
    61     inline void SetSATCall( TBool aSatCall );
       
    62     
       
    63 // From base class MCallRemotePartyInfo
       
    64     inline const TDesC& Address() const;
       
    65     inline const TDesC& MatchedName() const;
       
    66     inline const TDesC& NameFromNetwork() const;
       
    67     inline const TDesC& CompanyName() const;    
       
    68     inline TInt CallIndex() const;  
       
    69     inline TRemoteIdentityStatus RemoteIdentity() const;
       
    70     inline TBool SATCall() const;
       
    71     inline TBool operator==(const MCallRemotePartyInfo& aRemoteInfo) const;
       
    72     
       
    73 private:
       
    74     
       
    75     inline static HBufC* ReadDescriptorFromStreamLC( RReadStream& aStream );
       
    76     inline static void WriteDescriptorToStreamL( 
       
    77         RWriteStream& aStream,
       
    78         const TDesC& aDesc );
       
    79     
       
    80     inline CCallRemotePartyInfo();
       
    81     inline void ConstructL();
       
    82     
       
    83 private: // Data
       
    84     
       
    85     HBufC* iMatchedName;
       
    86     HBufC* iNameFromNetwork;
       
    87     HBufC* iCompanyName;
       
    88     HBufC* iAddress;
       
    89     TInt iCallIndex;
       
    90     TBool iSATCall;
       
    91     TRemoteIdentityStatus iRemoteIdentity;
       
    92     };
       
    93     
       
    94 /**
       
    95  * Holds all calls remote party information.
       
    96  *
       
    97  * @since S60 v5.1
       
    98  */
       
    99 NONSHARABLE_CLASS( CCallRemotePartyInfos ) : public CBase
       
   100     {
       
   101 public:
       
   102     
       
   103     inline static CCallRemotePartyInfos* NewL();
       
   104     inline static CCallRemotePartyInfos* NewLC();
       
   105     inline ~CCallRemotePartyInfos();
       
   106     
       
   107     /**
       
   108      * Adds remote party information
       
   109      * @param aInfo Information to be added. Ownership is taken. Must not be NULL.
       
   110      */
       
   111     inline void AddL( CCallRemotePartyInfo* aInfo );
       
   112     
       
   113     /**
       
   114      * Access to remote party infos
       
   115      */
       
   116     inline const RPointerArray<CCallRemotePartyInfo>& RemotePartyInfos() const;
       
   117     
       
   118     /**
       
   119      * Externalizes the remote party information to descriptor.
       
   120      */
       
   121     inline HBufC8* ExternalizeL() const;
       
   122     
       
   123     /**
       
   124      * Internalizes remote party information from data. Note that
       
   125      * the existing infos are removed before internalizing. So if leave
       
   126      * occurs the old data is lost.
       
   127      */
       
   128     inline void InternalizeL( const TDesC8& aData ); 
       
   129     
       
   130 private:
       
   131     
       
   132     inline CCallRemotePartyInfos();
       
   133     
       
   134 private: // Data
       
   135     
       
   136     RPointerArray<CCallRemotePartyInfo> iInfos;
       
   137     };
       
   138 
       
   139   
       
   140 /**
       
   141  * Commands
       
   142  */
       
   143 enum TCallRemotePartyInformationCommands
       
   144     {
       
   145     EGetCallRemotePartyInformation = 0
       
   146     };
       
   147     
       
   148 /**
       
   149  * Events
       
   150  */
       
   151 enum TCallRemotePartyInformationEvents
       
   152     {
       
   153     EChangesInRemotePartyInformation = 0
       
   154     };
       
   155    
       
   156 #include <callremotepartyinformation.inl>
       
   157 
       
   158 
       
   159 
       
   160 #endif // CALLREMOTEPARTYINFORMATION_H