emailservices/emailstore/message_store/client/api/MsgStoreMailBoxObserver.h
changeset 0 8466d47a6819
child 8 e1b6206813b4
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Message store mailbox observer.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __MSG_STORE_MAILBOX_OBSERVER_H__
       
    21 #define __MSG_STORE_MAILBOX_OBSERVER_H__
       
    22 
       
    23 //<cmail>
       
    24 #include "MsgStoreTypes.h"
       
    25 //</cmail>
       
    26 
       
    27 class CMsgStoreObserverHandler;
       
    28 
       
    29 /** This class defines the mailbox observation API.
       
    30 
       
    31 	This class defines the abstract interface for the mailbox observer.  Notification functions
       
    32 	are provided to indicate adds/changes/deletes/moves.
       
    33 */
       
    34 class MMsgStoreMailBoxObserver 
       
    35 	{
       
    36 	public:
       
    37 			
       
    38 		/** Notifies of updates to objects in the store.
       
    39 			
       
    40 			This function notifies the observer of an add/change/delete/move of a mailbox object.
       
    41 			The observer will not be notified of modifications that are performed from the observer's
       
    42 			own message store session.
       
    43 			
       
    44 			When adding a message, no observer notifications will be sent for the message, or for any
       
    45 			attachments, until the message is committed (for the message itself, or for any attachments).
       
    46 			When the message is committed, an Add notification will be sent for the message but not for
       
    47 			any of the attachments.
       
    48 			
       
    49 			When deleting a message or a folder, a Delete notification will be sent for the top-level
       
    50 			deleted object, but not for any subordinate folders, messages, or attachments.
       
    51 			
       
    52 			When copying a message, an Add notification will be sent when the copied message and all
       
    53 			attachments have been fully committed, but no notifications will be sent for the attachments.
       
    54 			
       
    55 			\param aFlags:   This parameter will hold the value of the flags property for the modified
       
    56 			                 object.  The value will be KMsgStoreFlagsNotFound if the flags property is
       
    57 			                 not found in the modified object and for operations that only update the
       
    58 			                 content of the object.
       
    59 			
       
    60 			\param aOtherId: This parameter will be the new parent ID for move operations,
       
    61 			                 otherwise this ID will be the parent of the aParentId container.
       
    62 		*/		
       
    63 		virtual void ModificationNotify( TMsgStoreId            aMailBoxId,
       
    64 										 TMsgStoreOperation     aOperation, 
       
    65 		                                 TMsgStoreContainerType aType,
       
    66 		                                 TUint32                aFlags,
       
    67 		                                 TMsgStoreId            aId, 
       
    68 		                                 TMsgStoreId            aParentId,
       
    69 		                                 TMsgStoreId            aOtherId ) = 0;
       
    70 		
       
    71 	}; // end class MMsgStoreMailBoxObserver
       
    72 
       
    73 
       
    74 #endif