92 * |
92 * |
93 * @param aCommPlugin plug-in name to use for communication |
93 * @param aCommPlugin plug-in name to use for communication |
94 * @param aMaxMsgSize maximum size for an incoming message |
94 * @param aMaxMsgSize maximum size for an incoming message |
95 * @param aMaxQueueMemorySize maximum size of all messages in the |
95 * @param aMaxQueueMemorySize maximum size of all messages in the |
96 * incoming queue |
96 * incoming queue |
|
97 * @param aReconnectDelay seconds of delay for reconnecting when connection |
|
98 * lost. Value 0 means that reconnect would not happen. |
97 * @param aShowConsole whether to open a console window for HTI |
99 * @param aShowConsole whether to open a console window for HTI |
98 * @param aShowErrorDialogs whether to show a dialog in case of critical |
100 * @param aShowErrorDialogs whether to show a dialog in case of critical |
99 * error or just silently exit |
101 * error or just silently exit |
100 * @return pointer to the created CHtiDispatcher instance |
102 * @return pointer to the created CHtiDispatcher instance |
101 */ |
103 */ |
102 static CHtiDispatcher* NewL( const TDesC8& aCommPlugin, |
104 static CHtiDispatcher* NewL( const TDesC8& aCommPlugin, |
103 TInt aMaxMsgSize, |
105 TInt aMaxMsgSize, |
104 TInt aMaxQueueMemorySize, |
106 TInt aMaxQueueMemorySize, |
|
107 TInt aReconnectDelay, |
105 TBool aShowConsole, |
108 TBool aShowConsole, |
106 TBool aShowErrorDialogs ); |
109 TBool aShowErrorDialogs ); |
107 |
110 |
108 /** |
111 /** |
109 * Creates dispatcher and puts the created isntance to the cleanup stack. |
112 * Creates dispatcher and puts the created isntance to the cleanup stack. |
111 * |
114 * |
112 * @param aCommPlugin plug-in name to use for communication |
115 * @param aCommPlugin plug-in name to use for communication |
113 * @param aMaxMsgSize maximum size for an incoming message |
116 * @param aMaxMsgSize maximum size for an incoming message |
114 * @param aMaxQueueMemorySize maximum size of all messages in the |
117 * @param aMaxQueueMemorySize maximum size of all messages in the |
115 * incoming queue |
118 * incoming queue |
|
119 * @param aReconnectDelay seconds of delay for reconnecting when connection |
|
120 * lost. Value 0 means that reconnect would not happen. |
116 * @param aShowConsole whether to open a console window for HTI |
121 * @param aShowConsole whether to open a console window for HTI |
117 * @param aShowErrorDialogs whether to show a dialog in case of critical |
122 * @param aShowErrorDialogs whether to show a dialog in case of critical |
118 * error or just silently exit |
123 * error or just silently exit |
119 * @return pointer to the created CHtiDispatcher instance |
124 * @return pointer to the created CHtiDispatcher instance |
120 */ |
125 */ |
121 static CHtiDispatcher* NewLC( const TDesC8& aCommPlugin, |
126 static CHtiDispatcher* NewLC( const TDesC8& aCommPlugin, |
122 TInt aMaxMsgSize, |
127 TInt aMaxMsgSize, |
123 TInt aMaxQueueMemorySize, |
128 TInt aMaxQueueMemorySize, |
|
129 TInt aReconnectDelay, |
124 TBool aShowConsole, |
130 TBool aShowConsole, |
125 TBool aShowErrorDialogs ); |
131 TBool aShowErrorDialogs ); |
126 |
132 |
127 /** |
133 /** |
128 * Destructor. Frees the allocated resources. |
134 * Destructor. Frees the allocated resources. |
205 * Query the ShowErrorDialogs configuration value. |
211 * Query the ShowErrorDialogs configuration value. |
206 * @return iShowErrorDialogs value |
212 * @return iShowErrorDialogs value |
207 */ |
213 */ |
208 TBool GetShowErrorDialogs(); |
214 TBool GetShowErrorDialogs(); |
209 |
215 |
|
216 |
|
217 /* |
|
218 * Delay a period and reconnect when connection lost. |
|
219 * If the period is 0, reconnect would not happen. |
|
220 * @return whether reconnect |
|
221 */ |
|
222 TBool CommReconnect(); |
|
223 |
210 protected: |
224 protected: |
211 /** |
225 /** |
212 * Constructors |
226 * Constructors |
213 * |
227 * |
214 */ |
228 */ |
215 CHtiDispatcher( TInt aMaxQueueMemorySize, TBool aShowErrorDialogs ); |
229 CHtiDispatcher( TInt aMaxQueueMemorySize, TInt aReconnectDelay, TBool aShowErrorDialogs ); |
216 |
230 |
217 void ConstructL( const TDesC8& aCommPlugin, |
231 void ConstructL( const TDesC8& aCommPlugin, |
218 TInt aMaxMsgSize, |
232 TInt aMaxMsgSize, |
219 TBool aShowConsole ); |
233 TBool aShowConsole ); |
220 |
234 |