imagingext_plat/ecam_ui_orientation_override_custom_api/inc/ECamUIOrientationOverrideCustomAPI.h
changeset 0 469c91dae73b
equal deleted inserted replaced
-1:000000000000 0:469c91dae73b
       
     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:  This Custom API is created to fix the synchronization problem
       
    15 *                between Camera Application and Camera Server about the current
       
    16 *                screen orientation. CWsScreenDevice is used as a reference and
       
    17 *                Camera Application should use its NumScreenModes() and
       
    18 *                GetScreenModeSizeAndRotation() methods to inform it by the mode
       
    19 *                index, which mode it is currently in. It is most likely the one
       
    20 *                also returned by CurrentScreenMode() but also other mode can be
       
    21 *                given. Camera server then returns an error if that mode is not
       
    22 *                supported and some alternative value should be used if it's
       
    23 *                wanted to be set.
       
    24 *
       
    25 */
       
    26 
       
    27 
       
    28 #ifndef ECAMUIORIENTATIONOVERRIDECUSTOMAPI_H
       
    29 #define ECAMUIORIENTATIONOVERRIDECUSTOMAPI_H
       
    30 
       
    31 #include <e32base.h>
       
    32 
       
    33 // CONSTANTS
       
    34 
       
    35 const TUid KCameraUIOrientationOverrideUid = { 0x2001E2AE };
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40 *  Custom interface for Orientation setting.
       
    41 */
       
    42 class MCameraUIOrientationOverride
       
    43     {
       
    44 
       
    45     public: 
       
    46 
       
    47         /**
       
    48         * Sets Orientation mode and is based on wsini.ini that can be fetched
       
    49         * from CWsScreenDevice. This method should be called after calling
       
    50         * CCamera::New2L(), before CCamera::Reserve() and before
       
    51         * CCamera::CameraInfo().
       
    52         * @param aMode Mode that specifies the wanted orientation
       
    53         * @leave KErrNotSupported if aMode is not supported
       
    54         * @leave KErrGeneral if this method is not supported
       
    55         * @leave KErrInUse if this method is not called at the right time
       
    56         */
       
    57         virtual void SetOrientationModeL( TInt aMode ) = 0;
       
    58 
       
    59     };
       
    60 
       
    61 #endif //ECAMUIORIENTATIONOVERRIDECUSTOMAPI_H