natplugins/natpcliprovisioningnatfwadapter/inc/turnserveritem.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:  TURN server item.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TURNSERVERITEM_H
       
    20 #define TURNSERVERITEM_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 /**
       
    25  *  TURN server item.
       
    26  *
       
    27  *  Holds transiently one TURN server item before it is saved to
       
    28  *  Central Repository in class CWPNATFWItem.
       
    29  *
       
    30  *  @lib wpnatfwtraversaladapter.lib
       
    31  *  @since S60 3.2
       
    32  */
       
    33 class CWPTurnServerItem : public CBase
       
    34     {
       
    35 
       
    36     /**
       
    37      * For EUnit tests; uncomment when running tests.
       
    38      */
       
    39     //friend class T_NATFWTraversalAdapter;
       
    40 
       
    41 public:
       
    42 
       
    43     static CWPTurnServerItem* NewL();
       
    44     static CWPTurnServerItem* NewLC();
       
    45 
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     virtual ~CWPTurnServerItem();
       
    50 
       
    51     /**
       
    52      * Setter for TURN server address.
       
    53      *
       
    54      * @since S60 3.2
       
    55      * @param aTurnSrvAddr TURN server address.
       
    56      */
       
    57     void SetTurnSrvAddrL( const TDesC8& aTurnSrvAddr );
       
    58 
       
    59     /**
       
    60      * Setter for TURN server address.
       
    61      *
       
    62      * @since S60 3.2
       
    63      * @param aTurnSrvPort TURN server port.
       
    64      */
       
    65     void SetTurnSrvPort( TInt aTurnSrvPort );
       
    66 
       
    67     /**
       
    68      * Setter for TURN server username.
       
    69      *
       
    70      * @since S60 3.2
       
    71      * @param aUsername TURN server username.
       
    72      */
       
    73     void SetTurnUsernameL( const TDesC8& aUsername );
       
    74 
       
    75     /**
       
    76      * Setter for TURN server password.
       
    77      *
       
    78      * @since S60 3.2
       
    79      * @param aPassword TURN server password.
       
    80      */
       
    81     void SetTurnPasswordL( const TDesC8& aPassword );
       
    82 
       
    83     /**
       
    84      * Getter for TURN server address.
       
    85      *
       
    86      * @since S60 3.2
       
    87      * @return TURN server address.
       
    88      */
       
    89     const TDesC8& TurnSrvAddr() const;
       
    90 
       
    91     /**
       
    92      * Getter for TURN server address.
       
    93      *
       
    94      * @since S60 3.2
       
    95      * @return TURN server port.
       
    96      */
       
    97     TInt TurnSrvPort() const;
       
    98 
       
    99     /**
       
   100      * Getter for TURN server username.
       
   101      *
       
   102      * @since S60 3.2
       
   103      * @return TURN server username.
       
   104      */
       
   105     const TDesC8& TurnUsername() const;
       
   106 
       
   107     /**
       
   108      * Getter for TURN server password.
       
   109      *
       
   110      * @since S60 3.2
       
   111      * @return TURN server password.
       
   112      */
       
   113     const TDesC8& TurnPassword() const;
       
   114 
       
   115 private:
       
   116 
       
   117     CWPTurnServerItem();
       
   118 
       
   119     void ConstructL();
       
   120 
       
   121 private: // data
       
   122 
       
   123     /**
       
   124      * TURN server address.
       
   125      * OMA CP Parameter: TURNSRVADDR. See w902E.txt for more information.
       
   126      * Own.
       
   127      */
       
   128     HBufC8* iTurnSrvAddr;
       
   129 
       
   130     /**
       
   131      * TURN server port.
       
   132      * OMA CP Parameter: TURNSRVPORT. See w902E.txt for more information.
       
   133      */
       
   134     TInt iTurnSrvPort;
       
   135 
       
   136     /**
       
   137      * TURN server username.
       
   138      * OMA CP Parameter: AAUTHNAME. See w902E.txt for more information.
       
   139      * Own.
       
   140      */
       
   141     HBufC8* iTurnUsername;
       
   142 
       
   143     /**
       
   144      * TURN server password.
       
   145      * OMA CP Parameter: AAUTHSECRET. See w902E.txt for more information.
       
   146      * Own.
       
   147      */
       
   148     HBufC8* iTurnPassword;
       
   149 
       
   150     };
       
   151 
       
   152 #endif // TURNSERVERITEM_H
       
   153