24
|
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 |
* Name : csatmessagerouterproxy.h
|
|
16 |
* Part of : Common TSY / commonsimatktsy
|
|
17 |
* Interface : Internal, Common TSY Plugin API
|
|
18 |
* Routes between Tsy objects and Message Handler objects
|
|
19 |
* Version : 1.0
|
|
20 |
*
|
|
21 |
*/
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
#ifndef CSATMESSAGEROUTERBASE_H
|
|
26 |
#define CSATMESSAGEROUTERBASE_H
|
|
27 |
|
|
28 |
|
|
29 |
// INCLUDES
|
|
30 |
#include <e32base.h>
|
|
31 |
#include "cmmmessagemanagerbase.h"
|
|
32 |
|
|
33 |
//#include "CMmMessageRouterBase.h"
|
|
34 |
|
|
35 |
#include <ctsy/pluginapi/mmmessagemanagercallback.h>
|
|
36 |
|
|
37 |
// FORWARD DECLARATIONS
|
|
38 |
class MMmMessHandlerBase;
|
|
39 |
class CSatDataPackage;
|
|
40 |
class CMmPhoneTsy;
|
|
41 |
class CMmMessageManager;
|
|
42 |
class CMmPhoNetSender;
|
|
43 |
class CMmPhoNetReceiver;
|
|
44 |
class CTsyDelegates;
|
|
45 |
|
|
46 |
/**
|
|
47 |
* Routes between Tsy objects and Message Handler objects
|
|
48 |
*
|
|
49 |
* @lib (CommonSimAtkTsy)
|
|
50 |
* @since 3.1
|
|
51 |
*/
|
|
52 |
class CSatMessageRouterProxy : public CBase, public MmMessageManagerCallback
|
|
53 |
{
|
|
54 |
|
|
55 |
// public methods
|
|
56 |
public:
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Creates a new CSatMessageRouterBase object
|
|
60 |
* @param aMessageManager: Pointer to the message manager object
|
|
61 |
* @param aRouter: Pointer to the CommonTsy routerbase object
|
|
62 |
* @return reference to created CSatMessageRouterBase type of object
|
|
63 |
*/
|
|
64 |
static CSatMessageRouterProxy* NewL(
|
|
65 |
CTsyDelegates& aTsyDelegates );
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Destructor
|
|
69 |
*/
|
|
70 |
virtual ~CSatMessageRouterProxy( void );
|
|
71 |
|
|
72 |
protected:
|
|
73 |
|
|
74 |
/**
|
|
75 |
* C++ Default constructor
|
|
76 |
* @param aRouter: Pointer to the CommonTsy routerbase object
|
|
77 |
*/
|
|
78 |
CSatMessageRouterProxy(CTsyDelegates& aTsyDelegates );
|
|
79 |
|
|
80 |
private: // Constructors
|
|
81 |
|
|
82 |
/**
|
|
83 |
* Class attributes are created in ConstructL
|
|
84 |
*/
|
|
85 |
void ConstructL( void );
|
|
86 |
|
|
87 |
public:
|
|
88 |
|
|
89 |
/**
|
|
90 |
* Returns pointer to the message handler for this
|
|
91 |
* request, based on IPC number
|
|
92 |
* @param aIpc: Request IPC
|
|
93 |
* @return Message handler objact
|
|
94 |
*/
|
|
95 |
virtual MMmMessHandlerBase* RouteRequest( TInt /*aIpc*/ );
|
|
96 |
|
|
97 |
/**
|
|
98 |
* Completes a request or notification via the specific Tsy object,
|
|
99 |
* based on IPC number and data package
|
|
100 |
* @param aIpc: Request IPC number
|
|
101 |
* @param aDataPackage: The data needed for the request
|
|
102 |
* @param aResult: Possible error value
|
|
103 |
*/
|
|
104 |
virtual void RouteCompletion( TInt aIpc,
|
|
105 |
CSatDataPackage* aDataPackage, TInt aResult );
|
|
106 |
|
|
107 |
/**
|
|
108 |
* Completes requests from LTSY
|
|
109 |
*
|
|
110 |
*
|
|
111 |
* @param aIpc Ipc of request
|
|
112 |
* @param aDataPackage Data from LTSY
|
|
113 |
* @param aResult Result value
|
|
114 |
*/
|
|
115 |
void Complete( TInt aIpc, CMmDataPackage* aData, TInt aResult );
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Completes requests from LTSY
|
|
119 |
*
|
|
120 |
*
|
|
121 |
* @param aIpc Ipc of request
|
|
122 |
* @param aResult Result value
|
|
123 |
*/
|
|
124 |
void Complete( TInt aIpc, TInt aResult );
|
|
125 |
|
|
126 |
|
|
127 |
// private methods
|
|
128 |
private:
|
|
129 |
|
|
130 |
/**
|
|
131 |
* Returns the pointer to the Tsy object needed for completion, based
|
|
132 |
* on the IPC number and the data package
|
|
133 |
* @param aIpc: Request IPC number
|
|
134 |
* @param aDataPackage: Data package
|
|
135 |
* @return Tsy object
|
|
136 |
*/
|
|
137 |
CBase* GetObjectForCompletion( const TInt aIpc,
|
|
138 |
CSatDataPackage* aDataPackage );
|
|
139 |
|
|
140 |
/**
|
|
141 |
* Returns the type of Tsy object needed for completion, based
|
|
142 |
* on the IPC number
|
|
143 |
* @param aIpc: Request IPC
|
|
144 |
* @return Type of object
|
|
145 |
*/
|
|
146 |
CMmMessageManagerBase::TTsyObjects GetTsyObjectFromIpc(
|
|
147 |
const TInt aIpc ) const;
|
|
148 |
|
|
149 |
/**
|
|
150 |
* Completes a request or notification via the specific Tsy object,
|
|
151 |
* based on IPC number and data package
|
|
152 |
* @param aIpc: Request IPC number
|
|
153 |
* @param aDataPackage: The data needed for the request
|
|
154 |
* @param aResult
|
|
155 |
*/
|
|
156 |
void RouteCompletionL( TInt aIpc, CSatDataPackage* aDataPackage,
|
|
157 |
TInt aResult );
|
|
158 |
|
|
159 |
private: // Data unowned
|
|
160 |
|
|
161 |
CTsyDelegates& iTsyDelegates;
|
|
162 |
|
|
163 |
};
|
|
164 |
|
|
165 |
|
|
166 |
#endif // CSatMessageRouterBase_H
|
|
167 |
|
|
168 |
// End of file
|