ObexSession.java revision 9439a7fe517b858bc5e5c654b459315e4722feb2
19439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly/* 29439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * Copyright (c) 2008-2009, Motorola, Inc. 39439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * 49439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * All rights reserved. 59439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * 69439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * Redistribution and use in source and binary forms, with or without 79439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * modification, are permitted provided that the following conditions are met: 89439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * 99439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * - Redistributions of source code must retain the above copyright notice, 109439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * this list of conditions and the following disclaimer. 119439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * 129439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * - Redistributions in binary form must reproduce the above copyright notice, 139439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * this list of conditions and the following disclaimer in the documentation 149439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * and/or other materials provided with the distribution. 159439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * 169439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * - Neither the name of the Motorola, Inc. nor the names of its contributors 179439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * may be used to endorse or promote products derived from this software 189439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * without specific prior written permission. 199439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * 209439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 219439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 229439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 239439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 249439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 259439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 269439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 279439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 289439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 299439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 309439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * POSSIBILITY OF SUCH DAMAGE. 319439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly */ 329439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly 339439a7fe517b858bc5e5c654b459315e4722feb2Nick Pellypackage javax.obex; 349439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly 359439a7fe517b858bc5e5c654b459315e4722feb2Nick Pellyimport java.io.IOException; 369439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly 379439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly/** 389439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * The <code>ObexSession</code> interface characterizes the term 399439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * "OBEX Connection" as defined in the IrDA Object Exchange Protocol v1.2, which 409439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * could be the server-side view of an OBEX connection, or the client-side view 419439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * of the same connection, which is established by server's accepting of a 429439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * client issued "CONNECT". 439439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * <P> 449439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * 459439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * This interface serves as the common super class for 469439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * <CODE>ClientSession</CODE> and <CODE>ServerSession</CODE>. 479439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * 489439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly * @version 0.3 November 28, 2008 499439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly */ 509439a7fe517b858bc5e5c654b459315e4722feb2Nick Pellypublic interface ObexSession { 519439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly 529439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly /* 539439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly public InputStream openInputStream() throws IOException; 549439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly 559439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly public DataInputStream openDataInputStream() throws IOException; 569439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly 579439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly public OutputStream openOutputStream() throws IOException; 589439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly 599439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly public DataOutputStream openDataOutputStream() throws IOException;*/ 609439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly 619439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly public void close() throws IOException; 629439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly 639439a7fe517b858bc5e5c654b459315e4722feb2Nick Pelly} 64