mmsharing/mmshavailability/tsrc/ut_availability/Stubs/src/csipcontactheaderstub.cpp
equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 #include <sipcontactheader.h> |
|
18 #include "musavacapabilitytesthelper.h" |
|
19 |
|
20 |
|
21 CSIPAddress* CSIPContactHeader::SIPAddress() |
|
22 { |
|
23 CSIPAddress* ret = iSIPAddress; |
|
24 |
|
25 if (HelpFlags::iUseTestSipAddress) |
|
26 { |
|
27 ret = HelpFlags::iTestSipAddress; |
|
28 } |
|
29 |
|
30 return ret; |
|
31 } |
|
32 |
|
33 RPointerArray<CSIPContactHeader> CSIPContactHeader::DecodeL(const TDesC8& aValue) |
|
34 { |
|
35 RPointerArray<CSIPContactHeader> headers; |
|
36 if ( !HelpFlags::iEmptyContactHeader ) |
|
37 { |
|
38 CleanupClosePushL(headers); |
|
39 |
|
40 CSIPAddress* address = CSIPAddress::DecodeL( aValue ); |
|
41 |
|
42 CleanupStack::PushL( address ); |
|
43 CSIPContactHeader* contactHeader = CSIPContactHeader::NewL( address ); |
|
44 CleanupStack::Pop( address ); |
|
45 |
|
46 CleanupStack::PushL( contactHeader ); |
|
47 headers.AppendL( contactHeader ); |
|
48 CleanupStack::Pop(contactHeader); |
|
49 |
|
50 CleanupStack::Pop(); //headers |
|
51 } |
|
52 return headers; |
|
53 } |
|
54 |
|
55 |