|
1 /* |
|
2 * Copyright (c) 2007 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 |
|
19 |
|
20 |
|
21 #include <sipprofile.h> |
|
22 #include <utf.h> |
|
23 #include "TMCETestUIEngineCmdDisplayProfileUser.h" |
|
24 #include "CMCETestUIEngineProfile.h" |
|
25 #include "MCETestUIEngineConstants.h" |
|
26 |
|
27 TMCETestUIEngineCmdDisplayProfileUser::TMCETestUIEngineCmdDisplayProfileUser( |
|
28 CMCETestUIEngine& aEngine, |
|
29 CMCETestUIEngineProfile& aProfile ) |
|
30 : TMCETestUIEngineCmdBase( aEngine ), iProfile(aProfile) |
|
31 { |
|
32 } |
|
33 |
|
34 void TMCETestUIEngineCmdDisplayProfileUser::ExecuteL() |
|
35 { |
|
36 CSIPProfile& profile = iProfile.Profile(); |
|
37 const TDesC8* user( NULL ); |
|
38 User::LeaveIfError( profile.GetParameter( KSIPContactHeaderUser, user ) ); |
|
39 // ownership of user not transferred, CSIPProfile owns it. |
|
40 HBufC* unicodeUser = CnvUtfConverter::ConvertToUnicodeFromUtf8L(*user); |
|
41 CleanupStack::PushL(unicodeUser); |
|
42 iEngine.NotifyUserWaitL(*unicodeUser); |
|
43 CleanupStack::PopAndDestroy(unicodeUser); |
|
44 } |
|
45 |
|
46 const TDesC& TMCETestUIEngineCmdDisplayProfileUser::Caption() const |
|
47 { |
|
48 return KCommandCaptionDisplayProfileUser; |
|
49 } |