contacts_plat/phonebook_2_contact_related_icon_customization_api/inc/MCustomIconChangeObserver.h
branchRCL_3
changeset 6 e8e3147d53eb
equal deleted inserted replaced
5:81f8547efd4f 6:e8e3147d53eb
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:  Observer interface for custom icon change events.
       
    15 */
       
    16 
       
    17 #ifndef MCUSTOMICONCHANGEOBSERVER_H
       
    18 #define MCUSTOMICONCHANGEOBSERVER_H
       
    19 
       
    20 // INCLUDES
       
    21 #include <e32base.h>
       
    22 #include <ContactCustomIconPluginDefs.h>
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class CContactCustomIconPluginBase;
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30  * Observer interface for custom icon change events.
       
    31  */
       
    32 class MCustomIconChangeObserver
       
    33     {
       
    34     public: // Notifications from plug-in to client
       
    35 
       
    36         /**
       
    37          * Icon event type definitions
       
    38          */
       
    39         enum TEventType
       
    40             {
       
    41             /**
       
    42              * General icon update notification indicates that some
       
    43              * or all of the icons have changed in some manner (update,
       
    44              * removed, added).
       
    45              * Client app should update all custom icons.
       
    46              */
       
    47             EIconsMajorChange,
       
    48 
       
    49             /**
       
    50              * Icons have been updated.
       
    51              */
       
    52             EIconsUpdated,
       
    53 
       
    54             /**
       
    55              * Some of the icons have been removed.
       
    56              */
       
    57             EIconsRemoved,
       
    58 
       
    59             /**
       
    60              * There are new icons available.
       
    61              */
       
    62             EIconsAdded
       
    63             };
       
    64 
       
    65         /**
       
    66          * Icon change notification event from plug-in to the client.
       
    67          * Indicates that one or more of the icons have become invalid. Client
       
    68          * needs to refresh its view by loading and drawing new icons.
       
    69          *
       
    70          * @param aPlugin       Plug-in, which initiated this notification. Plug-in
       
    71          *                      should provide 'this' reference.
       
    72          * @param aEventType    Event type, @see TEventType
       
    73          * @param aIconIds      Icon id array indicating the icons, which have changed.
       
    74          *                      While have to be given-in by plug-in, semantics of
       
    75          *                      the parameter are loose. Specifically empty array
       
    76          *                      means the TEventType concerns all possible icons.
       
    77          */
       
    78         virtual void CustomIconEvent(
       
    79                 CContactCustomIconPluginBase& aPlugin,
       
    80                 TEventType aEventType,
       
    81                 const TArray<TCustomIconId>& aIconIds ) = 0;
       
    82 
       
    83         /**
       
    84          * Factory function for getting access to extended notifications. Uid
       
    85          * defines the extension interface being used.
       
    86          *
       
    87          * @param aNotificationUid  Identifier for an extension API class.
       
    88          * @return  Extension class.
       
    89          */
       
    90         virtual TAny* IconChangeNotificationExtension(
       
    91                     TUid /*aNotificationUid*/ )
       
    92             {
       
    93             return NULL;
       
    94             }
       
    95 
       
    96     protected: // Disabled functions
       
    97         ~MCustomIconChangeObserver() {}
       
    98     };
       
    99 
       
   100 #endif // MCUSTOMICONCHANGEOBSERVER_H
       
   101 
       
   102 // End of File