1 /* |
|
2 * Copyright (c) 2005-2006 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: Implements home network my device name setting item class to |
|
15 * home network setting item list. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 // INCLUDE FILES |
|
25 #include "upnpappsettingitemmydevicename.h" |
|
26 #include <aknnotewrappers.h> // CAknInformationNote |
|
27 #include <upnpgspluginrsc.rsg> |
|
28 |
|
29 |
|
30 // ================= MEMBER FUNCTIONS ======================= |
|
31 |
|
32 // --------------------------------------------------------- |
|
33 // UPnPAppSettingItemMyDeviceName::NewL() |
|
34 // --------------------------------------------------------- |
|
35 // |
|
36 UPnPAppSettingItemMyDeviceName* UPnPAppSettingItemMyDeviceName::NewL( |
|
37 TInt aIdentifier, |
|
38 TDes& aText, |
|
39 TBool& aSharingState ) |
|
40 { |
|
41 UPnPAppSettingItemMyDeviceName* self = new (ELeave) |
|
42 UPnPAppSettingItemMyDeviceName( |
|
43 aIdentifier, |
|
44 aText, |
|
45 aSharingState ); |
|
46 |
|
47 CleanupStack::PushL(self); |
|
48 self->ConstructL(); |
|
49 CleanupStack::Pop(self); |
|
50 return self; |
|
51 } |
|
52 |
|
53 // ---------------------------------------------------------------- |
|
54 // UPnPAppSettingItemMyDeviceName::UPnPAppSettingItemMyDeviceName() |
|
55 // ---------------------------------------------------------------- |
|
56 // |
|
57 UPnPAppSettingItemMyDeviceName::UPnPAppSettingItemMyDeviceName( |
|
58 TInt aIdentifier, |
|
59 TDes& aText, |
|
60 TBool& aSharingState ) : |
|
61 CAknTextSettingItem(aIdentifier, aText), |
|
62 iSharingState( aSharingState ) |
|
63 { |
|
64 } |
|
65 |
|
66 // --------------------------------------------------------- |
|
67 // UPnPAppSettingItemMyDeviceName::ConstructL() |
|
68 // --------------------------------------------------------- |
|
69 // |
|
70 void UPnPAppSettingItemMyDeviceName::ConstructL() |
|
71 { |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------- |
|
75 // UPnPAppSettingItemMyDeviceName::~UPnPAppSettingItemMyDeviceName() |
|
76 // ----------------------------------------------------------------- |
|
77 // |
|
78 UPnPAppSettingItemMyDeviceName::~UPnPAppSettingItemMyDeviceName() |
|
79 { |
|
80 } |
|
81 |
|
82 // --------------------------------------------------------- |
|
83 // UPnPAppSettingItemMyDeviceName::EditItemL() |
|
84 // --------------------------------------------------------- |
|
85 // |
|
86 void UPnPAppSettingItemMyDeviceName::EditItemL(TBool aCalledFromMenu) |
|
87 { |
|
88 |
|
89 // if sharing is on, only information note is displayed |
|
90 if ( iSharingState ) |
|
91 { |
|
92 CAknInformationNote* note = new (ELeave) |
|
93 CAknInformationNote; |
|
94 HBufC* noteText = CCoeEnv::Static()->AllocReadResourceLC( |
|
95 R_QTN_IUPNP_IAP_TURN_SHARING_OFF); |
|
96 note->ExecuteLD(*noteText); |
|
97 CleanupStack::PopAndDestroy(noteText); |
|
98 } |
|
99 else |
|
100 { |
|
101 // normal behaviour |
|
102 CAknTextSettingItem::EditItemL(aCalledFromMenu); |
|
103 } |
|
104 |
|
105 } |
|
106 |
|
107 |
|
108 // End of File |
|