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

# dkcCircularStream.h

Go to the documentation of this file.

    00001
    00002 #ifndef dkutil_c_CircularStream__h
    00003 #define dkutil_c_CircularStream__h
    00004
    00005
    00006 #include "dkcStream.h"
    00007
    00008
    00009 enum edkcCircularStream{
    00010         edkcCircularStreamInitBuffer = edkcStreamInitBuffer,
    00011         edkcCircularStreamInitFile = edkcStreamInitFile,
    00013         edkcCircularStreamDumpAll,
    00015         edkcCircularStreamDumpEnable,
    00016
    00017 };
    00018
    00020 typedef struct dkc_CircularStream{
    00022         DKC_STREAM *mStream;
    00024         size_t mStart,mEnd;
    00026         size_t mEnableLength ;
    00028         size_t mSize ;
    00030         short mMode;
    00031 } DKC_CIRCULARSTREAM;
    00032
    00033 DKC_EXTERN DKC_CIRCULARSTREAM * WINAPI dkcAllocNewCircularStream(size_t size,short mode,const char *filename,const char *openmode);
    00034
    00035 DKC_EXTERN int WINAPI dkcFreeDeleteCircularStream(DKC_CIRCULARSTREAM **ptr);
    00036
    00037 DKC_EXTERN int WINAPI dkcNewCircularStream(DKC_CIRCULARSTREAM *ptr,size_t size);
    00038
    00039 DKC_EXTERN int WINAPI dkcNewCircularStreamForFile(DKC_CIRCULARSTREAM *ptr,size_t size,const char *filename,const char *openmode);
    00040
    00042 DKC_EXTERN int WINAPI dkcDeleteCircularStream(DKC_CIRCULARSTREAM *ptr);
    00043
    00044
    00054
    00055 DKC_EXTERN int WINAPI dkcCircularStreamRead(DKC_CIRCULARSTREAM *ptr,void *buffer,size_t size,size_t *readsize);
    00056
    00058 DKC_EXTERN int WINAPI dkcCircularStreamReference(DKC_CIRCULARSTREAM *ptr,void *buffer,size_t size,size_t *readsize);
    00059
    00068
    00069 DKC_EXTERN int WINAPI dkcCircularStreamWrite(DKC_CIRCULARSTREAM *ptr,const void *buffer,size_t size);
    00070
    00071
    00076
    00077 DKC_EXTERN int WINAPI dkcCircularStreamDump(DKC_CIRCULARSTREAM *ptr,const char *filename,int flag);
    00079 DKC_EXTERN int WINAPI dkcCircularStreamZero(DKC_CIRCULARSTREAM *ptr);
    00081 DKC_EXTERN int WINAPI dkcCircularStreamToBuffer(const DKC_STREAM *ptr,char *buff,size_t size,size_t want_size);
    00082
    00083
    00084
    00085
    00086
    00087 #endif