profilesservices/MediaFileList/Inc/mediafilevideopreviewdialog.h
branchRCL_3
changeset 24 8ee96d21d9bf
parent 23 8bda91a87a00
child 25 7e0eff37aedb
equal deleted inserted replaced
23:8bda91a87a00 24:8ee96d21d9bf
     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:   Dialog create for video preview
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef VIDEOPREVIEWDIALOG_H_
       
    22 #define VIDEOPREVIEWDIALOG_H_
       
    23 
       
    24 
       
    25 //  INCLUDES
       
    26 #include <AknDialog.h>
       
    27 
       
    28 #include "mediafilepreview.h"
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 
       
    33 /**
       
    34 * CVideoPreviewDialog
       
    35 *
       
    36 */
       
    37 NONSHARABLE_CLASS (CVideoPreviewDialog) : public CAknDialog,
       
    38                                           public MPreviewHandlerObserver,
       
    39                                           public MCoeForegroundObserver
       
    40     {
       
    41     public:// Constructors and destructor
       
    42         static CVideoPreviewDialog* NewL( TAny* aVideoHandler );
       
    43         virtual ~CVideoPreviewDialog();
       
    44     
       
    45     public:
       
    46         TBool ShowDialogLD( TInt* aError );
       
    47         void SetAttrL( TInt aAttr, TInt aValue );
       
    48         void SetAttrL( TInt aAttr, const TDesC& aValue );
       
    49         void SetAttrL( TInt aAttr, TAny* aValue );
       
    50         // Close the dialogue to cancel the preview
       
    51         void CloseDialogL();
       
    52 
       
    53 
       
    54     private:
       
    55         CVideoPreviewDialog( TAny* aVideoHandler );
       
    56         void ConstructL();
       
    57         
       
    58     private:
       
    59         void PreLayoutDynInitL();
       
    60         void PostLayoutDynInitL();
       
    61         TBool OkToExitL( TInt aButtonId );
       
    62         void ProcessCommandL(TInt aCommandId);
       
    63         void HandleResourceChange(TInt aType);
       
    64         
       
    65     private:
       
    66         void CloseDialogWithDelayL();
       
    67         static TInt CloseDialog( TAny *aObj );
       
    68         
       
    69     private:   // from MPreviewHandlerObserver
       
    70         void HandlePreviewEventL( TInt aEvent, TInt aError );
       
    71         
       
    72     private:
       
    73         void HandleGainingForeground();
       
    74         void HandleLosingForeground();
       
    75         
       
    76         
       
    77     private:
       
    78         CMFVideoPreviewHandler* iVideoHandler;
       
    79         TBool iVideoHandlerCreated;
       
    80         
       
    81         // for closing dialog
       
    82         CIdle* iIdle;
       
    83         
       
    84         TInt* iError;
       
    85         
       
    86     };
       
    87 
       
    88 
       
    89 #endif /*VIDEOPREVIEWDIALOG_H_*/