imservices/instantmessagingcache/imcacheclient/inc/mimcacheclient.h
changeset 51 61fad867f68e
equal deleted inserted replaced
-1:000000000000 51:61fad867f68e
       
     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:  message change observer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __MIMCACHECLIENT_H
       
    21 #define __MIMCACHECLIENT_H
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <imcachedefs.h>
       
    25 
       
    26 /**
       
    27  * An interface through which client gets information
       
    28  * about available  data updates.
       
    29  *
       
    30  * @since
       
    31  */
       
    32 class MIMCacheClient
       
    33     {
       
    34     public:
       
    35     
       
    36     	
       
    37 		/**
       
    38     	* Registeres the cache update observer to server
       
    39     	* @param aStatus status message to regisetr
       
    40 		* @param aRight, operations
       
    41     	*/
       
    42         virtual void RegisterObserverToServerL( TRequestStatus& aStatus, EIMCacheOperations aRight ) = 0;
       
    43         
       
    44         /**
       
    45     	* unRegisteres the cache update  observer to server
       
    46     	* @param aStatus status message to regisetr
       
    47 		* @param aRight, operations
       
    48     	*/
       
    49         virtual void UnRegisterObserverToServerL( TRequestStatus& aStatus, EIMCacheOperations aRight ) = 0 ;
       
    50               
       
    51         /**
       
    52         * Gets called when data update is available.
       
    53         * Client can then decide wether to use the old one
       
    54         * @param aRight, operations
       
    55         * @param abuuferptr 
       
    56         */
       
    57         virtual TPtr8 GetBufferedDataL(EIMCacheOperations aOperationType ) = 0 ;
       
    58         
       
    59         /**
       
    60          * cancels any outstanding requests pending from the server
       
    61          * @param aStatus status message to regisetr
       
    62          * @param aRight,right is operations
       
    63          */
       
    64         virtual void CancelRequestL( TRequestStatus& aStatus, EIMCacheOperations aRight) = 0;
       
    65          
       
    66 protected:
       
    67     	/**
       
    68     	* Destructor
       
    69     	*/
       
    70     	virtual ~MIMCacheClient() {};
       
    71     };
       
    72 
       
    73 #endif //__MIMCACHECLIENT_H
       
    74 
       
    75