phoneengine/callhandling/inc/cpeconferencecall.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
child 76 cfea66083b62
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     1 /*
       
     2 * Copyright (c) 2002-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:  This file contains the header file of the CPEConferenceCallData object
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPECONFERENCECALLDATA_H
       
    20 #define CPECONFERENCECALLDATA_H
       
    21 
       
    22 //INCLUDES
       
    23 #include <pevirtualengine.h>
       
    24 #include <ccce.h>
       
    25 #include <mcceconferencecall.h>
       
    26 #include <mcceconferencecallobserver.h>
       
    27 #include "cpecall.h"
       
    28 
       
    29 // CONSTANTS
       
    30 // None.
       
    31 
       
    32 // MACROS
       
    33 // None.
       
    34 
       
    35 // DATA TYPES
       
    36 // None.
       
    37 
       
    38 // FUNCTION PROTOTYPES
       
    39 // None.
       
    40 
       
    41 // FORWARD DECLARATIONS
       
    42 class MPEMessageSender;
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47 * This class handles Conference Calls. It forwards events and messages to CPECallHandling class
       
    48 * and uses Converged Call Engine interface to pass requests and receive event indications.
       
    49 *
       
    50 * @lib CallHandling.lib
       
    51 * @since Series60_4.0
       
    52 */
       
    53 class CPEConferenceCall 
       
    54         : public CPECall, 
       
    55           public MCCEConferenceCallObserver
       
    56     {
       
    57     public: // Constructors and destructors
       
    58         /**
       
    59         * Two-phased constructor.
       
    60         */
       
    61         IMPORT_C static CPEConferenceCall* NewL( 
       
    62             MPEMessageSender& aOwner,
       
    63             CCCE& aConvergedCallEngine );
       
    64         
       
    65         /**
       
    66         * Two-phased constructor.
       
    67         * Conference call is made outof telephony control
       
    68         */
       
    69         IMPORT_C static CPEConferenceCall* NewL( 
       
    70             MPEMessageSender& aOwner,
       
    71             MCCEConferenceCall& aCall );
       
    72             
       
    73         /**
       
    74         * Destructor.
       
    75         */
       
    76         virtual ~CPEConferenceCall();
       
    77       
       
    78     public:
       
    79     
       
    80         /**
       
    81         * Forwards message given as parameter to Phone Engine object
       
    82         *
       
    83         * @param  aMessage is the message to be forwarded
       
    84         */
       
    85         virtual void SendMessage( 
       
    86             const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage ); 
       
    87         
       
    88         /**
       
    89         * Forwards message given as parameter to Phone Engine object
       
    90         *
       
    91         * @param  aMessage is the message to be forwarded
       
    92         */
       
    93         virtual void SendMessage( 
       
    94             const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage,
       
    95             const TName& aName );
       
    96 
       
    97         
       
    98    public: // From MCCEConferenceCallObserver
       
    99    
       
   100         /**
       
   101         * A ConferenceCall event has occurred.
       
   102         *
       
   103         * @param aEvent Occurred event.
       
   104         * @param aReferredCall Pointer to call that the event refers to. 
       
   105         * Used e.g. for 
       
   106         * MCCEConferenceCall::AddCallL and 
       
   107         * MCCEConferenceCall::RemoveCallL
       
   108         * Default value is NULL.
       
   109         */
       
   110         IMPORT_C void CallEventOccurred( 
       
   111             const MCCEConferenceCallObserver::TCCEConferenceCallEvent aEvent,
       
   112             MCCECall* aReferredCall = NULL  );
       
   113     
       
   114         /**
       
   115         * Conference state has changed.
       
   116         *
       
   117         * @param aStateContains the state of the conference call
       
   118         */
       
   119         IMPORT_C void CallStateChanged( 
       
   120                      const MCCEConferenceCallObserver::TCCEConferenceCallState aState );
       
   121     
       
   122     
       
   123         /**
       
   124         * Conference capabilities have changed.
       
   125         * @param aCaps Updated call control capabilities
       
   126         */
       
   127         IMPORT_C void CallCapsChanged( 
       
   128                      const MCCEConferenceCallObserver::TCCEConferenceCallCaps aCaps );
       
   129 
       
   130         /**
       
   131         * CallDurationChanged
       
   132         *
       
   133         * @param aDuration
       
   134         */
       
   135         void CallDurationChanged( const TTimeIntervalSeconds aDuration );
       
   136 
       
   137         /**
       
   138         * An error has occurred regarding the conference.
       
   139         *
       
   140         * @param aError Occurred error code. 
       
   141         */
       
   142         IMPORT_C void ErrorOccurred( TCCPConferenceCallError aError );
       
   143 
       
   144             
       
   145     public:   // New Functions
       
   146     
       
   147         /**
       
   148         * Adds new member to Conference Call
       
   149         *
       
   150         * @param aCall the new call to be added
       
   151         */
       
   152         void AddCallL( MCCECall& aCall );
       
   153 
       
   154         /**
       
   155         * Returns Conference duration
       
   156         *
       
   157         * @param  TTimeIntervalSeconds& aDuration, current conference duration
       
   158         */
       
   159         void GetCallDuration( TTimeIntervalSeconds& aDuration );
       
   160         
       
   161         /**
       
   162         * Creates hangup request to call command object
       
   163         */    
       
   164         TInt HangUp();
       
   165 
       
   166         /**
       
   167         * Calls MMEtel's syncronic method to find out the count of Conference members
       
   168         * @return the number of members
       
   169         */
       
   170         TInt EnumerateCalls();
       
   171 
       
   172         /**
       
   173         * Returns conference call capabilities
       
   174         * @return the capabilities of this conference call
       
   175         */
       
   176         MCCEConferenceCallObserver::TCCEConferenceCallCaps CallCaps();
       
   177 
       
   178         /**
       
   179         * Swaps Conference Call between Active and Held states
       
   180         * @param  aSwap it tell that swapping
       
   181         * @return None
       
   182         */
       
   183         TInt Swap();
       
   184         
       
   185         /**
       
   186         * Returns that members name, which was added to or removed from Conference Call
       
   187         * @since Series60_4.0
       
   188         * @param   aCallName In this parameter is returned the TName information of member
       
   189         * @return None
       
   190         */
       
   191         void GetConferenceMemberName( TName& aCallName ) const;
       
   192         
       
   193         /**
       
   194         * Go one to one
       
   195         * @param  aCall
       
   196         * @return None
       
   197         */
       
   198         void GoOneToOneL( MCCECall& aCall );
       
   199 
       
   200     protected:
       
   201     
       
   202         /**
       
   203         * C++ default constructor.
       
   204         */
       
   205         CPEConferenceCall( MPEMessageSender& aOwner, MCCEConferenceCall& aCall );
       
   206 
       
   207         /**
       
   208         * By default Symbian 2nd phase constructor is private.
       
   209         */
       
   210         void ConstructL( CCCE& aConvergedCallEngine );
       
   211         
       
   212         /**
       
   213         * By default Symbian 2nd phase constructor is private.
       
   214         */
       
   215         void ConstructL();
       
   216 
       
   217     protected:    // Data
       
   218         // Conference Call object. This class calls it's syncronic methods
       
   219         MCCEConferenceCall* iConferenceCall;
       
   220         // When added or removed event occurs, members name and callid is saved in these variables
       
   221         TName iCallName;
       
   222         // Conference calls capabilities
       
   223         MCCEConferenceCallObserver::TCCEConferenceCallCaps iCaps;
       
   224         //Current conference duration
       
   225         TTimeIntervalSeconds iDuration;
       
   226         //Last conference duration
       
   227         TTimeIntervalSeconds iLastConferenceDuration;
       
   228     };
       
   229 
       
   230 #endif      // CPECONFERENCECALLDATA_H
       
   231 
       
   232 // End of File