|
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: ApplicationInfo is an abstract base class for API implementations, |
|
15 * which allows getting application related static information. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef APPLICATIONINFO_H |
|
21 #define APPLICATIONINFO_H |
|
22 |
|
23 #include "javaosheaders.h" |
|
24 #include "javauid.h" |
|
25 |
|
26 /** |
|
27 * Available in library: javautils |
|
28 * |
|
29 */ |
|
30 |
|
31 namespace java |
|
32 { |
|
33 |
|
34 namespace runtime |
|
35 { |
|
36 |
|
37 class ApplicationInfo |
|
38 { |
|
39 |
|
40 public: |
|
41 /** |
|
42 * The destructor |
|
43 */ |
|
44 OS_IMPORT virtual ~ApplicationInfo(); |
|
45 |
|
46 /** |
|
47 * Returns an instance of ApplicationInfo class which provides access to |
|
48 * application related static information. |
|
49 * <p> |
|
50 * Note! It is guaranteed that this service is available in MIDP |
|
51 * runtime. Other runtimes may not provide this service. |
|
52 * |
|
53 * @return the ApplicationInfo object, throws java::util::ExceptionBase |
|
54 * if the service is not avalable. |
|
55 */ |
|
56 OS_IMPORT static const ApplicationInfo& getInstance(); |
|
57 |
|
58 /** |
|
59 * Returns the root path of the application. The root path means an |
|
60 * application specific directory where the different API implementations |
|
61 * are able to write their files. No other applications are able to access |
|
62 * files under the root path. |
|
63 * <p> |
|
64 * API implemetations must not rely that the JAR file(s) or descriptor file |
|
65 * can always be found from the root path, even if they sometimes might be |
|
66 * found. |
|
67 * @return application root path as wstring |
|
68 */ |
|
69 virtual const std::wstring& getRootPath() const = 0; |
|
70 |
|
71 /** |
|
72 * Returns a unique application identifier. |
|
73 * |
|
74 * @return the Uid of the application. |
|
75 */ |
|
76 virtual const java::util::Uid& getUid() const = 0; |
|
77 |
|
78 |
|
79 protected: |
|
80 /** |
|
81 * The constructor. Only derived class is allowed to construct this class. |
|
82 */ |
|
83 OS_IMPORT ApplicationInfo(); |
|
84 |
|
85 private: // Methods |
|
86 /** |
|
87 * No copy constructor allowed. |
|
88 */ |
|
89 ApplicationInfo(const ApplicationInfo&); |
|
90 |
|
91 /** |
|
92 * No Assignment operator allowed. |
|
93 */ |
|
94 ApplicationInfo& operator= (const ApplicationInfo&); |
|
95 |
|
96 }; |
|
97 |
|
98 } // end namespace runtime |
|
99 } // end namespace java |
|
100 #endif // APPLICATIONINFO_H |
|
101 |