|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * Declaration of CSsmWaitPsKey class. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef SSMWAITPSKEY_H |
|
20 #define SSMWAITPSKEY_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <ssm/ssmcustomcommand.h> |
|
24 |
|
25 |
|
26 class CSsmPsKeyObserver; |
|
27 |
|
28 /** |
|
29 * Waits for a P&S key. |
|
30 */ |
|
31 NONSHARABLE_CLASS( CSsmWaitPsKey ) : public CBase, |
|
32 public MSsmCustomCommand |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Wait PS key type. Defines whether to wait for a specific value |
|
39 * or a value in a range. |
|
40 */ |
|
41 |
|
42 enum TSsmWaitPsKeyType |
|
43 { |
|
44 ESsmWaitPsExactValue = 1, |
|
45 ESsmWaitPsRange |
|
46 }; |
|
47 |
|
48 /** |
|
49 * Two-phased constructor |
|
50 */ |
|
51 static CSsmWaitPsKey* NewL( TSsmWaitPsKeyType aPsKeyWaitType ); |
|
52 |
|
53 /** |
|
54 * Destructor |
|
55 */ |
|
56 virtual ~CSsmWaitPsKey(); |
|
57 |
|
58 private: // From MSsmCustomCommand |
|
59 |
|
60 /** |
|
61 * @see MSsmCustomCommand |
|
62 */ |
|
63 TInt Initialize( CSsmCustomCommandEnv* aCmdEnv ); |
|
64 |
|
65 /** |
|
66 * @see MSsmCustomCommand |
|
67 */ |
|
68 void Execute( const TDesC8& aParams, TRequestStatus& aRequest ); |
|
69 |
|
70 /** |
|
71 * @see MSsmCustomCommand |
|
72 */ |
|
73 void ExecuteCancel(); |
|
74 |
|
75 /** |
|
76 * @see MSsmCustomCommand |
|
77 */ |
|
78 void Close(); |
|
79 |
|
80 /** |
|
81 * @see MSsmCustomCommand |
|
82 */ |
|
83 void Release(); |
|
84 |
|
85 private: |
|
86 |
|
87 CSsmWaitPsKey( TSsmWaitPsKeyType aPsKeyWaitType ); |
|
88 |
|
89 CSsmPsKeyObserver* ExtractParamsL( const TDesC8& aParams ); |
|
90 |
|
91 |
|
92 private: // data |
|
93 |
|
94 // P&S key observer instance, owned. |
|
95 CSsmPsKeyObserver* iPsObserver; |
|
96 |
|
97 TSsmWaitPsKeyType iWaitType; |
|
98 |
|
99 }; |
|
100 |
|
101 #endif // SSMWAITPSKEY_H |