equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2008 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: CReceiver enables asynchronous communication with server side |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CRECEIVER_H |
|
19 #define CRECEIVER_H |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 namespace java |
|
24 { |
|
25 namespace comms |
|
26 { |
|
27 |
|
28 class RComms; |
|
29 class IpcListener; |
|
30 class IpcClient; |
|
31 |
|
32 NONSHARABLE_CLASS(CReceiver): public CActive |
|
33 { |
|
34 public: |
|
35 CReceiver(IpcClient& aParent, IpcListener& aListener, RComms& aSession); |
|
36 ~CReceiver(); |
|
37 void Receive(); |
|
38 |
|
39 private: |
|
40 virtual void RunL(); |
|
41 virtual void DoCancel(); |
|
42 virtual TInt RunError(TInt aError); |
|
43 |
|
44 IpcClient& mParent; |
|
45 IpcListener& mListener; |
|
46 RComms& mSession; |
|
47 RBuf8 mBuffer; |
|
48 TPckgBuf<TInt> mRequiredLength; |
|
49 }; |
|
50 |
|
51 } // namespace comms |
|
52 } // namespace java |
|
53 |
|
54 #endif // CRECEIVER_H |