1 /*
2 * Created on 31-Mar-2005
3 *
4 */
5 package ubc.midp.mobilephoto.core.comms;
6
7 import java.io.IOException;
8 import java.io.InterruptedIOException;
9
10 import javax.wireless.messaging.MessageConnection; 11
12 /**
13 * @author tyoung
14 * This is the abstract base messaging class. (At the moment, no messaging classes are implemented)
15 * It is used for communication between the device and a network. Generally to upload or
16 * download data such as photos to the application. Currently, the prototype just loads data
17 * from the jar file directly.
18 * Specific messaging classes that use different protocols should implement this class
19 * (ie. SMS messaging, HTTP messaging, Infrared, Bluetooth etc.)
20 */
21 public abstract class BaseMessaging {
22
23 public abstract boolean sendImage(byte[] imageData);
24 public abstract byte[] receiveImage() throws InterruptedIOException, IOException;
25 public abstract void cleanUpConnections(MessageConnection conn);
26
27
28 /**
29 * @return Returns the listenPort.
30 */
31 /* public String getListenPort() {
32 return listenPort;
33 }
34
35 /**
36 * @param listenPort The listenPort to set.
37 *
38 public void setListenPort(String listenPort) {
39 this.listenPort = listenPort;
40 }
41 */
42 }
|