linklayerprotocols/tunnelnif/src/tunnelCommon.cpp
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Tunnel Common Code and Data
       
    15 // This file contains code and data that the Tunnel CFProtocol and MCPr need to share,
       
    16 // for example TTunnelAddressMsgSig.
       
    17 // 
       
    18 //
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalComponent
       
    23 */
       
    24 
       
    25 #include "TunnelAgentHandler.h"
       
    26 #include "tunnelProvision.h"
       
    27 #include <comms-infras/ss_thread.h>
       
    28 #include <ss_glob.h>
       
    29 #include <in_sock.h>
       
    30 
       
    31 using namespace ESock;
       
    32 using namespace Elements;
       
    33 using namespace Messages;
       
    34 
       
    35 enum
       
    36     {
       
    37     ETunnelSetAddressSig = 1,
       
    38     };
       
    39 
       
    40 //
       
    41 // Attribute table for TTunnelAddressMsgSig
       
    42 //
       
    43 
       
    44 START_ATTRIBUTE_TABLE(TSigTunnelAddressParams, TTunnelAgentMessage::ERealmId, ETunnelSetAddressSig)
       
    45   REGISTER_ATTRIBUTE(TSigTunnelAddressParams, iAddress, TMeta<TInetAddr>)
       
    46   REGISTER_ATTRIBUTE(TSigTunnelAddressParams, iNameSer1, TMeta<TInetAddr>)
       
    47   REGISTER_ATTRIBUTE(TSigTunnelAddressParams, iNameSer2, TMeta<TInetAddr>)
       
    48   REGISTER_ATTRIBUTE(TSigTunnelAddressParams, iIsUpdate, TMetaNumber)
       
    49 END_ATTRIBUTE_TABLE_BASE( TSignatureBase, ESignatureBase )
       
    50 
       
    51 DEFINE_MVIP_CTR( TSigTunnelAddressParams )
       
    52 
       
    53 const TImplementationProxy tunnelMessageImplTable[] =
       
    54 /**
       
    55 Virtual constructor table for Tunnel messages.
       
    56 */
       
    57 	{
       
    58 	MVIP_CTR_ENTRY(ETunnelSetAddressSig, TSigTunnelAddressParams)
       
    59 	};
       
    60 
       
    61 void TTunnelMessages::RegisterL()
       
    62 /**
       
    63 Register the virtual constructor table
       
    64 */
       
    65 	{
       
    66 	TlsGlobals::Get().RegisterInterfaceL(TUid::Uid(TTunnelAgentMessage::ERealmId), sizeof(tunnelMessageImplTable) / sizeof(tunnelMessageImplTable[0]), tunnelMessageImplTable);
       
    67 	}
       
    68 
       
    69 void TTunnelMessages::DeRegister()
       
    70 /**
       
    71 DeRegister the virtual constructor table
       
    72 */
       
    73 	{
       
    74 	TlsGlobals::Get().DeregisterInterface(TUid::Uid(TTunnelProvision::EUid));
       
    75 	}
       
    76 
       
    77