natfw/natfwturnplugin/inc/cnatfwturnserversettings.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 server related data for plug-in's internal use
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CNATFWTURNSERVERSETTINGS_H
       
    22 #define CNATFWTURNSERVERSETTINGS_H
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 /**
       
    27  *  Encapsulates server related data.
       
    28  *
       
    29  *  @lib  turnplugin.dll
       
    30  *  @since S60 v3.2
       
    31  */
       
    32 class CTurnServerSettings : public CBase
       
    33     {
       
    34     
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Two-phased constructor.
       
    39      */
       
    40     static CTurnServerSettings* NewL();
       
    41 
       
    42     /**
       
    43      * Two-phased constructor.
       
    44      */
       
    45     static CTurnServerSettings* NewLC();
       
    46     
       
    47     virtual ~CTurnServerSettings();
       
    48 
       
    49 public:
       
    50 
       
    51     /**
       
    52      * Set address
       
    53      *
       
    54      * @since S60 v3.2
       
    55      * @param aAddress Address to set
       
    56      */
       
    57      void SetAddressL( const TDesC8& aAddress );
       
    58      
       
    59     /**
       
    60      * Return address
       
    61      *
       
    62      * @since S60 v3.2
       
    63      * @return Address
       
    64      */
       
    65      const TDesC8& Address() const;
       
    66 
       
    67     /**
       
    68      * Set port
       
    69      *
       
    70      * @since S60 v3.2
       
    71      * @param aPort Port to set
       
    72      */
       
    73      void SetPort( TUint aPort );
       
    74      
       
    75     /**
       
    76      * Return port
       
    77      *
       
    78      * @since S60 v3.2
       
    79      * @return Port
       
    80      */
       
    81      TUint Port() const;
       
    82           
       
    83     /**
       
    84      * Set the username
       
    85      *
       
    86      * @since S60 v3.2
       
    87      * @param aUsername Username to set
       
    88      */
       
    89      void SetUsernameL( const TDesC8& aUsername );
       
    90      
       
    91     /**
       
    92      * Return username
       
    93      *
       
    94      * @since S60 v3.2
       
    95      * @return Username
       
    96      */
       
    97      const HBufC8* Username() const;
       
    98      
       
    99     /**
       
   100      * Set the password
       
   101      *
       
   102      * @since S60 v3.2
       
   103      * @param aPassword Password to set
       
   104      */
       
   105      void SetPasswordL( const TDesC8& aPassword );
       
   106      
       
   107     /**
       
   108      * Return password
       
   109      *
       
   110      * @since S60 v3.2
       
   111      * @return Password
       
   112      */
       
   113      const HBufC8* Password() const;
       
   114 
       
   115 private:
       
   116 
       
   117     CTurnServerSettings();
       
   118 
       
   119 
       
   120 private:
       
   121 
       
   122     /*
       
   123      * Address.
       
   124      * Own.
       
   125      */
       
   126     HBufC8* iAddress;
       
   127 
       
   128     /*
       
   129      * Port
       
   130      */
       
   131     TUint iPort;
       
   132         
       
   133     /*
       
   134      * Username.
       
   135      * Own.
       
   136      */
       
   137     HBufC8* iUsername;
       
   138     
       
   139     /*
       
   140      * Password.
       
   141      * Own.
       
   142      */
       
   143     HBufC8* iPassword;
       
   144     };
       
   145 
       
   146 #endif // CNATFWSTUNSERVERSETTINGS_H