phoneapp/phoneuicontrol/inc/phonecallutil.h
changeset 78 baacf668fe89
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
       
     1 /*
       
     2 * Copyright (c) 2010 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 util class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PHONECALLUTIL_H
       
    20 #define PHONECALLUTIL_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "mphoneviewcommandhandle.h"
       
    25 #include "mphonestatemachine.h"
       
    26 
       
    27 // CLASS DECLARATION
       
    28  
       
    29 /**
       
    30 *  Call util class.
       
    31 *
       
    32 */
       
    33 class PhoneCallUtil
       
    34     {
       
    35     public:
       
    36         
       
    37         /**
       
    38          * Dials multimedia call.
       
    39          */
       
    40         IMPORT_C static void DialMultimediaCall();
       
    41         
       
    42         /**
       
    43          * Dials voice call.
       
    44          */
       
    45         IMPORT_C static void DialVoiceCallL();
       
    46         
       
    47         /**
       
    48          * Disconnects call.
       
    49          */
       
    50         IMPORT_C static TBool DisconnectCallL();
       
    51         
       
    52         /**
       
    53          * Checks is call a video call.
       
    54          */
       
    55         IMPORT_C static TBool IsVideoCall( const TInt aCallId );
       
    56         
       
    57         /**
       
    58          * Returns call id by state (KErrNotFound if call
       
    59          * not exists).
       
    60          */
       
    61         IMPORT_C static TInt CallIdByState( const TPEState aCallState );
       
    62 
       
    63         /**
       
    64          * Checks if call exists by state and type (returns 
       
    65          * EFalse if call not exists).
       
    66          */
       
    67         IMPORT_C static TBool CheckIfCallExists( 
       
    68                 const TPEState aCallState, const TPECallType aCallType );
       
    69         
       
    70         /**
       
    71          * Checks is there any connected calls.
       
    72          * List of connected call states: EPEStateConnected
       
    73          *                                EPEStateConnectedConference
       
    74          *                                EPEStateConnecting
       
    75          */
       
    76         IMPORT_C static TBool IsAnyConnectedCalls();
       
    77         
       
    78     private:
       
    79       
       
    80         /**
       
    81          * Returns view command handler.
       
    82          */
       
    83         inline static MPhoneViewCommandHandle* ViewCommandHandle();
       
    84         
       
    85         /**
       
    86          * Returns phone state handler.
       
    87          */
       
    88         inline static MPhoneStateMachine* StateMachine();
       
    89     };
       
    90 
       
    91 #endif      // PHONECALLUTIL_H  
       
    92             
       
    93 // End of File