imservices/instantmessagingcache/imcacheserver/inc/cimcachebufferarray.h
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     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:  a message class declaration 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CIMIMCACHEBUFFERARRAY_H
       
    20 #define CIMIMCACHEBUFFERARRAY_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <badesca.h>
       
    24 #include <imcachedefs.h>
       
    25 
       
    26 //	FORWARD CLASS DECLERATIONS
       
    27 // CLASS DECLARATION
       
    28 // Definitions
       
    29 
       
    30 /**
       
    31  *  Message Base class
       
    32  */
       
    33 class CIMCacheBufferArray : public CBase
       
    34 	{
       
    35                       	
       
    36     public: // Construction
       
    37     
       
    38     	
       
    39 		/**
       
    40 		 * Construction
       
    41 		  * @param aData, text message
       
    42 		 * @return Pointer to new created instance of CIMCacheBufferArray
       
    43 		 */
       
    44 		static CIMCacheBufferArray* NewL( const TDesC8& aPacketBuffer ,TIMCacheOperationsCode aOperationCode );
       
    45 
       
    46 		
       
    47 		/**
       
    48 		 * Destruction
       
    49 		 */
       
    50 		~CIMCacheBufferArray();
       
    51 		
       
    52 	private : // Construction
       
    53 	
       
    54 		/**
       
    55 		 * Constructor
       
    56 		 */
       
    57 		CIMCacheBufferArray( TIMCacheOperationsCode aOperationCode );
       
    58 		
       
    59 		/**
       
    60 		 * two phase construction
       
    61 		 */
       
    62 		void ConstructL( const TDesC8& aPacketBuffer );
       
    63 
       
    64 public:  
       
    65 	
       
    66 			
       
    67 		/**
       
    68          * operatuin code stored
       
    69          * @return operation code
       
    70          */
       
    71 		TIMCacheOperationsCode OperationCode();
       
    72 		
       
    73 		/**
       
    74          * Message
       
    75          * @return  message
       
    76          */
       
    77 		const TDesC8& PacketData();
       
    78 	                 
       
    79                                             
       
    80 	protected: // Member variables
       
    81 		    
       
    82 	    // owned, message buffer
       
    83 		HBufC8*	 iPacketBuffer;
       
    84 		
       
    85 		// owns : to identify type of message packed
       
    86 		TIMCacheOperationsCode iOperationCode;
       
    87        
       
    88 	}; 
       
    89 
       
    90 #endif      // CIMIMCACHEMESSAGEBASE_H
       
    91 
       
    92 // End of File