vtuis/videotelui/inc/commands/tvtuimediastate.h
branchRCL_3
changeset 24 f15ac8e65a02
parent 23 890b5dd735f8
child 25 779871d1e4f4
equal deleted inserted replaced
23:890b5dd735f8 24:f15ac8e65a02
     1 /*
       
     2 * Copyright (c) 2007 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:  Media state class definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef T_VTUIMEDIASTATE_H
       
    20 #define T_VTUIMEDIASTATE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "tvtflagcontainer.h"
       
    25 
       
    26 class MVtEngMedia;
       
    27 class MVtEngCommandHandler;
       
    28 
       
    29 /**
       
    30  *  TVtUiMediaState
       
    31  *
       
    32  *  Contains information about media's (video) current status.
       
    33  *
       
    34  *  @since S60 v3.2
       
    35  */
       
    36 NONSHARABLE_CLASS( TVtUiMediaState ) : public TVtUpdateableFlagContainer
       
    37     {
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Constructor.
       
    42      *
       
    43      * @param aMedia Reference to VT engine media object.
       
    44      * @param aCommandHandler Reference to command handler object.
       
    45      */
       
    46     inline TVtUiMediaState( MVtEngMedia& aMedia,
       
    47         MVtEngCommandHandler& aCommandHandler );
       
    48 
       
    49     /**
       
    50      * Return whether or not video is being sent.
       
    51      *
       
    52      * @return ETrue if video is being sent.
       
    53      */
       
    54     inline TBool IsVideo() const;
       
    55 
       
    56     /**
       
    57      * Return whether or not any camera is available in device.
       
    58      *
       
    59      * @return ETrue if any camera is available in device.
       
    60      */
       
    61     inline TBool HasCamera() const;
       
    62 
       
    63     /**
       
    64      * Return whether or not freeze is supported for active video source.
       
    65      *
       
    66      * @return ETrue if freeze is supported for active video source.
       
    67      */
       
    68     inline TBool IsFreezeSupported() const;
       
    69 
       
    70     /**
       
    71      * Return whether or not active video source is frozen.
       
    72      *
       
    73      * @return ETrue if video is frozen.
       
    74      */
       
    75     inline TBool IsFrozen() const;
       
    76 
       
    77     /**
       
    78      * Return whether or not share is active.
       
    79      *
       
    80      * @return ETrue if still image is being shared.
       
    81      */
       
    82     inline TBool IsSharing() const;
       
    83 
       
    84     /**
       
    85      * Return whether or not sharing is being initialized.
       
    86      *
       
    87      * @return ETrue if still image sharing is being initialized.
       
    88      */
       
    89     inline TBool IsInitializingShare() const;
       
    90 
       
    91     /**
       
    92      * Return whether or not primary camera is being used by VT.
       
    93      *
       
    94      * @return ETrue if primary camera is being used.
       
    95      */
       
    96     inline TBool IsPrimaryCameraInUse() const;
       
    97 
       
    98     /**
       
    99      * Return whether or not secondary camera is being used by VT.
       
   100      *
       
   101      * @return ETrue if secondary camera is being used.
       
   102      */
       
   103     inline TBool IsSecondaryCameraInUse() const;
       
   104 
       
   105     /**
       
   106      * Return whether or not it is possible to share.
       
   107      *
       
   108      * @return ETrue if sharing is not allowed.
       
   109      */
       
   110     inline TBool IsNotAbleToShare() const;
       
   111 
       
   112     /**
       
   113      * Return whether or not device has primary camera.
       
   114      *
       
   115      * @return ETrue if primary camera is available.
       
   116      */
       
   117     inline TBool HasPrimaryCamera() const;
       
   118 
       
   119     /**
       
   120      * Return whether or not device has secondary camera.
       
   121      *
       
   122      * @return ETrue if secondary camera is available.
       
   123      */
       
   124     inline TBool HasSecondaryCamera() const;
       
   125 
       
   126     /**
       
   127      * Return whether or not active video source supports contrast setting.
       
   128      *
       
   129      * @return ETrue if contrast settingis allowed.
       
   130      */
       
   131     inline TBool IsContrastSupported() const;
       
   132 
       
   133     /**
       
   134      * Return whether or not active video source supports white balance setting.
       
   135      *
       
   136      * @return ETrue if white balance setting is allowed.
       
   137      */
       
   138     inline TBool IsWhiteBalanceSupported() const;
       
   139 
       
   140     /**
       
   141      * Return whether or not active video source supports color tone setting.
       
   142      *
       
   143      * @return ETrue if colour tone setting is allowed.
       
   144      */
       
   145     inline TBool IsColorToneSupported() const;
       
   146 
       
   147     /**
       
   148      * Return whether or not active video source supports brightness setting.
       
   149      *
       
   150      * @return ETrue if brightness setting is allowed.
       
   151      */
       
   152     inline TBool IsBrightnessSupported() const;
       
   153     
       
   154     /**
       
   155      * Return whether or not video is permanently stopped.
       
   156      *
       
   157      * @return ETrue if video is permanently stopped.
       
   158      */
       
   159     inline TBool IsVideoPermanentlyStopped() const;
       
   160 
       
   161 private: // from TVtUpdateableFlagContainer
       
   162 
       
   163     /**
       
   164      * @see TVtUpdateableFlagContainer::UpdateFlags
       
   165      */
       
   166     void UpdateFlags();
       
   167 
       
   168 private:
       
   169 
       
   170     // Enumeration for media state flags.
       
   171     enum TFlags
       
   172         {
       
   173         /** Set if video is currently enabled. */
       
   174         EIsVideo = ( 1<<0 ),
       
   175         /** Set if device has any cameras */
       
   176         EHasCamera = ( 1<<1 ),
       
   177         /** Set if current active video source supports freezing */
       
   178         EIsFreezeSupported = ( 1<<2 ),
       
   179         /** Set if current active video source is frozen */
       
   180         EIsFrozen = ( 1<<3 ),
       
   181         /** Set if sharing is active */
       
   182         EIsSharing = ( 1<<4 ),
       
   183         /** Set if sharing is being initialized */
       
   184         EIsInitializingShare = ( 1<<5 ),
       
   185         /** Set if device's primary camera is being used by VT application */
       
   186         EIsPrimaryCameraInUse = ( 1<<6 ),
       
   187         /** Set if device's secondary camera is being used by VT application */
       
   188         EIsSecondaryCameraInUse = ( 1<<7 ),
       
   189         /** Set if it is not possible to share */
       
   190         EIsNotAbleToShare = ( 1<<8 ),
       
   191         /** Set if device has primary camera */
       
   192         EHasPrimaryCamera = ( 1<<9 ),
       
   193         /** Set if device has secondary camera */
       
   194         EHasSecondaryCamera = ( 1<<10 ),
       
   195         /** Set if current video source supports contrast setting */
       
   196         EIsContrastSupported = ( 1<<11 ),
       
   197         /** Set if current video source supports white balance setting */
       
   198         EIsWhiteBalanceSupported = ( 1<<12 ),
       
   199         /** Set if current video source supports color tone setting */
       
   200         EIsColorToneSupported = ( 1<<13 ),
       
   201         /** Set if current video source supports brightness setting */
       
   202         EIsBrightnessSupported = ( 1<<14 ),
       
   203         /** Set if video is permanently stopped*/
       
   204         EIsVideoPermanentlyStopped = ( 1<<15 )
       
   205         };
       
   206 
       
   207     // Reference to engine media instance.
       
   208     MVtEngMedia& iMedia;
       
   209 
       
   210     // Reference to engine command handler instance.
       
   211     MVtEngCommandHandler& iCommandHandler;
       
   212     };
       
   213 
       
   214 #include "tvtuimediastate.inl"
       
   215 
       
   216 #endif // T_VTUIMEDIASTATE_H