1 /* |
|
2 * Copyright (c) 2006 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 package com.nokia.mj.impl.runtime.rtport; |
|
20 |
|
21 /** |
|
22 * Interface for getting runtime information. |
|
23 * |
|
24 * @see RuntimeInfoFactory |
|
25 */ |
|
26 public interface RuntimeInfo |
|
27 { |
|
28 /** |
|
29 * Defined constant for manufacturer domain |
|
30 */ |
|
31 final String MANUFACTURER_DOMAIN = "MFD"; |
|
32 |
|
33 /** |
|
34 * Defined constant for identified third party domain |
|
35 */ |
|
36 final String IDENTIFIED_THIRD_PARTY_DOMAIN = "ITPD"; |
|
37 /** |
|
38 * Defined constant for operator domain |
|
39 */ |
|
40 final String OPERATOR_DOMAIN = "OPD"; |
|
41 |
|
42 /** |
|
43 * Defined constant for unidentified third party domain |
|
44 */ |
|
45 final String UNIDENTIFIED_THIRD_PARTY_DOMAIN = "UTPD"; |
|
46 |
|
47 /** |
|
48 * Gets the UI toolkit register for this runtime environment |
|
49 */ |
|
50 public UiToolkitRegister getUiToolkitRegister(); |
|
51 |
|
52 /** |
|
53 * Returns object representing current application of the caller. The |
|
54 * meaning of "current application" is specific to the runtime used |
|
55 * (e.g. MIDlets, OSGi). |
|
56 * |
|
57 * The object has correct hashCode and equals method implementations to |
|
58 * support usage as Hashtable key. The Id returned for different |
|
59 * applications is unique within the same JVM process. |
|
60 * |
|
61 * The caller should not keep reference to the value after the application |
|
62 * has been closed. |
|
63 * |
|
64 * @return Object representing current application |
|
65 */ |
|
66 public Object getApplicationId(); |
|
67 |
|
68 /** |
|
69 * Returns the UID of the caller, or -1 if no UID is associated. |
|
70 * |
|
71 * @return UID of the caller, or -1 if no UID is associated |
|
72 */ |
|
73 public int getApplicationUid(); |
|
74 |
|
75 /** |
|
76 * Returns protection domain of current application as String. |
|
77 * |
|
78 * Currently there are four defined domains |
|
79 * |
|
80 * @see #MANUFACTURER_DOMAIN |
|
81 * @see #IDENTIFIED_THIRD_PARTY_DOMAIN |
|
82 * @see #OPERATOR_DOMAIN |
|
83 * @see #UNIDENTIFIED_THIRD_PARTY_DOMAIN |
|
84 * |
|
85 * @return protection domain as String |
|
86 */ |
|
87 public String getApplicationDomain(); |
|
88 |
|
89 /** |
|
90 * Notifies the runtime that exit command has been received. |
|
91 * It is runtime's responsibility to ensure that the application |
|
92 * exits surely. |
|
93 * |
|
94 * @param aUid UID of the application to be closed. |
|
95 */ |
|
96 public void notifyExitCmd(int aUid); |
|
97 |
|
98 } |
|