00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #if !defined(_GATMemoryStream_H_)
00018 #define _GATMemoryStream_H_
00019
00020
00021 #include "GATObject.h"
00022 #include "GATType.h"
00023
00024
00025
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029
00030
00031 GATOBJECT_DECLARE_CONVERTERS(GATMemoryStream);
00032
00033
00034 GATMemoryStream
00035 GATMemoryStream_Create(void *initial_buffer, GATuint32 initial_size,
00036 GATBool takeover_ownership);
00037
00038
00039 void *
00040 GATMemoryStream_GetBuffer(GATMemoryStream object,
00041 GATuint32 *buffer_size, GATBool lend_ownership);
00042
00043
00044
00045 void
00046 GATMemoryStream_Destroy(GATMemoryStream *object);
00047
00048
00049 GATResult
00050 GATMemoryStream_Equals(GATMemoryStream_const lhs,
00051 GATMemoryStream_const rhs, GATBool *isequal);
00052
00053
00054 GATResult
00055 GATMemoryStream_Clone(GATMemoryStream_const object,
00056 GATMemoryStream *new_object);
00057
00058
00059 GATType
00060 GATMemoryStream_GetType(GATMemoryStream_const object);
00061
00062
00063 GATResult
00064 GATMemoryStream_GetInterface(GATMemoryStream_const file,
00065 GATInterface iftype, void const **ifp);
00066
00067
00068
00069 GATResult
00070 GATMemoryStream_Read(GATMemoryStream object, void *buffer,
00071 GATuint32 size, GATuint32 *read_bytes);
00072
00073
00074 GATResult
00075 GATMemoryStream_Write(GATMemoryStream object, void const *buffer,
00076 GATuint32 size, GATuint32 *written_bytes);
00077
00078
00079 GATResult
00080 GATMemoryStream_Seek(GATMemoryStream object, GATOrigin origin,
00081 GATint32 offset, GATuint32 *new_position);
00082
00083
00084 GATResult
00085 GATMemoryStream_Close(GATMemoryStream object);
00086
00087 #if 0
00088
00089
00090 GATResult
00091 GATMemoryStream_IRead(GATMemoryStream object, void *buffer,
00092 GATuint32 size);
00093
00094
00095 GATResult
00096 GATMemoryStream_ReadFinish(GATMemoryStream object, GATBool *got_data,
00097 GATuint32 *got_bytes);
00098
00099
00100 GATResult
00101 GATMemoryStream_ReadTest(GATMemoryStream object, GATBool *can_read);
00102
00103
00104
00105 GATResult
00106 GATMemoryStream_IWrite(GATMemoryStream object, void const *buffer,
00107 GATuint32 size);
00108
00109
00110 GATResult
00111 GATMemoryStream_WriteFinish(GATMemoryStream object,
00112 GATuint32 *written_bytes);
00113
00114
00115
00116 GATResult
00117 GATMemoryStream_WriteTest(GATMemoryStream object,
00118 GATuint32 *written_bytes);
00119 #endif
00120
00121 #ifdef __cplusplus
00122 }
00123 #endif
00124
00125 #endif