equal
deleted
inserted
replaced
|
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "chttpconnectioninfo.h" |
|
17 |
|
18 CHttpConnectionInfo* CHttpConnectionInfo::NewL(RStringPool aStringPool, const TDesC8& aHost, TUint16 aPort) |
|
19 { |
|
20 CHttpConnectionInfo* self = new (ELeave) CHttpConnectionInfo(aStringPool); |
|
21 CleanupStack::PushL(self); |
|
22 self->ConstructL(aHost, aPort); |
|
23 CleanupStack::Pop(self); |
|
24 return self; |
|
25 } |
|
26 |
|
27 CHttpConnectionInfo::~CHttpConnectionInfo() |
|
28 { |
|
29 iHost.Close(); |
|
30 } |
|
31 |
|
32 |
|
33 void CHttpConnectionInfo::ConstructL(const TDesC8& aHost, TUint16 aPort) |
|
34 { |
|
35 iHost = iStringPool.OpenFStringL(aHost); |
|
36 iPort = aPort; |
|
37 } |
|
38 |
|
39 |
|
40 TBool CHttpConnectionInfo::HostAndPortMatches(const CHttpConnectionInfo& aConnectionInfo) const |
|
41 { |
|
42 if( iHost != aConnectionInfo.iHost || |
|
43 iPort != aConnectionInfo.iPort |
|
44 ) |
|
45 return EFalse; |
|
46 return ETrue; |
|
47 } |