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: IpcServer is the server side implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef IPCSERVER_H |
|
19 #define IPCSERVER_H |
|
20 |
|
21 #include "scopedlocks.h" |
|
22 |
|
23 #include "transport.h" |
|
24 |
|
25 namespace java |
|
26 { |
|
27 namespace comms |
|
28 { |
|
29 |
|
30 class CCommsServer; |
|
31 |
|
32 NONSHARABLE_CLASS(IpcServer) : public CActive, public IpcServerConnectionInterface |
|
33 { |
|
34 public: |
|
35 IpcServer(IpcListener* aListener); |
|
36 ~IpcServer(); |
|
37 |
|
38 // IpcIpcServerConnectionInterface methods |
|
39 virtual int start(int aAddr); |
|
40 virtual void stop(); |
|
41 virtual int send(ipcMessage_t* aMsg); |
|
42 |
|
43 private: |
|
44 virtual void RunL(); |
|
45 virtual void DoCancel(); |
|
46 virtual TInt RunError(TInt aError); |
|
47 |
|
48 static void messageLoop(TAny* aArgs); |
|
49 void doMainL(); |
|
50 |
|
51 RThread mThread; |
|
52 bool mRunning; |
|
53 CCommsServer* mServer; |
|
54 int mAddress; |
|
55 |
|
56 java::util::ScopedMutex mMutex; |
|
57 IpcListener* mListener; |
|
58 }; |
|
59 |
|
60 } // namespace comms |
|
61 } // namespace java |
|
62 |
|
63 #endif // IPCSERVER_H |