imservices/instantmessagingcache/imcacheserver/inc/mimcachemessagefactory.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:  factory helper class declaration  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __MIMCACHEMESSAGEFACTORY_H__
       
    20 #define __MIMCACHEMESSAGEFACTORY_H__
       
    21 
       
    22 //INCLUDES
       
    23 
       
    24 #include <e32std.h>
       
    25 
       
    26 //	FORWARD DECLERATIONS
       
    27 
       
    28 class CIMCacheMessageBase;
       
    29 class MIMCacheMessageHeader;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  *  Interface for creator of MCAIMCacheMessages.
       
    35  *  imcacheserver.exe
       
    36  *  @since 5.0
       
    37  */
       
    38 class MIMCacheMessageFactory
       
    39     {
       
    40 	protected:
       
    41 
       
    42 		/**
       
    43 		 * Destructor.
       
    44 		 */
       
    45 		virtual ~MIMCacheMessageFactory() {};
       
    46 
       
    47     public: // Interface
       
    48 
       
    49 	
       
    50 		/**
       
    51 		 *	Creates cahe message header
       
    52 		 *	@since 5.0
       
    53 		 *  @param aServiceId service Id
       
    54          *  @param aBuddyId sender.
       
    55          * 	@return Instance to MIMCacheMessageHeader
       
    56 		 */
       
    57 		virtual MIMCacheMessageHeader* CreateIMCacheMessageHeaderL(TInt aServiceId, const TDesC& aBuddyId ) = 0;
       
    58 								 
       
    59 	    /**
       
    60          *  Creates cashe message
       
    61          *  @param aSender sender of message.
       
    62          *  @param aRecipient recipient of message.
       
    63          *  @param aData content data.
       
    64          *  @return Instance to CIMCacheMessageBase
       
    65          */
       
    66          virtual CIMCacheMessageBase* CreateCacheMessageL(
       
    67                                         const TDesC& aData ) = 0;
       
    68                                         
       
    69 	    /**
       
    70          *  Find Index
       
    71          *  @param aArray array
       
    72          *  @param aRecipient recipient of message.
       
    73          *  @param aServiceId service Id
       
    74          *  @param aSender sender.
       
    75          */
       
    76          virtual TInt FindHeaderIndexL( RPointerArray<MIMCacheMessageHeader>& aArray, 
       
    77 										TInt aServiceId,
       
    78 										const TDesC& aBuddyId ) = 0 ;
       
    79     };
       
    80 
       
    81 #endif      // __MIMCACHEMESSAGEFACTORY_H__
       
    82 
       
    83 // End of File