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: Vcc P&S property manager |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_VCCPSPROPERTY_H |
|
22 #define C_VCCPSPROPERTY_H |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <e32std.h> |
|
26 #include <e32property.h> |
|
27 |
|
28 #include <vccsubscribekeys.h> |
|
29 |
|
30 /** |
|
31 * CVccUiPsProperty manages the VCC P&S keys on the UI side: |
|
32 * |
|
33 * This class defines the VCC property keys used by the UI. |
|
34 * It provides access to read/write values. Keys can be deleted. |
|
35 * |
|
36 * Key KVccPropKeyHoRequest: |
|
37 * EVccNoRequestOngoing idle state |
|
38 * EVccManualStartCsToPsHoRequest manual HO PS->CS |
|
39 * EVccManualCancelCsToPsHoRequest manual HO CS->PS |
|
40 * EVccUndefinedRequest P&S key not available |
|
41 * |
|
42 * @code |
|
43 * CVccUiPsProperty* iVccPsp = CVccUiPsProperty::NewL(); |
|
44 * ... |
|
45 * iVccPsp.NotifySubscriberL(EVccManualStartCsToPsHoRequest); |
|
46 * ... |
|
47 * iVccPsp.NotifySubscriberL(EVccManualCancelCsToPsHoRequest); |
|
48 * ... |
|
49 * delete iVccPsp; |
|
50 * @endcode |
|
51 * |
|
52 * |
|
53 * @lib vccuipropertyhandler.lib |
|
54 * @since S60 v3.2 |
|
55 */ |
|
56 class CVccUiPsProperty : public CBase |
|
57 { |
|
58 public: |
|
59 |
|
60 /** |
|
61 * Two-phased constructor. |
|
62 * |
|
63 * Defines UI side VCC property keys if they are not available. |
|
64 */ |
|
65 IMPORT_C static CVccUiPsProperty* NewL(); |
|
66 |
|
67 /** |
|
68 * Destructor. |
|
69 * Note! Deletes Vcc UI side property keys |
|
70 */ |
|
71 IMPORT_C virtual ~CVccUiPsProperty(); |
|
72 |
|
73 /** |
|
74 * Update VCC property key KVccPropKeyHoRequest with the given value. |
|
75 * |
|
76 * @since S60 v3.2 |
|
77 * @param aValue The new value |
|
78 */ |
|
79 IMPORT_C void NotifySubscriberL( TVccHoRequest aValue ); |
|
80 |
|
81 /** |
|
82 * Gets the current value of the Vcc property key KVccPropKeyHoRequest. |
|
83 * |
|
84 * @since S60 v3.2 |
|
85 * @param aValue The value of the key |
|
86 * @return KErrNone / KErrPermissionDenied/ KErrNotFound/KErrArgument |
|
87 */ |
|
88 IMPORT_C TInt GetCurrentRequest( TVccHoRequest& aValue ); |
|
89 |
|
90 /** |
|
91 * Deletes keys used by UI |
|
92 */ |
|
93 IMPORT_C TInt DeleteKeys(); |
|
94 |
|
95 private: |
|
96 /** |
|
97 * C++ Constructor |
|
98 */ |
|
99 CVccUiPsProperty(); |
|
100 |
|
101 /** |
|
102 * Symbian 2nd phase Constructor |
|
103 */ |
|
104 void ConstructL(); |
|
105 |
|
106 /** |
|
107 * Defines keys used by UI |
|
108 */ |
|
109 void DefineKeysL(); |
|
110 |
|
111 /** |
|
112 * creates handles to property keys used by UI |
|
113 */ |
|
114 void CreateHandlesL(); |
|
115 |
|
116 private: //data |
|
117 |
|
118 /** |
|
119 * Handle to property which is updated by the UI |
|
120 * Own |
|
121 */ |
|
122 RProperty iHoRequestKey; |
|
123 }; |
|
124 |
|
125 #endif /*C_VCCPSPROPERTY_H*/ |
|