vtuis/lcvtplugin/inc/common/lcvtutility.h
branchRCL_3
changeset 35 779871d1e4f4
parent 34 f15ac8e65a02
child 37 590f6f022902
equal deleted inserted replaced
34:f15ac8e65a02 35:779871d1e4f4
     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:  Utility methods for Video Telephone application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef LCVTUTILITY_H
       
    21 #define LCVTUTILITY_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <e32base.h>
       
    25 #include    <mvtengaudio.h>
       
    26 #include    <mvtengmedia.h>
       
    27 #include    <w32std.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  Utility methods for Video Telephone application.
       
    35 *
       
    36 *  @since Series 60 2.6
       
    37 */
       
    38 class LcVtUtility
       
    39     {
       
    40     public: // New functions
       
    41 
       
    42         /**
       
    43         * Enumerates audio routing masks.
       
    44         */
       
    45         enum TAudioRoutingMask
       
    46             {
       
    47             // Deactivate loudspeaker.
       
    48             EDeactivateLoudspeaker = (1<<0),
       
    49             // Activate loudspeaker.
       
    50             EActivateLoudspeaker = (1<<1),
       
    51             // Deactivate BT handsfree.
       
    52             EDeactivateBtHandsfree = (1<<2),
       
    53             // Activate BT handsfree.
       
    54             EActivateBtHandsfree = (1<<3)
       
    55             };
       
    56 
       
    57         /**
       
    58         * Gets audio routing availabilities.
       
    59         * @param aAudio audio instance.
       
    60         * @param aAvailable availability bitmap.
       
    61         */
       
    62         static void GetAudioRoutingAvailability( 
       
    63             MVtEngAudio& aAudio,
       
    64             TInt& aAvailable );
       
    65 
       
    66         /**
       
    67         * Gets outgoing media state.
       
    68         * @param aMedia media instance.
       
    69         * @param aAvailable availability bitmap.
       
    70         */
       
    71         static void GetOutgoingMediaState(
       
    72             MVtEngMedia& aMedia,
       
    73             TInt& aAvailable );
       
    74 
       
    75         /**
       
    76         * Gets incoming media state.
       
    77         * @param aMedia media instance.
       
    78         * @param aAvailable availability bitmap.
       
    79         */
       
    80         static void GetIncomingMediaState(
       
    81             MVtEngMedia& aMedia,
       
    82             TInt& aAvailable );
       
    83 
       
    84         /**
       
    85         * Checks if media has still image.
       
    86         * @param aMedia media instance.
       
    87         * @return ETrue if media has still image.
       
    88         */
       
    89         static TBool HasStillImage(
       
    90             MVtEngMedia& aMedia );
       
    91 
       
    92         /**
       
    93         * Gets freeze's current status.
       
    94         * @param aMedia media instance.
       
    95         * @return  ETrue if active provider is frozen, EFalse otherwise.
       
    96         */
       
    97         static TBool GetFreezeState( 
       
    98             MVtEngMedia& aMedia );  
       
    99                 
       
   100         /**
       
   101         * Checks if freeze is supported.
       
   102         * @param aMedia media instance.
       
   103         * @return ETrue if freeze is supported.
       
   104         */
       
   105         static TBool IsFreezeSupported(
       
   106             MVtEngMedia& aMedia );
       
   107     
       
   108         /**
       
   109         * Gets current local video quality setting.
       
   110         * @param aMedia media instance. 
       
   111         * @param aVideoQuality Current local video quality settings.
       
   112         */
       
   113         static void GetVideoQuality( 
       
   114             MVtEngMedia& aMedia,
       
   115             MVtEngMedia::TVideoQuality& aVideoQuality );
       
   116         /**
       
   117         * Gets current object sharing state.
       
   118         * @param aMedia media instance.
       
   119         * @param aShareObjectState contains current object sharing state on
       
   120         * return.
       
   121         */
       
   122         static void GetObjectSharingState( MVtEngMedia& aMedia,
       
   123             MVtEngMedia::TShareObjectState& aShareObjectState );
       
   124         
       
   125         /**
       
   126         * Checks if zooming is allowed.
       
   127         * @param aMedia media instance.
       
   128         * @return ETrue if allowed, EFalse otherwise.
       
   129         */
       
   130         static TBool IsZoomAllowed(
       
   131             MVtEngMedia& aMedia );
       
   132 
       
   133         /**
       
   134         * Checks if the device has cameras currently attached.
       
   135         * @param aMedia media instance.
       
   136         * @return ETrue if there are cameras available.
       
   137         */
       
   138         static TBool HasCameras( MVtEngMedia& aMedia );
       
   139 
       
   140         /**
       
   141         * Checks if the character is DTMF enabled.
       
   142         * @param aChar The character.
       
   143         * @return ETrue if this character is DTMF character.
       
   144         */
       
   145         static TBool IsDTMFCharacter( const TChar aChar );
       
   146 
       
   147     private:
       
   148 
       
   149         /**
       
   150         * Checks if audio routing is available.
       
   151         * @param aAudio audio instance.
       
   152         * @param aCurrent current speaker.
       
   153         * @param aSource source speaker.
       
   154         * @param aTarget target speaker.
       
   155         */
       
   156         static TBool IsAudioRoutingAvailable(
       
   157             MVtEngAudio& aAudio,
       
   158             const MVtEngAudio::TAudioRoutingState aCurrent,
       
   159             const MVtEngAudio::TAudioRoutingState aSource,
       
   160             const MVtEngAudio::TAudioRoutingState aTarget );
       
   161 
       
   162     };
       
   163 
       
   164 #endif      // LCVTUTILITY_H
       
   165             
       
   166 // End of File