omacpadapters/accesspointadapter/Src/CWPAPPort.cpp
author hgs
Tue, 13 Jul 2010 04:01:20 +0530
changeset 47 d316aecb87fd
permissions -rw-r--r--
201025_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     1
/*
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     2
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     3
* All rights reserved.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     8
*
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     9
* Initial Contributors:
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    11
*
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    12
* Contributors:
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    13
*
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    14
* Description:    Defines a class, which holds proxy port information.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    15
*
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    16
*/
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    17
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    18
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    19
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    20
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    21
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    22
// INCLUDE FILES
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    23
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    24
#include "CWPAPPort.h"					// Own header
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    25
#include "WPAPAdapter.pan"
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    26
#include "CWPLog.h"
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    27
#include "WPAPDefs.h"
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    28
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    29
#include <CWPCharacteristic.h>
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    30
#include <CWPParameter.h>
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    31
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    32
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    33
// ============================ MEMBER FUNCTIONS ===============================
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    34
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    35
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    36
// CWPAPPort::NewL
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    37
// Two-phased constructor.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    38
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    39
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    40
CWPAPPort* CWPAPPort::NewLC( CWPCharacteristic& aCharacteristic )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    41
	{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    42
	CWPAPPort* self = new(ELeave) CWPAPPort(); 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    43
	CleanupStack::PushL( self );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    44
	self->ConstructL();
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    45
    aCharacteristic.AcceptL( *self );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    46
	return self;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    47
	}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    48
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    49
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    50
// CWPAPPort::CWPAPPort
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    51
// C++ default constructor can NOT contain any code, that
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    52
// might leave.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    53
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    54
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    55
CWPAPPort::CWPAPPort() : CWPAPItemBase( KNullDesC )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    56
	{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    57
	}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    58
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    59
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    60
// Destructor
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    61
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    62
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    63
CWPAPPort::~CWPAPPort()
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    64
	{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    65
	}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    66
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    67
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    68
// CWPAPPort::Validate
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    69
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    70
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    71
TBool CWPAPPort::ValidateL()
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    72
	{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    73
	// If we got either service or portnumber and 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    74
	// Those we successfully interpreted the port
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    75
	// information is valid.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    76
	if ( IsReceived( EWPParameterService_id ) ||
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    77
		IsReceived( EWPParameterPortNbr_id ))
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    78
		{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    79
		return ETrue;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    80
		}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    81
	LOG("CWPAP ERROR! Port not valid");
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    82
	return EFalse; // Nothing received so this is invalid.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    83
	}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    84
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    85
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    86
// CWPAPPort::AddData
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    87
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    88
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    89
void CWPAPPort::AddDataL( RCmConnectionMethodExt& aCmItem )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    90
	{    
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    91
	LOG("--CWPAP CWPAPPort::AddDataL begin--");	
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    92
	TInt err(KErrNone);
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    93
	
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    94
	// CMManager
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    95
	TRAP (err, aCmItem.SetBoolAttributeL( CMManager::ECmWapIPSecurity, iConnectionSecurity ));
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    96
	LOG2("CWPAP EApWapSecurity, value: %d, err: %d", iConnectionSecurity, err);
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    97
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    98
	// CMManager
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    99
	TRAP (err, aCmItem.SetIntAttributeL( CMManager::ECmWapIPWSPOption, iSessionMode ));
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   100
	LOG2("CWPAP EApWapWspOption, value: %d, err: %d", iSessionMode, err);
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   101
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   102
	if ( iPortNbr )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   103
		{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   104
		const TDesC& value = iPortNbr->Value();
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   105
		TLex lex( value );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   106
		TUint32 intValue=0;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   107
		err = lex.Val( intValue, EDecimal );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   108
		if ( err == KErrNone )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   109
			{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   110
			if( intValue > 65535 )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   111
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   112
				intValue = 0;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   113
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   114
				
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   115
			// CMManager 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   116
			TRAP (err, aCmItem.SetIntAttributeL( CMManager::ECmProxyPortNumber, intValue ));
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   117
			LOG2("CWPAP EApProxyPortNumber, value: %d, err: %d",
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   118
			                                                 intValue, err);
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   119
			}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   120
		}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   121
	LOG("--CWPAP CWPAPPort::AddDataL end--");	
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   122
	}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   123
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   124
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   125
// CWPAPPort::Name
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   126
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   127
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   128
const TDesC& CWPAPPort::Name()
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   129
	{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   130
    return KNullDesC;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   131
	}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   132
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   133
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   134
// CWPAPPort::AddItemsL
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   135
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   136
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   137
TInt CWPAPPort::AddItemsL( RPointerArray<CWPAPAccesspointItem>& /*aItems*/,
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   138
                           CWPAPItemBase* /*aLogicalProxy*/,
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   139
                           CWPAPItemBase* /*aPhysicalProxy*/ ) 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   140
	{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   141
    return KErrNone;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   142
    }
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   143
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   144
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   145
// CWPAPPort::VisitL
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   146
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   147
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   148
void CWPAPPort::VisitL( CWPCharacteristic& /*aCharacteristic*/ )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   149
	{	
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   150
	}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   151
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   152
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   153
// CWPAPPort::VisitL
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   154
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   155
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   156
void CWPAPPort::VisitL( CWPParameter& aParameter )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   157
	{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   158
	TInt id = aParameter.ID();
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   159
	const TDesC& value = aParameter.Value();
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   160
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   161
	if ( value.Length() == 0 )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   162
		{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   163
		// No use of checking the zero legth parameter.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   164
		return;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   165
		}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   166
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   167
	switch ( id )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   168
		{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   169
		case EWPParameterService: // iConnectionSecurity and iSessionMode
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   170
			{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   171
			// If EWPParameterService value have already received
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   172
			// or service type has been solved from EWPParameterPortNbr value
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   173
			// don't accept this anymore. 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   174
			if ( IsReceived( EWPParameterService_id ) )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   175
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   176
				break;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   177
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   178
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   179
			if ( value == KCLWSP)
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   180
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   181
				// CMManager
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   182
				SetValues( EFalse, CMManager::ECmWapWspOptionConnectionless, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   183
					EWPParameterPortNbr_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   184
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   185
			else if ( value == KCOWSP)
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   186
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   187
				// CMManager
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   188
				SetValues( EFalse, CMManager::ECmWapWspOptionConnectionOriented, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   189
					EWPParameterPortNbr_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   190
					
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   191
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   192
			else if ( value == KCLSECWSP)
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   193
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   194
				// CMManager
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   195
				SetValues( ETrue, CMManager::ECmWapWspOptionConnectionless, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   196
					EWPParameterPortNbr_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   197
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   198
			else if ( value == KCOSECWSP)
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   199
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   200
				// CMManager
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   201
				SetValues( ETrue, CMManager::ECmWapWspOptionConnectionOriented, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   202
					EWPParameterPortNbr_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   203
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   204
			else
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   205
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   206
				// Not supported...
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   207
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   208
			break;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   209
			}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   210
		case EWPParameterPortNbr: // iConnectionSecurity and iSessionMode
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   211
			{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   212
			// If EWPParameterPortNbr value have already handled 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   213
			// don't accept it anymore.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   214
			if ( IsReceived( EWPParameterPortNbr_id ) )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   215
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   216
				break;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   217
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   218
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   219
			// Store the pointer to port parameter
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   220
			iPortNbr = &aParameter;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   221
            MarkReceived( EWPParameterPortNbr_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   222
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   223
			if ( value == K9200 )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   224
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   225
				// CMManager
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   226
				SetValues( EFalse, CMManager::ECmWapWspOptionConnectionless, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   227
					EWPParameterPortNbr_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   228
					
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   229
				// Type of service identified. 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   230
				// No need for Service parameter anymore.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   231
				MarkReceived( EWPParameterService_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   232
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   233
			else if ( value == K9201 || value == K80 ||	value == K8080)
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   234
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   235
				// CMManager
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   236
				SetValues( EFalse, CMManager::ECmWapWspOptionConnectionOriented, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   237
					EWPParameterPortNbr_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   238
				MarkReceived( EWPParameterService_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   239
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   240
			else if ( value == K9202 )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   241
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   242
				// CMManager
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   243
				SetValues( ETrue, CMManager::ECmWapWspOptionConnectionless, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   244
					EWPParameterPortNbr_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   245
				MarkReceived( EWPParameterService_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   246
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   247
			else if ( value == K9203 || value == K443 )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   248
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   249
				// CMManager
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   250
				SetValues( ETrue, CMManager::ECmWapWspOptionConnectionOriented, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   251
					EWPParameterPortNbr_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   252
				MarkReceived( EWPParameterService_id );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   253
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   254
			else
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   255
				{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   256
				// Not supported...
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   257
				}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   258
			break;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   259
			}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   260
		default:
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   261
			{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   262
			// Just let through
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   263
			}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   264
		}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   265
	}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   266
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   267
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   268
// CWPAPPort::SetValues
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   269
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   270
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   271
void CWPAPPort::SetValues( TBool aConnectionSecurity, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   272
                           TInt aSessionMode,
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   273
	                       TMarkedField aReceivedField )
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   274
	{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   275
	__ASSERT_DEBUG( aReceivedField == EWPParameterService_id || 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   276
                    aReceivedField == EWPParameterPortNbr_id,
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   277
                    Panic( EPreConditionFail ) );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   278
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   279
	iConnectionSecurity = aConnectionSecurity;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   280
	iSessionMode = aSessionMode;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   281
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   282
	MarkReceived( aReceivedField );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   283
	}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   284
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   285
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   286
// CWPAPPort::ConstructL
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   287
// Symbian 2nd phase constructor can leave.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   288
// -----------------------------------------------------------------------------
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   289
//
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   290
void CWPAPPort::ConstructL()
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   291
	{
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   292
	}
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   293
d316aecb87fd 201025_02
hgs
parents:
diff changeset
   294
//  End of File