1 /* 2 * To change this template, choose Tools | Templates 3 * and open the template in the editor. 4 */ 5 package net.sf.atmodem4j.core; 6 7 /* 8 * #%L 9 * ATModem4J Core 10 * %% 11 * Copyright (C) 2009 - 2014 atmodem4j 12 * %% 13 * atmodem4j - Drivers for the AT modem - http://atmodem4j.sourceforge.net/ 14 * Copyright (C) 2009-2014, atmodem4j.sf.net, and individual contributors as indicated 15 * by the @authors tag. See the copyright.txt in the distribution for a 16 * full listing of individual contributors. 17 * 18 * This is free software; you can redistribute it and/or modify it 19 * under the terms of the GNU General Public License as 20 * published by the Free Software Foundation; either version 3 of 21 * the License, or (at your option) any later version. 22 * 23 * This software is distributed in the hope that it will be useful, 24 * but WITHOUT ANY WARRANTY; without even the implied warranty of 25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 26 * Lesser General Public License for more details. 27 * 28 * You should have received a copy of the GNU Lesser General Public 29 * License along with this software; if not, write to the Free 30 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 31 * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 32 * #L% 33 */ 34 35 import java.io.InputStream; 36 import java.io.OutputStream; 37 38 /** 39 * 40 * @author aploese 41 */ 42 public interface Connection { 43 44 public Modem getModem(); 45 46 InputStream getInputStream(); 47 48 OutputStream getOutputStream(); 49 50 void disconnect(); 51 52 void exitDataMode(); 53 54 void reenterDataMode(); 55 56 boolean isConnected(); 57 58 boolean isOnlineDataMode(); 59 60 boolean isOnlineCommandMode(); 61 }