phoneapp/phoneuiview/inc/phonebubbleextensiondata.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 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:  Contains call data.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_PHONEBUBBLEEXTENSIONDATA_H
       
    20 #define C_PHONEBUBBLEEXTENSIONDATA_H
       
    21 
       
    22 #include <telbubbleextensiondata.h>
       
    23 
       
    24 class TPhoneCmdParamCallHeaderData;
       
    25 
       
    26 /**
       
    27  * Call data.
       
    28  * All data that plugins need to know about a call is collected here.
       
    29  * Note that the data is changed to reflect changed call info before plugin
       
    30  * is notified about changes, so plugin needs to save the current information
       
    31  * if it needs it for comparison or otherwise.
       
    32  *
       
    33  *  @lib ?library
       
    34  *  @since S60 5.0
       
    35  */
       
    36 class CPhoneBubbleExtensionData : public CBase, public MTelBubbleExtensionData
       
    37     {
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Two-phased constructor.
       
    42      * 
       
    43      * @param aBubbleId Bubble Id this data relates to.
       
    44      * @param aParams Phoneapp parameters
       
    45      * @param aFirst Is this the first call. Default yes.
       
    46      */
       
    47     static CPhoneBubbleExtensionData* NewL(
       
    48             TInt aBubbleId,
       
    49             TPhoneCmdParamCallHeaderData* aParams,
       
    50             TBool aFirst = ETrue );
       
    51 
       
    52     /**
       
    53      * Two-phased constructor.
       
    54      * 
       
    55      * @param aBubbleId Bubble Id this data relates to.
       
    56      * @param aParams Phoneapp parameters
       
    57      * @param aFirst Is this the first call. Default yes.
       
    58      */
       
    59     static CPhoneBubbleExtensionData* NewLC( 
       
    60             TInt aBubbleId,
       
    61             TPhoneCmdParamCallHeaderData* aParams,
       
    62             TBool aFirst = ETrue );
       
    63 
       
    64     /**
       
    65     * Destructor.
       
    66     */
       
    67     virtual ~CPhoneBubbleExtensionData();
       
    68 
       
    69     /**
       
    70      * (Re)sets the call state
       
    71      *
       
    72      * @since S60 5.0
       
    73      * @param aState New state (TPEState, not bubble state)
       
    74      * @param aFirst Is this the first call. Default yes.
       
    75      */
       
    76     void SetState( TInt aState, TBool aFirst = ETrue );
       
    77 
       
    78 // from base class MTelBubbleExtensionData
       
    79 
       
    80     /**
       
    81      * Bubble ID this call is connected to.
       
    82      * @return Bubble ID.
       
    83      */
       
    84     TInt BubbleId() const;
       
    85 
       
    86     /**
       
    87      * Call state information.
       
    88      * @return Call state.
       
    89      */
       
    90     TCallState State() const;
       
    91 
       
    92     /**
       
    93      * Call type information
       
    94      * @return Call type.
       
    95      */
       
    96     TCallType Type() const;
       
    97 
       
    98     /**
       
    99      * Call service id
       
   100      * @return Call service
       
   101      */
       
   102     TUint32 ServiceId() const;
       
   103 
       
   104     /**
       
   105      * Contact Link related to this call.
       
   106      * @return Reference to Contact Link
       
   107      */
       
   108     const TDesC8& ContactLink() const;
       
   109 
       
   110     /**
       
   111      * Remote phone number for this call.
       
   112      * @return Remote phone number
       
   113      */
       
   114     const TDesC& RemotePhoneNumber() const;
       
   115 private:
       
   116 
       
   117     /**
       
   118      * First phase constructor.
       
   119      * 
       
   120      * @param aBubbleId Bubble Id this data relates to.
       
   121      * @param aParams Phoneapp parameters
       
   122      * @param aFirst Is this the first call
       
   123      */
       
   124     CPhoneBubbleExtensionData( 
       
   125             TInt aBubbleId,
       
   126             TPhoneCmdParamCallHeaderData* aParams, 
       
   127             TBool aFirst );
       
   128 
       
   129     /**
       
   130      * Second phase constructor.
       
   131      * 
       
   132      * @param aParams Phoneapp parameters
       
   133      * @param aFirst Is this the first call
       
   134      */
       
   135     void ConstructL( TPhoneCmdParamCallHeaderData* aParams );
       
   136 
       
   137 private: // data
       
   138 
       
   139     /**
       
   140      * Bubble ID
       
   141      */
       
   142     TInt iBubbleId;
       
   143 
       
   144     /**
       
   145      * Call state
       
   146      */
       
   147     TCallState iState;
       
   148 
       
   149     /**
       
   150      * Call type
       
   151      */
       
   152     TCallType iType;
       
   153 
       
   154     /**
       
   155      * Service id
       
   156      */
       
   157     TUint32 iService;
       
   158 
       
   159     /**
       
   160      * Contact Link
       
   161      * Owned.
       
   162      */
       
   163     HBufC8* iContactLink;
       
   164 
       
   165     /**
       
   166      * Remote phone number
       
   167      * Owned.
       
   168      */
       
   169     HBufC* iRemotePhoneNumber;
       
   170     };
       
   171 
       
   172 
       
   173 #endif // C_PHONEBUBBLEEXTENSIONDATA_H