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: Java environment information utilities |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef JAVAENVINFO_H |
|
19 #define JAVAENVINFO_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32cmn.h> |
|
23 |
|
24 // CLASS DECLARATION |
|
25 |
|
26 namespace Java |
|
27 { |
|
28 /** |
|
29 * Class provides information about Java environment version. |
|
30 * |
|
31 * @lib javaenvinfo.lib |
|
32 * @since S60 5.1 |
|
33 */ |
|
34 NONSHARABLE_CLASS(JavaEnvInfo) |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Returns the Java environment version |
|
40 * |
|
41 * @since S60 5.1 |
|
42 * @return TVersion instance representing the Java environment version |
|
43 */ |
|
44 IMPORT_C static TVersion Version(); |
|
45 |
|
46 /** |
|
47 * Returns the part of the user agent header describing the Java environment. |
|
48 * This string can be used by Browser or any other HTTP client when sending |
|
49 * HTTP requests to describe the supported Java environment. |
|
50 * |
|
51 * The returned string could be for example |
|
52 * "Configuration/CLDC-1.1 Profile/MIDP-2.1". |
|
53 * |
|
54 * @since S60 5.1 |
|
55 * @return User Agent header string. Caller is responsible for deleting |
|
56 * this when done with it. |
|
57 */ |
|
58 IMPORT_C static HBufC* GetUserAgentHeaderL(); |
|
59 |
|
60 /** |
|
61 * Returns the Java configuration and profile information in human |
|
62 * readable format. |
|
63 * |
|
64 * The used format is <profile> ", " <configuration> - as an example |
|
65 * "MIDP 2.1, CLDC 1.1". |
|
66 * |
|
67 * @since S60 5.1 |
|
68 * @return String in the format. Caller is responsible for deleting |
|
69 * this when done with it. |
|
70 */ |
|
71 IMPORT_C static HBufC* GetPlatformInfoL(); |
|
72 private: |
|
73 |
|
74 static TVersion JavaEnvInfo::GetJavaVersionL(); |
|
75 }; |
|
76 |
|
77 } |
|
78 |
|
79 #endif //JAVAENVINFO_H |
|