mediamanagementutilities/mediafetch/src/mediafetch.h
changeset 0 31ef7fef3f45
equal deleted inserted replaced
-1:000000000000 0:31ef7fef3f45
       
     1 /*
       
     2 * Copyright (c) 2006 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 Fetch implementation plug-in loader
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MEDIAFETCH_H
       
    20 #define MEDIAFETCH_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <badesca.h>
       
    24 #include <MediaFileTypes.hrh>
       
    25 
       
    26 class MMGFetchVerifier;
       
    27 class MMGFetchCanceler;
       
    28 class CMediaFetchImplementation;
       
    29 class MDesCArray;
       
    30 
       
    31 /**
       
    32  *  Media Fetch ECom plug-in loader
       
    33  *
       
    34  *  Loads the ECom plug-in with the highest version number that supports the
       
    35  *  media type(s) given at construction parameter.
       
    36  *
       
    37  *  @lib MGFetch.lib
       
    38  *  @since S60 v3.2
       
    39  */
       
    40 NONSHARABLE_CLASS( CMediaFetch ) : public CBase
       
    41     {
       
    42 
       
    43 public:
       
    44 
       
    45     static CMediaFetch* NewL( TInt aMediaType );
       
    46 
       
    47     static CMediaFetch* NewLC( TInt aMediaType );
       
    48 
       
    49     virtual ~CMediaFetch();
       
    50 
       
    51     /**
       
    52      *
       
    53      * @since S60 v3.2
       
    54      * @param aMultiSelect if ETrue then multiselection fetcher is enabled
       
    55      */
       
    56     void SetMultiSelectionL( TBool aMultiSelect );
       
    57 
       
    58     /**
       
    59      *
       
    60      * @since S60 v3.2
       
    61      * @param aMimeTypes plug-in should show only files with given Mime types
       
    62      */
       
    63     void SetMimeTypesL( const MDesCArray& aMimeTypes );
       
    64 
       
    65     /**
       
    66      *
       
    67      * @since S60 v3.2
       
    68      * @param aSelectionSoftkey Custom selection softkey label
       
    69      */
       
    70     void SetSelectionSoftkeyL( const TDesC& aSelectionSoftkey );
       
    71 
       
    72     /**
       
    73      *
       
    74      * @since S60 v3.2
       
    75      * @param aHeading Custom heading text for fetcher
       
    76      */
       
    77     void SetHeadingL( const TDesC& aHeading );
       
    78 
       
    79     /**
       
    80      *
       
    81      * @since S60 v3.2
       
    82      * @param aVerifier See MMGFetchVerifier.h
       
    83      */
       
    84     void SetVerifierL( MMGFetchVerifier& aVerifier );
       
    85 
       
    86     /**
       
    87      *
       
    88      * @since S60 v3.2
       
    89      * @param aCanceler See MMGFetchCanceler.h
       
    90      */
       
    91     void GetCancelerL( MMGFetchCanceler*& aCanceler );
       
    92 
       
    93     /**
       
    94      *
       
    95      *
       
    96      * @since S60 v3.2
       
    97      * @param aSelectedFiles array to hold selected items
       
    98      * @param aMediaType type of fetcher to use
       
    99      * @return ETrue if user selected files, EFalse if user canceled the fetcher
       
   100      */
       
   101     TBool LaunchL( CDesCArray& aSelectedFiles,
       
   102                    TMediaFileType aMediaType );
       
   103 
       
   104 private:
       
   105 
       
   106     inline CMediaFetch();
       
   107 
       
   108     inline void ConstructL( TInt aMediaType );
       
   109 
       
   110 private: // data
       
   111 
       
   112     /**
       
   113      * Fetcher implementation
       
   114      * Own.
       
   115      */
       
   116     CMediaFetchImplementation* iFetcher;
       
   117 
       
   118     };
       
   119 
       
   120 #endif // MEDIAFETCH_H