01: /*
02: *
03: *
04: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26:
27: package com.sun.midp.main;
28:
29: /**
30: * A listener interface for processing MIDlet proxy list changes and additions.
31: */
32: public interface MIDletProxyListListener {
33: /** Field ID for the midletState. */
34: static final int MIDLET_STATE = 1;
35:
36: /** Field ID for the wantsForegroundState. */
37: static final int WANTS_FOREGROUND = 2;
38:
39: /** Field ID for the alertWaiting. */
40: static final int ALERT_WAITING = 3;
41:
42: /** Field ID for the PREEMPTING_DISPLAY. */
43: static final int PREEMPTING_DISPLAY = 4;
44:
45: /** Field ID for the resources suspend notification. */
46: static final int RESOURCES_SUSPENDED = 5;
47:
48: /**
49: * Called when a MIDlet is added to the list.
50: *
51: * @param midlet The proxy of the MIDlet being added
52: */
53: void midletAdded(MIDletProxy midlet);
54:
55: /**
56: * Called when the state of a MIDlet in the list is updated.
57: *
58: * @param midlet The proxy of the MIDlet that was updated
59: * @param fieldId code for which field of the proxy was updated,
60: * see constants above
61: */
62: void midletUpdated(MIDletProxy midlet, int fieldId);
63:
64: /**
65: * Called when a MIDlet is removed from the list.
66: *
67: * @param midlet The proxy of the removed MIDlet
68: */
69: void midletRemoved(MIDletProxy midlet);
70:
71: /**
72: * Called when error occurred while starting a MIDlet object.
73: *
74: * @param externalAppId ID assigned by the external application manager
75: * @param suiteId Suite ID of the MIDlet
76: * @param className Class name of the MIDlet
77: * @param errorCode start error code
78: * @param errorDetails start error details
79: */
80: void midletStartError(int externalAppId, int suiteId,
81: String className, int errorCode, String errorDetails);
82: }
|