Main Page | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# dkcCircularMemoryStream.h

Go to the documentation of this file.

    00001
    00007 #ifndef dkutil_c_CircularMemoryStream__h
    00008 #define dkutil_c_CircularMemoryStream__h
    00009
    00010
    00011 #include "dkcMemoryStream.h"
    00012
    00013 /*
    00014 enum edkcCircularMemoryStream{
    00015         edkcCircularMemoryStreamInitBuffer = edkcStreamInitBuffer,
    00016         edkcCircularMemoryStreamInitFile = edkcStreamInitFile,
    00018         edkcCircularMemoryStreamDumpAll,
    00020         edkcCircularMemoryStreamDumpEnable,
    00021
    00022 };
    00023 */
    00027 typedef struct dkc_CircularMemoryStream{
    00029         BYTE *mBuffer;
    00031         size_t mSize ;
    00033         size_t mStart,mEnd;
    00035         size_t mEnableLength ;
    00036
    00037 } DKC_CIRCULAR_MEMORYSTREAM;
    00038
    00039 DKC_EXTERN DKC_CIRCULAR_MEMORYSTREAM * WINAPI dkcAllocCircularMemoryStream(size_t size);
    00040
    00041 DKC_EXTERN int WINAPI dkcFreeCircularMemoryStream(DKC_CIRCULAR_MEMORYSTREAM **ptr);
    00042
    00052
    00053 DKC_EXTERN int WINAPI dkcCircularMemoryStreamRead(DKC_CIRCULAR_MEMORYSTREAM *ptr,void *buffer,size_t size,size_t *readsize);
    00054
    00056 DKC_EXTERN int WINAPI dkcCircularMemoryStreamReference(DKC_CIRCULAR_MEMORYSTREAM *ptr,void *buffer,size_t size,size_t *readsize);
    00057
    00066
    00067 DKC_EXTERN int WINAPI dkcCircularMemoryStreamWrite(DKC_CIRCULAR_MEMORYSTREAM *ptr,const void *buffer,size_t size);
    00068
    00070 DKC_EXTERN int WINAPI dkcCircularMemoryStreamClear(DKC_CIRCULAR_MEMORYSTREAM *ptr);
    00071
    00076 DKC_EXTERN DKC_CIRCULAR_MEMORYSTREAM *WINAPI
    00077         dkcAllocCircularMemoryStreamCopy(const DKC_CIRCULAR_MEMORYSTREAM *ptr);
    00078
    00079
    00080 //stream内のものをバッファにコピーする。
    00081 //DKC_EXTERN int WINAPI dkcCircularMemoryStreamToBuffer(
    00082 //      const DKC_CIRCULAR_MEMORYSTREAM *ptr,char *buff,size_t size,size_t want_size);
    00083
    00084
    00085
    00086
    00087
    00088 #endif