mmappfw_plat/playlist_engine_api/inc/mpxplaylistengineobserver.h
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     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:  Playlist engine observer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MMPXPLAYLISTENGINEOBSERVER_H
       
    20 #define MMPXPLAYLISTENGINEOBSERVER_H
       
    21 
       
    22 
       
    23 #include <mpxmedia.h>
       
    24 
       
    25 /**
       
    26 *  A playlist engine client must implement this
       
    27 *  observer interface for InternalizePlaylistL and/or ExternalizePlaylistL callback.
       
    28 *
       
    29 *  @lib mpxplaylistengine.lib
       
    30 */
       
    31 NONSHARABLE_CLASS(MMPXPlaylistEngineObserver) 
       
    32     {
       
    33     public:
       
    34     
       
    35         /**
       
    36         *  Callback when Internalize Playlist request is completed. This operation cannot
       
    37         *  be a long running task as this may be invoked from the RunL of a plugin.
       
    38         *
       
    39         *  Parameters are only available for the duration of this method. If a client
       
    40         *  requires them to be available beyond the completion of this method, a copy
       
    41         *  should be made.
       
    42         *
       
    43         * @param aPlaylist a playlist parsed from the playlist file. Depending on the
       
    44         *        content of the playlist, not all info for a media will be available;
       
    45         *        only the available info from playlist file is populated, e.g. for
       
    46         *        m3u playlists, the only available information is URI of the media and
       
    47         *        its title if it's in extended format.
       
    48         *
       
    49         *        This media will contain the following attributes if no error has occured:
       
    50         *
       
    51         *            EMPXMediaGeneralUri for the playlist
       
    52         *            EMPXMediaGeneralType, which has a value of EMPXItem
       
    53         *            EMPXMediaGeneralCategory, which has a value of EMPXPlaylist
       
    54         *            EMPXMediaArrayContents
       
    55         *            EMPXMediaArrayCount
       
    56         *
       
    57         *        When an error occurs, this is NULL.
       
    58         *
       
    59         *        Client takes over the ownership of this CMPXMedia object.
       
    60         *
       
    61         *  @param aError error code   
       
    62         *
       
    63         *  @param aCompleted a flag that indicates if internalize playlist command has
       
    64         *         been fully processed. EFalse if not. In this case, there will be
       
    65         *         subsequent calls to HandlePlaylistL for the same playlist with the
       
    66         *         segmented results. ETrue if there are no more results to be sent to
       
    67         *         the observer.
       
    68         */
       
    69         virtual void HandlePlaylistL(CMPXMedia* aPlaylist,
       
    70                                      const TInt aError,
       
    71                                      const TBool aCompleted) = 0;
       
    72 
       
    73         /**
       
    74         *  Callback when Externalize Playlist request is completed. This operation cannot
       
    75         *  be long running task as this may be in invoked from the RunL of a plugin.
       
    76         *
       
    77         *  Parameters are only available for the duration of this method. If a client
       
    78         *  requires them to be available beyond the completion of this method, a copy
       
    79         *  should be made.
       
    80         *
       
    81         *  @param aPlaylistUri URI for the playlist which has been externalized.
       
    82         *  @param aError error code    
       
    83         */
       
    84         virtual void HandlePlaylistL(const TDesC& aPlaylistUri,
       
    85                                      const TInt aError) = 0;        
       
    86     };
       
    87 
       
    88 #endif      // MMPXPLAYLISTPLUGINOBSERVER_H
       
    89 
       
    90