|
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: Internally used panic functions and test macros |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __LOCKAPPUTILS_H__ |
|
20 #define __LOCKAPPUTILS_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include "lockapp.hrh" |
|
24 #include "lockapptrace.h" |
|
25 #include <w32std.h> |
|
26 |
|
27 /** |
|
28 * Queries bits in aStatusMask specified by the aQueryMask |
|
29 */ |
|
30 TBool IsBitFieldSet( TUint aStatusMask, TUint aQueryMask ); |
|
31 |
|
32 /** |
|
33 * Sets bits in aResultMask specified by the aSetMask |
|
34 */ |
|
35 void SetBitField( TUint &aResultMask, TUint aSetMask, TBool aSet ); |
|
36 |
|
37 /** |
|
38 * Panic the LockApp (should only be used in debug) |
|
39 * |
|
40 * @param aPanic Identifies the reason to Panic |
|
41 */ |
|
42 void DoPanic( TLockAppPanic aPanic ); |
|
43 |
|
44 /** |
|
45 * Panic LockAppServer client for sending |
|
46 * illegal message |
|
47 * |
|
48 * @param aMessage Event id |
|
49 * @param aPanic Identifies the reason to Panic |
|
50 */ |
|
51 void PanicClient( const RMessagePtr2& aMessage, TLockAppPanic aPanic ); |
|
52 |
|
53 /** |
|
54 * Sends application spesific events to Sysap. |
|
55 * Used mainly for lights control. |
|
56 * |
|
57 * @param aMessage Event id |
|
58 */ |
|
59 void SendMessageToSysAp(TInt aMessage); |
|
60 |
|
61 /** |
|
62 * Sends a key event to the windowgroup in background. |
|
63 * Used mainly for sending red and green keys to phone app when |
|
64 * devicelock or keyguard is in foreground. |
|
65 * |
|
66 * @param aKey key event |
|
67 * @param aType key event type |
|
68 */ |
|
69 void SendKeyToPhoneApp(const TKeyEvent& aKey, TEventCode aType); |
|
70 |
|
71 #endif // __LOCKAPPTILS_H__ |
|
72 |