natfw/natfwunsaf_protocols/unsaf_codec/inc/natfwunsafmessagelookuptableitem.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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 TMESSAGELOOKUPTABLEITEM_H
       
    22 #define TMESSAGELOOKUPTABLEITEM_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 #include "natfwunsafmessage.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 
       
    30 // TYPEDEFS
       
    31 typedef CNATFWUNSAFMessage*
       
    32     (*TFactoryFnPtr)(const TNATFWUNSAFTransactionID& aTransactionID);
       
    33 
       
    34 // CLASS DECLARATION
       
    35 /**
       
    36 * Lookup table item containing the mapping of UNSAF message types to
       
    37 * factory functions.
       
    38 *
       
    39 *  @lib natfwunsafprotocols.lib
       
    40 */
       
    41 NONSHARABLE_CLASS(TMessageLookupTableItem)
       
    42     {
       
    43     public: // Constructors and destructor
       
    44         /**
       
    45         * Constructor
       
    46         * @param aMessageType UNSAF message type
       
    47         * @param TFactoryFnPtr Function to instantiate a UNSAF message
       
    48         */
       
    49         TMessageLookupTableItem(CNATFWUNSAFMessage::TType aMessageType,
       
    50                                  TFactoryFnPtr aFactoryFn);
       
    51 
       
    52     public: // New functions
       
    53 
       
    54         CNATFWUNSAFMessage::TType MessageType() const;
       
    55         TFactoryFnPtr FactoryFunction() const;
       
    56 
       
    57     private: // Data
       
    58 
       
    59         CNATFWUNSAFMessage::TType iMessageType;
       
    60         TFactoryFnPtr iFactoryFn;
       
    61     };
       
    62 
       
    63 #endif // TMESSAGELOOKUPTABLEITEM_H
       
    64 
       
    65