01: /*
02: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
04: *
05: * This program is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU General Public License version
07: * 2 only, as published by the Free Software Foundation.
08: *
09: * This program is distributed in the hope that it will be useful, but
10: * WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * General Public License version 2 for more details (a copy is
13: * included at /legal/license.txt).
14: *
15: * You should have received a copy of the GNU General Public License
16: * version 2 along with this work; if not, write to the Free Software
17: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18: * 02110-1301 USA
19: *
20: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
21: * Clara, CA 95054 or visit www.sun.com if you need additional
22: * information or have any questions.
23: */
24:
25: package com.sun.midp.jump.installer;
26:
27: import java.io.IOException;
28: import com.sun.jump.common.JUMPContent;
29:
30: /**
31: * Abstracts out the operation against the midlet repository class,
32: * <code>com.sun.midp.midletsuite.MIDletSuiteStorage</code>,
33: * needed from the jump code.
34: **/
35:
36: public interface StorageAccessInterface {
37:
38: /**
39: * Gets the list of midlet suite IDs installed in the repository
40: * currently.
41: *
42: * @return The list of installed midlet suites.
43: */
44: public int[] getInstalledMIDletSuiteIds();
45:
46: /**
47: * Takes the midlet suite ID and converts it to the
48: * <code>JUMPContent</code> instances, where each midlet in the suite is
49: * a separate <code>JUMPContent</code>.
50: *
51: * @param The midlet suite id
52: * @return The list of <code>JUMPContent</code>, a zero length array if
53: * the midlet suite is not in the repository.
54: */
55: public JUMPContent[] convertToMIDletApplications(int suiteId);
56:
57: /**
58: * Removes the midlet suite from the repository. Does nothing
59: * if the midlet suite is not installed.
60: *
61: * @param The midlet suite id to delete.
62: */
63: public void remove(int suiteId);
64: }
|