|
1 /* |
|
2 * Copyright (c) 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: InstallOperation provides a way to launch and communicate |
|
15 * with Java Installer process |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef INSTALLOPERATION_H |
|
21 #define INSTALLOPERATION_H |
|
22 |
|
23 #include "javaosheaders.h" |
|
24 #include "commslistener.h" |
|
25 #include "commsserverendpoint.h" |
|
26 using namespace java::comms; |
|
27 |
|
28 namespace java |
|
29 { |
|
30 |
|
31 namespace debug |
|
32 { |
|
33 |
|
34 // Message ids and operations used in communication with Java Installer |
|
35 const int GET_NEXT_OPERATION_MESSAGE_ID = 500; |
|
36 const int OPERATION_MESSAGE_ID = 501; |
|
37 const int OPERATION_RESULT_MESSAGE_ID = 502; |
|
38 |
|
39 const int INSTALL_OPERATION = 0; |
|
40 const int UNINSTALL_OPERATION = 1; |
|
41 const int EXIT_OPERATION = 2; |
|
42 |
|
43 OS_NONSHARABLE_CLASS(InstallOperation) : public CommsListener |
|
44 { |
|
45 protected: |
|
46 InstallOperation(); |
|
47 |
|
48 public: |
|
49 virtual ~InstallOperation(); |
|
50 virtual void processMessage(CommsMessage& aMessage); |
|
51 |
|
52 protected: |
|
53 virtual int runJavaInstaller(); |
|
54 |
|
55 virtual CommsMessage getNextOperation(); |
|
56 virtual void handleOperationResult(CommsMessage& aMessage); |
|
57 |
|
58 virtual int startJavaInstaller(); |
|
59 virtual void sendToJavaInstaller(CommsMessage& aMessage); |
|
60 |
|
61 private: |
|
62 CommsServerEndpoint mInstaller; |
|
63 }; |
|
64 |
|
65 } // end namespace debug |
|
66 } // end namespace java |
|
67 |
|
68 |
|
69 #endif // INSTALLOPERATION_H |