mmappfw_plat/mpx_collection_common_definition_api/inc/mpxcollectionenginecommonobserver.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:  Collection engine common observer
       
    15 *
       
    16 */
       
    17 
       
    18  
       
    19 
       
    20 #ifndef MMPXCOLLECTIONENGINECOMMONOBSERVER_H
       
    21 #define MMPXCOLLECTIONENGINECOMMONOBSERVER_H
       
    22 
       
    23 #include <badesca.h>
       
    24 class CMPXMedia;
       
    25 #include <mpxcommand.h>
       
    26 
       
    27 /**
       
    28  *  Interface for receiving data asynchronously 
       
    29  */
       
    30 NONSHARABLE_CLASS(MMPXCollectionEngineCommonObserver)
       
    31     {
       
    32 public:
       
    33     /**
       
    34      *  Handle media.
       
    35      *
       
    36      *  @since S60 3.2.3
       
    37      *  @param aMedia media object, NULL if error
       
    38      *  @param aError error code    
       
    39      */
       
    40     virtual void HandleMedia(CMPXMedia* aMedia, TInt aError) = 0;
       
    41 
       
    42     /**
       
    43      *  Handle completion of a asynchronous command.
       
    44      *
       
    45      *  @since S60 3.2.3
       
    46      *  @param aCommandResult result of the command, NULL if error
       
    47      *  @param aError error code    
       
    48      */
       
    49      virtual void HandleCommandComplete(CMPXCommand* aCommandResult, 
       
    50                                         TInt aError) = 0;
       
    51 
       
    52     /**
       
    53      * Handles removing a collection path.
       
    54      * Use case is if an item is removed by a collecton path, we need to 
       
    55      * know which files were actually removed to delete from FS.
       
    56      *
       
    57      * @since S60 3.2.3
       
    58      * @param aUriArray NULL if the plugin does not use concept of URI
       
    59      *                   else, contains the file path to delete a file
       
    60      * @param aError error code
       
    61      *
       
    62      */
       
    63     virtual void HandleRemove(const CDesCArray& aUriArray, TInt aError) = 0;
       
    64     
       
    65     /**
       
    66      * Handles FindAllL results.
       
    67      * After find results are passed to the engine, the media object
       
    68      * needs to be picked up by the client.
       
    69      *
       
    70      * @since S60 3.2.3
       
    71      * @param aMedia media item(s)
       
    72      * @param aError error for the operation, or size of the buffer to return
       
    73      */
       
    74     virtual void HandleFindAll(CMPXMedia* aMedia, TInt aError) = 0;
       
    75     
       
    76     };    
       
    77     
       
    78 #endif // MMPXCOLLECTIONENGINECOMMONOBSERVER_H