ccservices/cmsservices/cmsengine/inc/cmsnotificationhandlerapi.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Presence in pbonebook
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CMSNOTIFICATIONHANDLERAPI_H__
       
    20 #define __CMSNOTIFICATIONHANDLERAPI_H__
       
    21 
       
    22 #include <e32std.h>
       
    23 #include "cmscontactfielditem.h"
       
    24 
       
    25 enum TCmsPhonebookEvent
       
    26     {
       
    27     ECmsContactModified = 0,
       
    28     ECmsContactDeleted        
       
    29     };
       
    30 
       
    31 class CCmsContactField;
       
    32 
       
    33 
       
    34 /**
       
    35  * MCmsNotificationHandlerAPI
       
    36  *
       
    37  * Presence in phonebook
       
    38  *
       
    39  * @lib cmsclient
       
    40  * @since s60 v5.0
       
    41  */
       
    42 class MCmsNotificationHandlerAPI
       
    43     {
       
    44 public:
       
    45     
       
    46     /**
       
    47     * Get the subscribed data.
       
    48     * @param aField contact field, ownership is transferred to callee.
       
    49     */
       
    50     virtual void HandlePresenceNotificationL( CCmsContactField* aField ) = 0;
       
    51     
       
    52     /**
       
    53     * Get a notification of a change in the status of a contact
       
    54     * @param TPhonebookEvent The type of the notification
       
    55     */
       
    56     virtual void HandlePhonebookNotificationL( TCmsPhonebookEvent aNotificationType ) = 0;
       
    57     
       
    58     /**
       
    59     * Subscription is terminated.
       
    60     * @param aStatus error code
       
    61     * @param aNotificationType type of subscritpion    
       
    62     */    
       
    63     virtual void CmsNotificationTerminatedL( TInt aStatus, 
       
    64         CCmsContactFieldItem::TCmsContactNotification aNotificationType ) = 0; 
       
    65 
       
    66     };
       
    67 
       
    68 #endif // __CMSNOTIFICATIONHANDLERAPI_H__
       
    69 
       
    70