|
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 <sipdialog.h> |
|
20 #include <sipdialogassocbase.h> |
|
21 #include <siptoheader.h> |
|
22 |
|
23 #include "TCmdGetDialogAOR.h" |
|
24 #include "SIPConstants.h" |
|
25 |
|
26 /** |
|
27 * INPUT: |
|
28 * Headers: - |
|
29 * Parameters: - |
|
30 * IDs: InviteDialogId*, SubscribeDialogId* |
|
31 * |
|
32 * OUTPUT: |
|
33 * Parameters: - |
|
34 * IDs: Address |
|
35 */ |
|
36 void TCmdGetDialogAOR::ExecuteL() |
|
37 { |
|
38 // -- Setup --------------------------------------------------------------- |
|
39 |
|
40 // Get SIP objects from registry |
|
41 CSIPDialogAssocBase* dialogAssoc = GetAnyDialogAssocL(); |
|
42 |
|
43 // -- Execution ----------------------------------------------------------- |
|
44 |
|
45 // Get dialog To address |
|
46 HBufC8* aor = dialogAssoc->Dialog().ToHeader().SIPAddress().ToTextLC(); |
|
47 |
|
48 // -- Response creation --------------------------------------------------- |
|
49 |
|
50 AddTextResponseL( KParamAddress, aor->Des() ); |
|
51 CleanupStack::PopAndDestroy( aor ); |
|
52 } |
|
53 |
|
54 TBool TCmdGetDialogAOR::Match( const TTcIdentifier& aId ) |
|
55 { |
|
56 return TTcSIPCommandBase::Match( aId, _L8("GetDialogAOR") ); |
|
57 } |
|
58 |
|
59 TTcCommandBase* TCmdGetDialogAOR::CreateL( MTcTestContext& aContext ) |
|
60 { |
|
61 return new( ELeave ) TCmdGetDialogAOR( aContext ); |
|
62 } |