|
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 _CMMSUBTSYBASE_H |
|
21 #define _CMMSUBTSYBASE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <et_tsy.h> |
|
26 #include <et_phone.h> |
|
27 #include "MmTsy_timeoutdefs.h" |
|
28 |
|
29 /** CLASS DECLARATION */ |
|
30 |
|
31 /** |
|
32 * CMmSubTsyBase is a base class for TSY's subsystems. |
|
33 */ |
|
34 class CMmSubTsyBase : public CBase |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * Destructor. |
|
40 */ |
|
41 virtual ~CMmSubTsyBase() |
|
42 { |
|
43 return; |
|
44 }; |
|
45 |
|
46 /** |
|
47 * Initialisation method |
|
48 */ |
|
49 virtual void Init() = 0; |
|
50 |
|
51 /** |
|
52 * Tells whether the object supports given IPC. |
|
53 * |
|
54 * |
|
55 * @param anIpc an interprocess communication command identifier |
|
56 * return TBool: ETrue if object support given IPC |
|
57 */ |
|
58 virtual TBool SupportingIPC( const TInt anIpc ) = 0; |
|
59 |
|
60 /** |
|
61 * Handles extended client requests. Uses TRAP to ensure functioning on |
|
62 * memory allocation failure. |
|
63 * |
|
64 * |
|
65 * @param aTsyReqHandle Request handle |
|
66 * @param anIpc an interprocess communication command identifier |
|
67 * @param aPackage reference to a data package |
|
68 * @return KErrNone if request accepted, else several possibilities |
|
69 * depending on IPC |
|
70 */ |
|
71 virtual TInt DoExtFuncL( const TTsyReqHandle aTsyReqHandle, |
|
72 const TInt anIpc, |
|
73 const TDataPackage& aPackage) = 0; |
|
74 |
|
75 /** |
|
76 * Returns request mode for given IPC number. |
|
77 * |
|
78 * |
|
79 * @param anIpc an interprocess communication command identifier |
|
80 * @return The ReqMode corresponding to given IPC |
|
81 */ |
|
82 virtual CTelObject::TReqMode ReqModeL( const TInt anIpc ) = 0; |
|
83 |
|
84 /** |
|
85 * Returns number of slots to be used for given IPC. |
|
86 * |
|
87 * |
|
88 * @param anIpc an interprocess communication command identifier |
|
89 * @return the number of slots reserved for a given IPC |
|
90 */ |
|
91 virtual TInt NumberOfSlotsL( const TInt anIpc ) = 0; |
|
92 |
|
93 /** |
|
94 * Cancels request of which IPC number and request handle are given in |
|
95 * parameters. |
|
96 * |
|
97 * |
|
98 * @param anIpc an interprocess communication command identifier |
|
99 * @param aTsyReqHandle Request handle |
|
100 * @return KErrNone, KErrGeneral if unknown IPC |
|
101 */ |
|
102 virtual TInt CancelService( const TInt anIpc, |
|
103 const TTsyReqHandle aTsyReqHandle ) = 0; |
|
104 |
|
105 /** |
|
106 * Register given notification. |
|
107 * |
|
108 * |
|
109 * @param anIpc an interprocess communication command identifier |
|
110 * @return KErrNotSupported |
|
111 */ |
|
112 virtual TInt RegisterNotification( const TInt anIpc ) = 0; |
|
113 |
|
114 /** |
|
115 * Deregister given notification. |
|
116 * |
|
117 * |
|
118 * @param anIpc an interprocess communication command identifier |
|
119 * @return KErrNotSupported |
|
120 */ |
|
121 virtual TInt DeregisterNotification( const TInt anIpc ) = 0; |
|
122 |
|
123 #ifdef REQHANDLE_TIMER |
|
124 |
|
125 /** |
|
126 * Calls the needed complete method due timer expiration |
|
127 * |
|
128 * |
|
129 * @param aReqHandleType req handle type. |
|
130 * @param TInt aError error value |
|
131 */ |
|
132 virtual void Complete( TInt, //aReqHandleType |
|
133 TInt ) //aError |
|
134 { |
|
135 return; |
|
136 } |
|
137 |
|
138 #endif //REHANDLE_TIMER |
|
139 |
|
140 protected: |
|
141 |
|
142 /** |
|
143 * C++ default constructor. |
|
144 */ |
|
145 CMmSubTsyBase() |
|
146 { |
|
147 return; |
|
148 }; |
|
149 |
|
150 }; |
|
151 |
|
152 #endif // CMMSUBTSYBASE_H |
|
153 |
|
154 // End of File |