|
1 /* |
|
2 * Copyright (c) 2004 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: Implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <sipaddress.h> |
|
19 #include <sipregistrationbinding.h> |
|
20 #include <siptoheader.h> |
|
21 |
|
22 #include "TCmdGetRegistrationAOR.h" |
|
23 #include "SIPConstants.h" |
|
24 |
|
25 /** |
|
26 * INPUT: |
|
27 * Headers: - |
|
28 * Parameters: - |
|
29 * IDs: RegistrationId |
|
30 * |
|
31 * OUTPUT: |
|
32 * Parameters: - |
|
33 * IDs: Address |
|
34 */ |
|
35 void TCmdGetRegistrationAOR::ExecuteL() |
|
36 { |
|
37 // -- Setup --------------------------------------------------------------- |
|
38 |
|
39 // Get SIP objects from registry |
|
40 CSIPRegistrationBinding* registration = GetRegistrationL(); |
|
41 |
|
42 // -- Execution ----------------------------------------------------------- |
|
43 |
|
44 // Get registration To address |
|
45 HBufC8* aor = registration->Aor().SIPAddress().ToTextLC(); |
|
46 |
|
47 // -- Response creation --------------------------------------------------- |
|
48 |
|
49 AddTextResponseL( KParamAddress, aor->Des() ); |
|
50 CleanupStack::PopAndDestroy( aor ); |
|
51 } |
|
52 |
|
53 TBool TCmdGetRegistrationAOR::Match( const TTcIdentifier& aId ) |
|
54 { |
|
55 return TTcSIPCommandBase::Match( aId, _L8("GetRegistrationAOR") ); |
|
56 } |
|
57 |
|
58 TTcCommandBase* TCmdGetRegistrationAOR::CreateL( MTcTestContext& aContext ) |
|
59 { |
|
60 return new( ELeave ) TCmdGetRegistrationAOR( aContext ); |
|
61 } |