|
1 /* |
|
2 * Copyright (c) 2006-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 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CMMMESSAGEROUTERPROXY_H |
|
21 #define CMMMESSAGEROUTERPROXY_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <ctsy/pluginapi/mmmessagemanagercallback.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MMmMessHandlerBase; |
|
28 class CTsyDelegates; |
|
29 class CMmPhoneTsy; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Routes between Tsy objects and Message Handler objects |
|
35 */ |
|
36 class CMmMessageRouterProxy : public CBase, public MmMessageManagerCallback |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Creates a new CMmMessageRouterProxy object |
|
42 * |
|
43 * |
|
44 * @param aTsyDelegates reference to TsyDelegates |
|
45 * @return Pointer to CMmMessageRouterProxy object |
|
46 */ |
|
47 static CMmMessageRouterProxy* NewL( |
|
48 CTsyDelegates& aTsyDelegates ); |
|
49 |
|
50 /** |
|
51 * Destructor |
|
52 */ |
|
53 ~CMmMessageRouterProxy(); |
|
54 |
|
55 /** |
|
56 * Creates and initialises class attributes |
|
57 */ |
|
58 void ConstructL(); |
|
59 |
|
60 public: |
|
61 |
|
62 /** |
|
63 * Returns pointer to the message handler for this |
|
64 * request, based on IPC number |
|
65 * |
|
66 * @param aIpc Ipc of request |
|
67 * @return pointer to MMmMessHandlerBase |
|
68 */ |
|
69 MMmMessHandlerBase* RouteRequest( TInt aIpc ); |
|
70 |
|
71 /** |
|
72 * Completes a request or notification via the specific Tsy object, |
|
73 * based on IPC number and data package |
|
74 * |
|
75 * |
|
76 * @param aIpc Ipc of request |
|
77 * @param aDataPackage Data package |
|
78 * @param aResult Result value |
|
79 */ |
|
80 void RouteCompletion( TInt aIpc, |
|
81 CMmDataPackage* aDataPackage, TInt aResult ); |
|
82 |
|
83 /** |
|
84 * Sets the pointer to PhoneTsy (Common TSY) |
|
85 * |
|
86 * |
|
87 * @param aMmPhone Pointer to PhoneTsy |
|
88 */ |
|
89 void SetPhoneTsy( CMmPhoneTsy* aMmPhone ); |
|
90 |
|
91 /** |
|
92 * Completes a request or notification via the specific Tsy object, |
|
93 * based on IPC number and data package |
|
94 * |
|
95 * |
|
96 * @param aIpc Ipc of request |
|
97 * @param aDataPackage Data package |
|
98 */ |
|
99 void RouteCompletionL( TInt aIpc, |
|
100 CMmDataPackage* aDataPackage, TInt aResult ); |
|
101 |
|
102 /** |
|
103 * Completes requests from LTSY |
|
104 * |
|
105 * |
|
106 * @param aIpc Ipc of request |
|
107 * @param aDataPackage Data from LTSY |
|
108 * @param aResult Result value |
|
109 */ |
|
110 void Complete( TInt aIpc, CMmDataPackage* aData, TInt aResult ); |
|
111 |
|
112 /** |
|
113 * Completes requests from LTSY |
|
114 * |
|
115 * |
|
116 * @param aIpc Ipc of request |
|
117 * @param aResult Result value |
|
118 */ |
|
119 void Complete( TInt aIpc, TInt aResult ); |
|
120 |
|
121 private: |
|
122 |
|
123 /** |
|
124 * C++ default constructor. |
|
125 */ |
|
126 CMmMessageRouterProxy(); |
|
127 |
|
128 protected: // Data |
|
129 |
|
130 /** |
|
131 * Pointer to Tsy delegates |
|
132 */ |
|
133 CTsyDelegates* iTsyDelegates; |
|
134 |
|
135 /** |
|
136 * pointer to Phone Tsy |
|
137 */ |
|
138 CMmPhoneTsy* iMmPhone; |
|
139 |
|
140 }; |
|
141 |
|
142 |
|
143 #endif // CMMMESSAGEROUTERPROXY_H |
|
144 |
|
145 // End of file |