profilesservices/MediaFileList/Inc/mediafilelist.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:   Interface of MediaFileList. Provide some API for 
       
    15 *                the user to use mediafilelist
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef MEDIALFILELIST_H
       
    23 #define MEDIALFILELIST_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <e32base.h>
       
    27 #include <s32file.h>
       
    28 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CMediaFileDialog;
       
    32 
       
    33 
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 *  Public API for displaying media file list. List is used for 
       
    39 *  selecting/previewing audio and video files. 
       
    40 * 
       
    41 *  @lib mediafilelist.lib
       
    42 *  @since Series60_5.1
       
    43 *  
       
    44 */
       
    45 class CMediaFileList : public CBase
       
    46     {
       
    47     public:
       
    48     enum TMediaFileListAttribute
       
    49         {
       
    50         // max media file size
       
    51         EAttrFileSize = 0,
       
    52         // ringing volume (TProfileRingingVolume from Profile.hrh)
       
    53         EAttrVolume,
       
    54         // ringing type,  (TProfileRingingType from Profile.hrh)
       
    55         EAttrRingingType,
       
    56         // vibra on/off   (Boolean) 
       
    57         EAttrVibra,
       
    58         // 3D effect      (TProfile3DToneEffect from ProfileInternal.hrh)
       
    59         EAttr3DEffect,
       
    60         // 3D echo        (TProfile3DToneEcho from ProfileInternal.hrh)
       
    61         EAttr3DEcho,
       
    62         // excluded mime type text
       
    63         EAttrExcludeMimeType,
       
    64         // for file protection checking
       
    65         EAttrAutomatedType,
       
    66         // media file dialog title
       
    67         EAttrTitle,
       
    68         // excluded folder (see enum TFolderType)
       
    69         EAttrExcludeFolder
       
    70         };
       
    71 
       
    72     enum TMediaFileType
       
    73         {
       
    74         EMediaFileTypeAudio = 0,
       
    75         EMediaFileTypeVideo
       
    76         };
       
    77 
       
    78     enum TNullItemIcon
       
    79         {
       
    80         ENullItemIconNone = 0,
       
    81         ENullItemIconDefaultTone,
       
    82         ENullItemIconOff
       
    83         };
       
    84 
       
    85     enum TFolderType
       
    86         {
       
    87         EFolderDownload = 0,
       
    88         EFolderVideos
       
    89         };
       
    90 
       
    91     public:
       
    92         /**
       
    93         * Two-phased constructor.
       
    94         */
       
    95         IMPORT_C static CMediaFileList* NewL();
       
    96 
       
    97         /**
       
    98         * Destructor.
       
    99         */
       
   100 	    IMPORT_C virtual ~CMediaFileList();
       
   101 
       
   102     private:
       
   103         /**
       
   104         * By default Symbian 2nd phase constructor is private.
       
   105         */
       
   106         void ConstructL();
       
   107 
       
   108         /**
       
   109         * C++ default constructor.
       
   110         */
       
   111         CMediaFileList();
       
   112 
       
   113     public:
       
   114 
       
   115        /**
       
   116         * Shows Media file list.
       
   117         * @since Series60_5.1
       
   118         * @param aFileName Selected media file name full path.
       
   119         * @param aNullItem Selected null item index. Possible values:
       
   120         *        KErrNotFound - item is not null item or Download item
       
   121         *        0 - Download item
       
   122         *        1 - first null item
       
   123         *        2 - second null item
       
   124         *  
       
   125         * @param aInfo Extra information, set to NULL if not used.
       
   126         * @param aDesInfo Extra information, set to KNullDesC if not used.
       
   127         * @return ETrue if user selected media file, EFalse otherwise.
       
   128         */
       
   129 	    IMPORT_C TBool ShowMediaFileListL( TDes* aFileName, TInt* aNullItem,
       
   130 	                                       TInt* aInfo, TDes* aDesInfo );
       
   131 
       
   132         /**
       
   133         * Set Media file list attribute. See enum TMediaFileListAttribute for
       
   134         * list of supported attributes.
       
   135         * @since Series60_5.1
       
   136         * @param aAttr Attribute id. 
       
   137         * @param aValue Attribute value. 
       
   138         * @return None.
       
   139         */
       
   140        	IMPORT_C void SetAttrL( TInt aAttr, TInt aValue );
       
   141 
       
   142         /**
       
   143         * Set Media file list attribute. See enum TMediaFileListAttribute for
       
   144         * list of supported attributes.
       
   145         * @since Series60_5.1
       
   146         * @param aAttr Attribute id. 
       
   147         * @param aValue Attribute value. 
       
   148         * @return None.
       
   149         */
       
   150 	    IMPORT_C void SetAttrL( TInt aAttr, const TDesC& aValue );
       
   151 
       
   152         /**
       
   153         * Set Media file list attribute. Currently not in use.
       
   154         * @since Series60_5.1
       
   155         * @param aAttr Attribute id. 
       
   156         * @param aValue Attribute value. 
       
   157         * @return None.
       
   158         */
       
   159 	    IMPORT_C void SetAttrL( TInt aAttr, TAny* aValue );
       
   160 
       
   161         /**
       
   162         * Set Media file list null item. Null items are custom list items
       
   163         * that appear at the end of the media file list main view.
       
   164         * @since Series60_5.1
       
   165         * @param aText Null item text.
       
   166         * @param aMediaFile File that is played when null items gets focused.
       
   167         *        Use KNullDesC if not used.
       
   168         * @param aMediaFileType Media file type. See enum TMediaFileType for
       
   169                  supported media types.
       
   170         * @param aIconId Null item icon id. See enum TNullItemIcon for
       
   171                  supported icons.
       
   172         * @return None.
       
   173         */
       
   174 	    IMPORT_C void SetNullItemL( const TDesC& aText, const TDesC& aMediaFile,
       
   175 	                                TInt aMediaFileType, TInt aIconId );
       
   176 
       
   177 	
       
   178 
       
   179     private:
       
   180 		CMediaFileDialog* iDialog;
       
   181     };
       
   182 
       
   183 
       
   184 
       
   185 #endif      // MEDIALFILELIST_H
       
   186             
       
   187 // End of File