mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/callinformation.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2008-2008 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 state information
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CALLINFORMATION_H
       
    20 #define CALLINFORMATION_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <mcall.h>
       
    24 
       
    25 /**  The category UID for the messages in this header file. */
       
    26 const TUid KCatCallInformation = { 0x102078FD }; 
       
    27 
       
    28 /**  Version number of this API */
       
    29 const TInt KCallInformationVersionMajor( 1 );
       
    30 const TInt KCallInformationVersionMinor( 0 );
       
    31 const TInt KCallInformationVersionBuild( 0 );
       
    32   
       
    33 #include <e32cmn.h>
       
    34 
       
    35 /**
       
    36  *  Holds single calls information.
       
    37  *
       
    38  *  @since S60 v5.1
       
    39  */
       
    40 NONSHARABLE_CLASS( TCallInfo ) : public MCall
       
    41     {
       
    42 public:
       
    43     
       
    44     TInt CallIndex() const { return iIndex; }   
       
    45     
       
    46     CCPCall::TCallType CallType() const { return iType; }
       
    47 
       
    48     CCPCall::TCallState CallState() const { return iState; }
       
    49     
       
    50     TUint32 ServiceId() const { return iServiceId; }
       
    51 
       
    52     CCPCall::TCallDirection CallDirection() const { return iDirection; }
       
    53     
       
    54     CCPCall::TCallState iState;
       
    55     CCPCall::TCallType iType;
       
    56     CCPCall::TCallDirection iDirection;
       
    57     TInt iIndex;
       
    58     TInt iIdentifier;
       
    59     TUint32 iServiceId;
       
    60     };
       
    61 
       
    62 
       
    63 /**
       
    64  *  Class holding information about calls.
       
    65  *  Can be packed for IPC purposes. 
       
    66  *  
       
    67  *  @since S60 v5.1
       
    68  */
       
    69 NONSHARABLE_CLASS( CCallInfos ) : public CBase 
       
    70     {
       
    71 public:
       
    72     
       
    73     /**
       
    74      * Two-phased constructor.     
       
    75      */
       
    76     static CCallInfos* NewL();
       
    77     
       
    78     /**
       
    79      * Two-phased constructor.     
       
    80      */
       
    81     static CCallInfos* NewLC();
       
    82     
       
    83     /**
       
    84      * Destructor.
       
    85      */
       
    86     virtual ~CCallInfos();
       
    87     
       
    88     /**
       
    89      * Adds information about a call.  
       
    90      *
       
    91      * @since S60 v5.1
       
    92      * @param aCallInfo Call information to be added.    
       
    93      */
       
    94     inline void AddL( TCallInfo& aCallInfo );
       
    95     
       
    96     /**
       
    97      * Returns information about all calls.
       
    98      *
       
    99      * @since S60 v5.1      
       
   100      * @return Reference to call info array
       
   101      */
       
   102     inline const RArray<TCallInfo>& CallInfos() const;
       
   103     
       
   104     /**
       
   105      * Packages this class for IPC transfer.
       
   106      *
       
   107      * @since S60 v5.1
       
   108      * @return Pointer to descriptor holding the class.
       
   109      */
       
   110     inline HBufC8* ExternalizeL() const;
       
   111     
       
   112     /**
       
   113      * Intializes the class from descriptor
       
   114      *
       
   115      * @since S60 v5.1
       
   116      * @param aCallInfos Reference to descriptor containg the class data.   
       
   117      */    
       
   118     inline void InternalizeL( const TDesC8& aCallInfos );
       
   119     
       
   120 
       
   121     // Helper function for the STUB ONLY:
       
   122     inline void AddCallInfosL();
       
   123     
       
   124 private:
       
   125 
       
   126     inline CCallInfos();
       
   127     
       
   128     
       
   129 private:
       
   130     RArray<TCallInfo> iCallInfos;
       
   131     };
       
   132 
       
   133 /**
       
   134  * Commands
       
   135  */
       
   136 enum TCallInformationCommands
       
   137     {
       
   138     EGetAllCallStates = 0
       
   139     };
       
   140     
       
   141 /**
       
   142  * Events
       
   143  */
       
   144 enum TCallInformationEvents
       
   145     {
       
   146     EChangesInCallStates = 0
       
   147     };
       
   148 
       
   149 
       
   150 // Implementation is stubed.
       
   151 #include "ccallinfos_stub.inl"
       
   152 
       
   153 #endif // CALLINFORMATION_H