bluetoothengine/btmac/inc/btmonocmdhandler/btmccallstatus.h
changeset 0 f63038272f30
equal deleted inserted replaced
-1:000000000000 0:f63038272f30
       
     1 /*
       
     2 * Copyright (c) 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BTMCCALLSTATUS_H
       
    20 #define BTMCCALLSTATUS_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <etelmm.h>
       
    24 #include "btmcprofileid.h"
       
    25 #include "btmccallactive.h"
       
    26 #include "btmcline.h"
       
    27 #include "btmcvoipline.h"
       
    28 // forward declarations
       
    29 class CBtmcMobileLine;
       
    30 class CATResult;
       
    31 class CBtmcProtocol;
       
    32 class MCall;
       
    33 
       
    34 NONSHARABLE_CLASS(CBtmcCallStatus) : public CBase, public MBtmcActiveObserver
       
    35       {
       
    36     public:
       
    37         static CBtmcCallStatus* NewL(
       
    38             CBtmcProtocol& aProtocol, 
       
    39             RMobilePhone& aPhone,
       
    40             TBtmcProfileId aProfile );
       
    41 
       
    42         ~CBtmcCallStatus();
       
    43         
       
    44         /**
       
    45         * returns the bit mask
       
    46         */
       
    47         TInt CallStatusL() const;
       
    48 
       
    49         void ReportCallStatusL();
       
    50 
       
    51         /**
       
    52         * responds to CLCC
       
    53         **/
       
    54         
       
    55         void HandleClccL();
       
    56 
       
    57     private:  // From MBtmcActiveObserver
       
    58     
       
    59         void RequestCompletedL(CBtmcActive& aActive, TInt aErr);
       
    60         
       
    61         void CancelRequest(TInt aServiceId);
       
    62 
       
    63         
       
    64     private:
       
    65         CBtmcCallStatus(CBtmcProtocol& aProtocol);
       
    66         
       
    67         // 2nd phase construction, called by NewL()
       
    68         void ConstructL(RMobilePhone& aPhone, TBtmcProfileId aProfile);
       
    69         
       
    70         CATResult* MakeClccL(RMobileCall::TMobileCallInfoV1& info, 
       
    71             RMobileCall::TMobileCallRemotePartyInfoV1& remote, TInt aConferenceCallCount);
       
    72         
       
    73         CATResult* MakeVoIPClccL(const MCall& info);
       
    74         
       
    75         void HandleMobileCallEventL(
       
    76             const TName& aCallName, 
       
    77             const TDesC& aRemotePartyName,
       
    78             RMobileCall::TMobileCallStatus aStatus, TBool aOutgoingCall = EFalse);
       
    79             
       
    80         void ReportCallEventL(TInt aPrevStatus, TInt aNewStatus, TBool aOutgoing = EFalse);
       
    81 
       
    82         void ReportRingAndClipL(TBool aColp = EFalse);
       
    83 
       
    84         void StartTimerL(TInt aService, TInt aTimeout);
       
    85         
       
    86         void StopTimer(TInt aService);
       
    87         
       
    88         void ReportCallIndicatorL(TBTMonoATPhoneIndicatorId aIndicator, TInt aValue);
       
    89 
       
    90 		// aNum returns the currently ringing number
       
    91 		void GetRingingNumL(TDes8& aNum);
       
    92 		void GetOutgoingNumL(TDes8& aNum);
       
    93         
       
    94 		TBTMonoATPhoneNumberType NumberType( const TDesC8& aNum );
       
    95 		
       
    96     private:
       
    97         CBtmcProtocol& iProtocol;
       
    98         RTimer iTimer;// owned
       
    99         CBtmcActive* iTimerActive; // owned, ringing timer
       
   100         TBuf8<RMobilePhone::KMaxMobileTelNumberSize> iRemoteTelNum;
       
   101         
       
   102         RPointerArray<MBtmcLine> iLines; // owned
       
   103         
       
   104         friend class CBtmcMobileLine;
       
   105         friend class CBtmcVoIPLine;
       
   106         };
       
   107 
       
   108 #endif // BTMCCALLSTATUS_H
       
   109 
       
   110 // End of File
       
   111