00001 /* 00002 * WOscLib, an object oriented OSC library. 00003 * Copyright (C) 2005 Uli Clemens Franke, Weiss Engineering LTD, Switzerland. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 * 00019 * For details see lgpl.txt 00020 * 00021 * Weiss Engineering LTD. 00022 * Florastrass 42 00023 * 8610 Uster 00024 * Switzerland 00025 * 00026 * uli.franke@weiss.ch 00027 */ 00028 00029 /** WOscPacket header file. 00030 * \file 00031 * 00032 * $Author: cls-nebadje $ ( \ref _UcfWOscLib ) 00033 * $Date: 2007-11-30 17:00:12 $ 00034 * $Revision: 1.3 $ 00035 * 00036 * Copyright (c) Weiss Engineering Ltd 00037 * 00038 */ 00039 #ifndef __WOSCPACKET_H__ 00040 #define __WOSCPACKET_H__ 00041 00042 00043 #include "WOscLib.h" 00044 00045 /** Interface definition of OSC-datatypes which are going to be 00046 * received and transferred through a network. 00047 * 00048 * WOscBundle and WOscMessage are such objects. Both can be elements of an OSC- 00049 * bundle. 00050 */ 00051 class WOSC_EXPORT WOscPacket{ 00052 public: 00053 virtual ~WOscPacket() {} 00054 /** Fills the buffer with the raw bytestream of this packet. 00055 */ 00056 virtual void GetBuffer(char* buffer, int bufferLen) = 0; 00057 /** Allocates memory and fills it with the content of the buffer, 00058 * the caller has to delete it, the buffer-size can be queried 00059 * through "getBufferLen()". 00060 */ 00061 virtual const char* GetBuffer() = 0; 00062 /** Returns the required buffer size when calling "getBuffer". 00063 */ 00064 virtual int GetBufferLen() = 0; 00065 00066 }; 00067 00068 #endif // #ifndef __WOSCPACKET_H__