|
1 /* |
|
2 * Copyright (c) 2004 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: Connection UI event mapper |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CNUIEVENTMAPPER_H |
|
19 #define __CNUIEVENTMAPPER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <E32Base.h> |
|
23 #include <impspresenceconnectionuiconstsng.h> |
|
24 #include <PEngPresenceEngineConsts2.h> |
|
25 |
|
26 |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * CnUiEventMapper. |
|
31 * |
|
32 * Maps the Connection UI |
|
33 * presence events to PEC engine |
|
34 * presence events and vice versa. |
|
35 * |
|
36 * @since 2.1 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CnUiEventMapper ) |
|
39 { |
|
40 public: //conversion methods |
|
41 |
|
42 /** |
|
43 * Converts the given presence engine event to |
|
44 * Connection UI event enumeration. |
|
45 * |
|
46 * @since 2.1 |
|
47 * @param aPecEvent The PEC event enumeration to convert. |
|
48 * @param aAppEvent The Connection UI event corresponding |
|
49 * the PEC event. If PEC event is unknown, returns |
|
50 * EIMPSPresenceServiceUnknownEvent |
|
51 * @return ETrue if event given presence engine event is |
|
52 * known one. Else EFalse and EIMPSPresenceServiceUnknownEvent |
|
53 * event is returned. |
|
54 */ |
|
55 static TBool ConvertToAppEvent( TPEngNWSessionSlotEvent aPecEvent, |
|
56 TIMPSPresenceServiceEvent& aAppEvent ); |
|
57 |
|
58 |
|
59 /** |
|
60 * Converts the given Connection UI event to PEC event |
|
61 * enumeration. |
|
62 * |
|
63 * @since 2.1 |
|
64 * @param aAppEvent The Connection UI app event to convert. |
|
65 * @param aPecEvent The PEC event corresponding the |
|
66 * Connection UI event. |
|
67 * @return ETrue if given Connection UI event is |
|
68 * known one. Else EFalse. |
|
69 */ |
|
70 static TBool ConvertToPecEvent( TIMPSPresenceServiceEvent aAppEvent, |
|
71 TPEngNWSessionSlotEvent& aPecEvent ); |
|
72 |
|
73 |
|
74 /** |
|
75 * Adds all known PEC events to passed |
|
76 * array. |
|
77 * |
|
78 * @since 2.1 |
|
79 * @param aPecEvents The array where PEC |
|
80 * events are added. |
|
81 */ |
|
82 static void AddAllKnownPecEventsL( RArray< TPEngNWSessionSlotEvent >& aPecEvents ); |
|
83 |
|
84 |
|
85 private: //Prohibited constructor / destructor |
|
86 |
|
87 CnUiEventMapper(); |
|
88 ~CnUiEventMapper(); |
|
89 |
|
90 }; |
|
91 |
|
92 #endif //__CNUIEVENTMAPPER_H |
|
93 // End of File |
|
94 |
|
95 |