pushmtm/Plugins/WhiteListAdapterInc/WhiteListAdapterItem.h
branchRCL_3
changeset 65 8e6fa1719340
parent 0 84ad3b177aa3
equal deleted inserted replaced
64:6385c4c93049 65:8e6fa1719340
       
     1 /*
       
     2 * Copyright (c) 2002 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 the License "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 *     Class the represents a physical proxy (in context of WAP Provisioning).
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef WHITELISTADAPTERITEM_H
       
    21 #define WHITELISTADAPTERITEM_H
       
    22 
       
    23 // INCLUDE FILES
       
    24 
       
    25 	// User includes
       
    26 #include "PushInitiator.h"
       
    27 #include "WhiteListAdapterDef.h"
       
    28 	// System includes
       
    29 #include <e32std.h>
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 * This class encapsulates a proxy item found in a WAP Provisioning document.
       
    35 * It is designed for describing a particular White List address.
       
    36 */
       
    37 class TWhiteListAdapterItem
       
    38 	{
       
    39 	public :	// construction, destruction
       
    40 		/**
       
    41 		* Default constructor.
       
    42 		*/
       
    43 		TWhiteListAdapterItem();
       
    44 
       
    45 	public :	// getter/setter methods
       
    46 		/**
       
    47 		* Use this method to get the address.
       
    48 		* @return The stored proxy address.
       
    49 		*/
       
    50 		const TDesC& Address() const;
       
    51 
       
    52 		/**
       
    53 		* Use this method to get the address type.
       
    54 		* @return The type of the stored proxy address.
       
    55 		*/
       
    56 		CPushInitiator::TAddrType AddressType() const;
       
    57 
       
    58         /**
       
    59         * Tells the ID of the item.
       
    60         * @return Item ID.
       
    61         */
       
    62         TUint32 Id() const;
       
    63 
       
    64         /**
       
    65         * Tells the ID of the item in a buffer.
       
    66         * @return Item ID in a buffer.
       
    67         */
       
    68         const TDesC8& IdBuf() const;
       
    69 
       
    70         /**
       
    71         * Tells the push support.
       
    72         * @return Push support.
       
    73         */
       
    74         TPushSupport PushSupport() const;
       
    75 
       
    76 		/**
       
    77 		* Sets the address.
       
    78 		* @param aAddress The proxy address to be set.
       
    79 		*/
       
    80 		void SetAddress( const TDesC& aAddress );
       
    81 
       
    82 		/**
       
    83 		* Sets the address type.
       
    84 		* @param aAddressType The proxy address type to be set.
       
    85 		*/
       
    86 		void SetAddressType( const TDesC& aAddressType );
       
    87 
       
    88 		/**
       
    89 		* Sets the ID of the item.
       
    90 		* @param aID The ID.
       
    91 		*/
       
    92         void SetId( TUint32 aId );
       
    93 
       
    94         /**
       
    95 		* Sets the physical proxy ID.
       
    96 		* @param aProxyId The physical proxy identifier to be set.
       
    97 		*/
       
    98 		void SetProxyId( const TDesC& aProxyId );
       
    99 
       
   100 		/**
       
   101 		* Sets whether or not the proxy address is push enabled.
       
   102 		* @param aPushEnabled If the value is 1, then push is enabled,
       
   103 		* otherwise (i.e. when the value is 0) the push is disabled.
       
   104 		*/
       
   105 		void SetPushSupport( TPushSupport aPushSupport );
       
   106 
       
   107 	public :	// other public methods
       
   108 
       
   109         /**
       
   110 		* Tells whether the freshly initialized adapter item contains
       
   111 		* information about a valid proxy address. The proxy address is
       
   112 		* invalid if either it is not type of the correct address type
       
   113 		* or the proxy server is not push enabled.
       
   114 		* @return ETrue if the proxy address is valid, EFalse otherwise.
       
   115 		*/
       
   116 		TBool Valid() const;
       
   117 
       
   118 	private :	// data members
       
   119 
       
   120         TPtrC iAddress;				///< Physical proxy gateway address
       
   121 
       
   122 		CPushInitiator::TAddrType iAddressType;
       
   123 
       
   124         /// ID of the item after it has been added to MTM Settings.
       
   125         TUint32 iId;
       
   126         /// ID of the item packaged into a buffer pointer.
       
   127         TPckgC<TUint32> iIdBufPtr;
       
   128 
       
   129 		TPtrC iProxyId;				///< Proxy identifier (or name)
       
   130 
       
   131 		TPushSupport iPushSupport;
       
   132 	};
       
   133 
       
   134 #endif	// WHITELISTADAPTERITEM_H
       
   135 
       
   136 // End of file