mmappfw_plat/mpx_collection_common_definition_api/inc/mpxcollectionpluginobserver.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 plugin observer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MMPXMCOLLECTIONPLUGINOBSERVER_H
       
    20 #define MMPXMCOLLECTIONPLUGINOBSERVER_H
       
    21 
       
    22 
       
    23 #include <mpxcollectionframeworkdefs.h>
       
    24 #include <mpxmessage2.h>
       
    25 #include <mpxcollectionenginecommonobserver.h>
       
    26 
       
    27 class CMPXCollectionPath;
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  *  MMPXCollectionPluginObserver class
       
    35  *
       
    36  *  Observer interface for Collection plugin
       
    37  */
       
    38 NONSHARABLE_CLASS(MMPXCollectionPluginObserver) :
       
    39     public MMPXCollectionEngineCommonObserver
       
    40     {
       
    41 public:
       
    42 
       
    43    /**
       
    44     * Handle message from plug-in
       
    45     *
       
    46     * @param aMessage, message from the plug-in
       
    47     * @deprecated Please use HandleMessage(CMPXMessage* aMsg, TInt aError)
       
    48     */
       
    49     virtual void HandleMessage(const CMPXMessage& aMsg)
       
    50         {
       
    51         HandleMessage(const_cast<CMPXMessage*>(&aMsg), KErrNone);
       
    52         }
       
    53 
       
    54     /**
       
    55      * Handle message from plug-in.
       
    56      * Note: make it as pure virtual when previous callback removed
       
    57      *
       
    58      * @since S60 3.2.3
       
    59      * @param aMessage message from the plug-in. Ownership not transferred.
       
    60      * @param aError error code.
       
    61      */
       
    62      virtual void HandleMessage(CMPXMessage* /*aMsg*/, TInt /*aError*/)
       
    63          {}
       
    64 
       
    65     /**
       
    66      * Handle opening a group, e.g. an artist.
       
    67      *
       
    68      * @since S60 3.2.3
       
    69      * @param aMedia media object returned. NULL will be returned if error
       
    70      *               Ownership not transferred.
       
    71      * @param aErr error code
       
    72      */
       
    73     virtual void HandleOpen(CMPXMedia* aMedia, TInt aErr) = 0;
       
    74 
       
    75     /**
       
    76      * Handle opening an item.
       
    77      *
       
    78      * @since S60 3.2.3
       
    79      * @param aPath path to the selected item, NULL will be returned if error
       
    80      *              Ownership not transferred
       
    81      * @param aErr error code
       
    82      */
       
    83     virtual void HandleOpen(CMPXCollectionPath* aPath, TInt aErr) = 0;
       
    84 
       
    85     /**
       
    86      * Handle opening a group, e.g. an artist.
       
    87      *
       
    88      * @since S60 3.2.3
       
    89      * @param aMedia media object returned. NULL will be returned if error.
       
    90      *        Ownership not transferred.
       
    91      * @param aPath full path to to current level. Including top level nodes as well.
       
    92      *         NULL will be returned if error. Ownership not transferred
       
    93      *         Note. The path does not contain any state info besides a list of ids.
       
    94      * @param aErr error code
       
    95      */
       
    96     virtual void HandleOpen(CMPXMedia* aMedia,
       
    97                             const CMPXCollectionPath* aPath,
       
    98                             TInt aErr) = 0;
       
    99     };
       
   100 
       
   101 #endif      // MMPXMCOLLECTIONPLUGINOBSERVER_H