mpxplugins/serviceplugins/playlistplugins/m3uplaylistplugin/inc/mpxm3uplaylistplugin.h
changeset 0 ff3acec5bc43
equal deleted inserted replaced
-1:000000000000 0:ff3acec5bc43
       
     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:  Implementation of m3u playlist plugin interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPXM3UPLAYLISTPLUGIN_H
       
    20 #define MPXM3UPLAYLISTPLUGIN_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <mpxplaylistplugin.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class MMPXPlaylistPluginObserver;
       
    27 class CMPXM3uPlaylistImporter;
       
    28 class CMPXM3uPlaylistExporter;
       
    29 
       
    30 // CONSTANTS
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  CMPXM3uPlaylistPlugin implements CMPXPlaylistPlugin to provide m3u
       
    36 *  playlist importing and exporting services. 
       
    37 */
       
    38 NONSHARABLE_CLASS(CMPXM3uPlaylistPlugin) : public CMPXPlaylistPlugin
       
    39     {
       
    40 public: // Constructors and destructor
       
    41     
       
    42     /**
       
    43     * Two-phased constructor
       
    44     *
       
    45     * @param aInitParams constructor parameters
       
    46     * @return object of constructed
       
    47     */
       
    48     static CMPXM3uPlaylistPlugin* NewL(TAny* aInitParams);
       
    49 
       
    50     /**
       
    51     * Destructor
       
    52     */
       
    53     ~CMPXM3uPlaylistPlugin();
       
    54     
       
    55 public: // from base clase CMPXPlaylistPlugin
       
    56 
       
    57     /** 
       
    58     * Internalize a playlist
       
    59     *
       
    60     * @param aStatus caller's request status
       
    61     * @param aPlaylist a playlist
       
    62     */
       
    63     void InternalizePlaylistL(
       
    64         TRequestStatus& aStatus,
       
    65         const TDesC& aPlaylistUri);
       
    66 
       
    67     /** 
       
    68     * Externalize a playlist
       
    69     *
       
    70     * @param aStatus caller's request status
       
    71     * @param aPlaylist playlist to be externalized
       
    72     * @param aFilePath File path for where the playlist should be placed
       
    73     */
       
    74     void ExternalizePlaylistL(
       
    75         TRequestStatus& aStatus,
       
    76         const CMPXMedia& aPlaylist,
       
    77         const TDesC& aFilePath);
       
    78 
       
    79     /**
       
    80     * Required attributes for the medias in the playlist in order to
       
    81     * externalize them to a M3U playlist.
       
    82     *
       
    83     * @return an array of attributes required in order to externalize
       
    84     * a playlist media into a M3U playlist file.
       
    85     */
       
    86     const TArray<TMPXAttribute> RequiredAttributes() const;
       
    87 
       
    88     /**
       
    89     * Optional attributes for the medias in the playlist for externalizing
       
    90     * them to a M3U playlist
       
    91     *
       
    92     * @return an array of attributes which are optional when externalizing
       
    93     * a playlist media into a M3U playlist file
       
    94     */
       
    95     const TArray<TMPXAttribute> OptionalAttributes() const;
       
    96 
       
    97     /**
       
    98     * Returns the file extension the plugin handles
       
    99     *
       
   100     * @return file extension which includes the period.
       
   101     */
       
   102     const TDesC& FileExtension() const;
       
   103 
       
   104     /**
       
   105     * cancel a client request
       
   106     */
       
   107     void Cancel();
       
   108     
       
   109 private:
       
   110 
       
   111     /**
       
   112     * C++ Constructor
       
   113     */
       
   114     CMPXM3uPlaylistPlugin();
       
   115 
       
   116     /**
       
   117     * 2nd phase constructor
       
   118     */    
       
   119     void ConstructL();
       
   120     
       
   121 private:
       
   122 
       
   123     CMPXM3uPlaylistImporter* iImporter;
       
   124     CMPXM3uPlaylistExporter* iExporter;
       
   125     RArray<TMPXAttribute>    iRequiredAttributes;
       
   126     RArray<TMPXAttribute>    iOptionalAttributes;
       
   127     };
       
   128 
       
   129 #endif   // MPXM3UPLAYLISTPLUGIN_H
       
   130             
       
   131