imservices/instantmessagingcache/imcacheserver/inc/mimcachemessagefactory.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 17 Dec 2009 08:54:49 +0200
changeset 0 e6b17d312c8b
permissions -rw-r--r--
Revision: 200949 Kit: 200951

/*
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  factory helper class declaration  
*
*/


#ifndef __MIMCACHEMESSAGEFACTORY_H__
#define __MIMCACHEMESSAGEFACTORY_H__

//INCLUDES

#include <e32std.h>

//	FORWARD DECLERATIONS

class CIMCacheMessageBase;
class MIMCacheMessageHeader;

// CLASS DECLARATION

/**
 *  Interface for creator of MCAIMCacheMessages.
 *  imcacheserver.exe
 *  @since 5.0
 */
class MIMCacheMessageFactory
    {
	protected:

		/**
		 * Destructor.
		 */
		virtual ~MIMCacheMessageFactory() {};

    public: // Interface

	
		/**
		 *	Creates cahe message header
		 *	@since 5.0
		 *  @param aServiceId service Id
         *  @param aBuddyId sender.
         * 	@return Instance to MIMCacheMessageHeader
		 */
		virtual MIMCacheMessageHeader* CreateIMCacheMessageHeaderL(TInt aServiceId, const TDesC& aBuddyId ) = 0;
								 
	    /**
         *  Creates cashe message
         *  @param aSender sender of message.
         *  @param aRecipient recipient of message.
         *  @param aData content data.
         *  @return Instance to CIMCacheMessageBase
         */
         virtual CIMCacheMessageBase* CreateCacheMessageL(
                                        const TDesC& aData ) = 0;
                                        
	    /**
         *  Find Index
         *  @param aArray array
         *  @param aRecipient recipient of message.
         *  @param aServiceId service Id
         *  @param aSender sender.
         */
         virtual TInt FindHeaderIndexL( RPointerArray<MIMCacheMessageHeader>& aArray, 
										TInt aServiceId,
										const TDesC& aBuddyId ) = 0 ;
    };

#endif      // __MIMCACHEMESSAGEFACTORY_H__

// End of File