natfw/natfwstunplugin/inc/natfwstunstreamdata.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 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:    Stores for stream and connection related data for
       
    15 *                plug-in's internal use
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef NATFWSTUNSTREAMDATA_H
       
    23 #define NATFWSTUNSTREAMDATA_H
       
    24 
       
    25 #include <e32def.h>
       
    26 #include <in_sock.h>
       
    27 
       
    28 class CSTUNBinding;
       
    29 class CNATFWCandidate;
       
    30 
       
    31 
       
    32 /**
       
    33  *  Class for storing connection related data.
       
    34  *
       
    35  *  @lib stunplugin.lib
       
    36  *  @since S60 v3.2
       
    37  */
       
    38 class TConnectionData
       
    39     {
       
    40 
       
    41 public: // Constructors and destructor
       
    42 
       
    43     inline TConnectionData() :
       
    44         iConnectionId( 0 ),
       
    45         iStunBinding( NULL ),
       
    46         iLocalCandidate( NULL ),
       
    47         iDestAddr( KAFUnspec ),
       
    48         iStunSrvAddr( KAFUnspec ),
       
    49         iSendingActivated( EFalse ),
       
    50         iMediaSendingActivated( EFalse ),
       
    51         iReceivingActivated( EFalse )
       
    52         {};
       
    53 
       
    54 public: // Data
       
    55 
       
    56     /**
       
    57      * ID for used connection
       
    58      */
       
    59     TUint iConnectionId;
       
    60 
       
    61     /**
       
    62      * CSTUNBinding instance
       
    63      * Own.
       
    64      */
       
    65     CSTUNBinding* iStunBinding;
       
    66 
       
    67     /**
       
    68      * CNATFWCandidate instance
       
    69      * Own.
       
    70      */
       
    71     CNATFWCandidate* iLocalCandidate;
       
    72 
       
    73     /**
       
    74      * Destination address
       
    75      */
       
    76     TInetAddr iDestAddr;
       
    77 
       
    78     /**
       
    79      * STUN server address
       
    80      */
       
    81     TInetAddr iStunSrvAddr;
       
    82 
       
    83     /**
       
    84      * Flag defining whether connection's sending is activated
       
    85      */
       
    86     TBool iSendingActivated;
       
    87 
       
    88     /**
       
    89      * Flag defining whether connection's media sending is activated.
       
    90      */
       
    91     TBool iMediaSendingActivated;
       
    92 
       
    93     /**
       
    94      * Flag defining whether connection's receiving is activated
       
    95      */
       
    96     TBool iReceivingActivated;
       
    97     };
       
    98 
       
    99 
       
   100 /**
       
   101  *  Class for storing stream related data.
       
   102  *
       
   103  *  @lib stunplugin.lib
       
   104  *  @since S60 v3.2
       
   105  */
       
   106 class TStreamData
       
   107     {
       
   108 
       
   109 public: // Constructors and destructor
       
   110 
       
   111     inline TStreamData() :
       
   112         iStreamId( 0 ),
       
   113         iTransportProtocol( KProtocolInetUdp ),
       
   114         iRtoValue( 0 )
       
   115         {};
       
   116 
       
   117 public: // Data
       
   118 
       
   119     /**
       
   120      * ID of used stream
       
   121      */
       
   122     TUint iStreamId;
       
   123 
       
   124     /**
       
   125      * Array for storing data for each connection.
       
   126      */
       
   127     RArray<TConnectionData> iConnArray;
       
   128     
       
   129     /**
       
   130      * Used transport protocol
       
   131      */
       
   132     TUint iTransportProtocol;
       
   133     
       
   134     /**
       
   135      * Retransmission timeout for STUN transactions
       
   136      */
       
   137     TUint iRtoValue;
       
   138     };
       
   139 
       
   140 #endif // NATFWSTUNSTREAMDATA_H