multimediacommsengine/mmcesrv/mmceserver/inc/mcemessagedispatcher.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MCEMESSAGEDISPATCHER_H
       
    22 #define MCEMESSAGEDISPATCHER_H
       
    23 
       
    24 #include "mcesrvlogs.h"
       
    25 
       
    26 
       
    27 /**
       
    28  * message dispatcher
       
    29  *
       
    30  * @lib 
       
    31  */
       
    32 template <class T>
       
    33 class TMceMessageDispatcher
       
    34     {
       
    35     
       
    36 public:
       
    37 
       
    38     /**
       
    39     * Constructor 
       
    40     * @param aService the service
       
    41     */
       
    42     inline TMceMessageDispatcher( T& aService,
       
    43                                   CMceCsServerITC& aItc );
       
    44 
       
    45     inline void DispatchL( TMceIds& aIds, 
       
    46                             TMceItcFunctions aFunction, 
       
    47 					        const RMessage2& aMessage );
       
    48 					  
       
    49     inline CMceMsgBase* DecodeL( TMceItcDataType aType, 
       
    50                                  const TDesC8& aMessage );
       
    51 
       
    52 private:
       
    53 
       
    54     inline CMceCsServerITC& ITC() 
       
    55         {
       
    56         return iItc;
       
    57         }
       
    58     
       
    59 private:
       
    60 
       
    61     /**
       
    62     * service
       
    63     */
       
    64     T& iService;
       
    65 
       
    66     /**
       
    67     * ITC
       
    68     */
       
    69     CMceCsServerITC& iItc;
       
    70 
       
    71     };
       
    72 
       
    73 
       
    74 #include "mcemessagedispatcher.inl"
       
    75 
       
    76 
       
    77 #endif //MCEMESSAGEDISPATCHER_H