tvout/tvoutwrapper/inc/glxtvoutwrapper_p.h
author William Roberts <williamr@symbian.org>
Thu, 22 Jul 2010 16:33:32 +0100
branchGCC_SURGE
changeset 51 525c140ec8db
parent 36 6481344a6d67
child 52 a3a4c0de738e
permissions -rw-r--r--
Catchup to latest Symbian^4

/*
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:    Header of private wrapper class which speaks to HDMI and
*               also observes TVout connections
*
*/
#ifndef GLXTVOUTWRAPPERPRIVATE_P_H
#define GLXTVOUTWRAPPERPRIVATE_P_H

#include <QAbstractItemModel>
#include <fbs.h>
#include <QMetaType>

class GlxTvOutWrapper;
class CGlxConnectionObserver;
class CGlxHdmiController;

// Converting the QVariant to CFbsBitmap*
Q_DECLARE_METATYPE(CFbsBitmap*)

class GlxTvOutWrapperPrivate
    {
public:
    /*
     * Static method to create an instance
     * @param3 - to On the Effects of Slideshow - currently only fade in fade out
     */
    static GlxTvOutWrapperPrivate* Instance(GlxTvOutWrapper* aTvOutWrapper,
            QAbstractItemModel* aModel,bool aEfectsOn);

    /*
     * destructor
     */
    ~GlxTvOutWrapperPrivate();

    /*
     *  HandleConnectionChange
     *  @param1 true if connected, false if disconnected
     *  Note this is only being done for HDMI as there is no 
     *  implementation for Analog TV. 
     */
    void HandleConnectionChange(bool aConnected);
    
    /*
     * SetImagetoHDMI()
     */
    void SetImagetoHDMI();

    /*
     * Sets HDMI to cloning mode
     */
    void SetToCloningMode();
    
    /*
     * Sets HDMI to Native posting mode
     */
    void SetToNativeMode();
    
    /*
     * views should call this if for any item it doesnt want to move to 
     * HDMI posting mode
     */
    void ItemNotSupported();
    
    /*
     * Activate zoom in posting mode
     */
    void ActivateZoom(bool autoZoomOut);
    
    /*
     * Deactivate zoom in posting mode.
     */
    void DeactivateZoom();
    
    /*
     * Fadeing of the Surface
     * @param1 ETrue - FadeIn ( as in gaining brightness )
     *         EFalse - FadeOut ( as in loosing brightness ) 
     */
    void FadeSurface(bool aFadeInOut);

private:
    /*
     * constructor
     */
    GlxTvOutWrapperPrivate(GlxTvOutWrapper* aTvOutWrapper,
            QAbstractItemModel* aModel);
    
    /*
     * constructL()
     * @param1 - to On the Effects of Slideshow - currently only fade in fade out
     */
    void ConstructL(bool aEfectsOn);
    
    /*
     * SetNewImage
     * Get the uri and bmp from the media model 
     * and pass it to HDMI controller
     */
    void SetNewImage();
    
    /*
     * getsubstate
     */
    int getSubState();
private:
    GlxTvOutWrapper*            iTvOutWrapper;          // Instance of the Tv Wrapper
    QAbstractItemModel*         iModel;                 // Instance of the model
    CGlxConnectionObserver*     iConnectionObserver;    // Symbian connection observer
    CGlxHdmiController*         iHdmiController;        // Symbian Hdmi Controller
    
    bool       iHdmiConnected;                          // To check if the HDMI is connected
    bool       isImageSetToHdmi;                        // to check if the image is set to HDMI
    bool       iIsPhotosInForeground;                   // to check if the Photos is on foreground
    };

#endif //GLXTVOUTWRAPPERPRIVATE_P_H 

// End of file