00001 /* 00002 * Copyright (c) 2005, Ian Paul Larsen 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining 00005 * a copy of this software and associated documentation files (the "Software"), 00006 * to deal in the Software without restriction, including without limitation 00007 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00008 * and/or sell copies of the Software, and to permit persons to whom the 00009 * Software is furnished to do so, subject to the following conditions: 00010 * 00011 * The above copyright notice and this permission notice shall be included 00012 * in all copies or substantial portions of the Software. 00013 * 00014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00015 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00016 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00017 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 00018 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00019 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00020 * OTHER DEALINGS IN THE SOFTWARE. 00021 */ 00022 00023 #ifndef __DATA_STORE_H 00024 #define __DATA_STORE_H 00025 00026 #include "ntw.h" 00027 00028 struct ntw_data_store{ 00029 int32 size; 00030 int32 offset; 00031 void *data; 00032 }; 00033 00034 void * 00035 ntw_create_data_store(int32 size); 00036 00037 int 00038 ntw_trim_data_store(struct ntw_data_store *ds); 00039 00040 int 00041 ntw_delete_data_store(struct ntw_data_store *ds); 00042 00043 int32 00044 ntw_add_to_data_store(struct ntw_data_store *ds, void *data, int32 data_len); 00045 00046 #endif /* __DATA_STORE_H */ 00047