ncdengine/inc/ncdconnectionmethod.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _NCDCONNECTIOMETHOD_H
       
    20 #define _NCDCONNECTIOMETHOD_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class RWriteStream;
       
    25 class RReadStream;
       
    26 
       
    27 
       
    28 /**
       
    29  * Connection types
       
    30  *
       
    31  * @note ENcdConnectionMethodTypeDestination is
       
    32  * supported from 3.2 platform onwards.
       
    33  */
       
    34 enum TNcdConnectionMethodType 
       
    35     {    
       
    36     /**
       
    37      * Always ask
       
    38      */
       
    39     ENcdConnectionMethodTypeAlwaysAsk = 0,
       
    40     
       
    41     /**
       
    42      * Destination aka SNAP
       
    43      */
       
    44     ENcdConnectionMethodTypeDestination,
       
    45     
       
    46     /**
       
    47      * Accesspoint
       
    48      */
       
    49     ENcdConnectionMethodTypeAccessPoint,
       
    50     
       
    51     /**
       
    52      * Device default
       
    53      */
       
    54     ENcdConnectionMethodTypeDefault,        
       
    55     };
       
    56 
       
    57 /**
       
    58  * Connection method 
       
    59  */
       
    60 class TNcdConnectionMethod
       
    61     {
       
    62 public:    
       
    63     TNcdConnectionMethod() : 
       
    64         iId( 0 ), 
       
    65         iType( ENcdConnectionMethodTypeAlwaysAsk )
       
    66         {
       
    67         }
       
    68 
       
    69 
       
    70     TNcdConnectionMethod( TUint32 aId, TNcdConnectionMethodType aType ) : 
       
    71         iId( aId ), 
       
    72         iType( aType )
       
    73         {
       
    74         }
       
    75   
       
    76 
       
    77     IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
       
    78 
       
    79 
       
    80     IMPORT_C void InternalizeL( RReadStream& aStream );
       
    81     
       
    82     
       
    83     /**
       
    84      * ID of the connection method. 
       
    85      *
       
    86      * This is access point ID if iType is ENcdConnectionMethodTypeAccessPoint
       
    87      * and destination/SNAP ID if iType is ENcdConnectionMethodTypeDestination.
       
    88      * Otherwise this should be 0
       
    89      */
       
    90     TUint32 iId;
       
    91     
       
    92     
       
    93     /**
       
    94      * Type of the connection
       
    95      */
       
    96     TNcdConnectionMethodType iType;    
       
    97     };
       
    98                    
       
    99     
       
   100 #endif // _NCDCONNECTIOMETHOD_H