imservices/instantmessagingcache/imcacheserver/inc/timcachemessagefactory.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 TIMCHACHEMESSAGEFACTORY_H
       
    20 #define TIMCHACHEMESSAGEFACTORY_H
       
    21 
       
    22 //INCLUDES
       
    23 
       
    24 #include <e32std.h>
       
    25 #include "mimcachemessagefactory.h"
       
    26 
       
    27 //  FORWARD DECLERATIONS
       
    28 
       
    29 class MIMCacheMessageHeader;
       
    30 class CIMCacheMessageBase;
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  *  Implementation for creator of MCAIMCacheMessages.
       
    35  *
       
    36  *  T-class, because there is no dynamic member variables and because
       
    37  *  there is no other class which suites in this case.
       
    38  *  Class methods cannot be static, because pointer to MIMCacheMessageFactory
       
    39  *  is passed to client.
       
    40  */
       
    41 class TIMCacheMessageFactory : public MIMCacheMessageFactory
       
    42     {
       
    43     public: // Interface
       
    44 
       
    45         
       
    46         /**
       
    47 		 *	Creates cahe message header
       
    48 		 *	@since 5.0
       
    49 		 *  @param aServiceId service Id
       
    50          *  @param aBuddyId sender.
       
    51          *	@return Instance to MIMCacheMessageHeader
       
    52 		 */
       
    53         MIMCacheMessageHeader* CreateIMCacheMessageHeaderL(TInt aServiceId, 
       
    54         													const TDesC& aBuddyId );
       
    55         
       
    56          
       
    57          /**
       
    58          *  Creates cashe message
       
    59          *  @param aSender sender of message.
       
    60          *  @param aRecipient recipient of message.
       
    61          *  @param aData content data.
       
    62          *  @return Instance to CIMCacheMessageBase
       
    63          */
       
    64         CIMCacheMessageBase* CreateCacheMessageL(const TDesC& aData );
       
    65                                         
       
    66                                         
       
    67         /**
       
    68          *  Find Index
       
    69          *  @param aArray array
       
    70          *  @param aRecipient recipient of message.
       
    71          *  @param aServiceId service Id
       
    72          */
       
    73         TInt FindHeaderIndexL( RPointerArray<MIMCacheMessageHeader>& aArray, 
       
    74 								TInt aServiceId,
       
    75 		 						const TDesC& aBuddyId );
       
    76 	                               
       
    77         
       
    78     };
       
    79 
       
    80 #endif      // TIMCHACHEMESSAGEFACTORY_H
       
    81 
       
    82 // End of File