メインページ | アルファベット順一覧 | 構成 | ファイル一覧 | 構成メンバ | ファイルメンバ | 関連ページ

# dkcTelecomConfirmFile.h

説明を見る。

    00001
    00010 #ifndef  DKUTIL_C_TELECOM_CONFIRM_FILE_H
    00011 #define  DKUTIL_C_TELECOM_CONFIRM_FILE_H
    00012
    00013 #include "dkcHash.h"
    00014 #include "dkcLZW.h"
    00015 #include "dkcStream.h"
    00016
    00017 #if 0
    00018
    00019
    00020 #define dkcdTELECOM_CONFIRM_FILE_MAX_LENGTH 0x7FFFFFFF
    00021
    00026 #define dkcdTELECOM_CONFIRM_FILE_DEFAULT_PAUSE_SIZE 1966080
    00027
    00028 typedef struct dkc_TelecomConfirmFileHeader01{
    00029     uint32 version;
    00031     uint8 header_sig[SHA512_BIN_BUFFER_SIZE];
    00033     uint8 origin_sig[SHA512_BIN_BUFFER_SIZE];
    00035     uint64 length;
    00037     uint32 block_num;
    00039     uint32 lzw_output_block_size;
    00040 }DKC_TELECOM_CONFIRM_FILE_HEADER01;
    00041
    00042 typedef struct dkc_TelecomConfirmFileBlock01{
    00043     DKC_LZW_HEADER lzw_header;
    00045     uint8 compress_md5[MD5_BIN_BUFFER_SIZE];
    00047     uint8 origin_md5[MD5_BIN_BUFFER_SIZE];
    00048 }DKC_TELECOM_CONFIRM_FILE_BLOCK01;
    00049
    00050 #define dkcdTELECOM_CONFIRM_FILE_BEGIN_BUFFER_SIZE (1024 * 64)
    00051
    00053 typedef struct dkc_TelecomConfirmFile{
    00054     //setting
    00055     uint32 version;
    00056
    00057     //save
    00058     uint32 block_num;
    00059     uint32 lzw_output_block_size;
    00060     //state
    00061     DKC_LZW *mLZW;
    00062     DKC_MD5 *mMD5;
    00063     DKC_SHA512 *mSHA512;
    00064
    00066     DKC_BUFFER *mBuff;
    00067
    00068
    00069 }DKC_TELECOM_CONFIRM_FILE;
    00070
    00071
    00072 enum edkcTelecomConfirmFile{
    00074     edkcTelecomConfirmFileVersion01 = 1,
    00075     edkcTelecomConfirmFileVersionNewest =  edkcTelecomConfirmFileVersion01,
    00076 };
    00077 #define dkcmTelecomConfirmFileVersionError(a) (a < edkcTelecomConfirmFileVersion01 && edkcTelecomConfirmFileVersionNewest < a)
    00078
    00082 DKC_EXTERN DKC_TELECOM_CONFIRM_FILE* WINAPI dkcAllocTelecomConfirmFileGenerate(uint32 version,size_t lzw_output_block_size);
    00083
    00084 DKC_EXTERN DKC_TELECOM_CONFIRM_FILE *WINAPI dkcAllocTelecomConfirmFileExtract(DKC_STREAM *input);
    00085
    00086 DKC_EXTERN int WINAPI dkcFreeTelecomConfirmFile(DKC_TELECOM_CONFIRM_FILE **);
    00087
    00088 DKC_EXTERN int WINAPI dkcTelecomConfirmFileInit(DKC_TELECOM_CONFIRM_FILE *p);
    00089
    00090
    00092 DKC_EXTERN int WINAPI dkcTelecomConfirmFileGenerateBegin(DKC_TELECOM_CONFIRM_FILE *p,DKC_STREAM *output);
    00093
    00094 DKC_EXTERN int WINAPI dkcTelecomConfirmFileGenerateOutputBlock(DKC_TELECOM_CONFIRM_FILE *p,DKC_STREAM *output,const uint8 *buff,size_t size);
    00095
    00096 DKC_EXTERN int WINAPI dkcTelecomConfirmFileGenerateFinal(DKC_TELECOM_CONFIRM_FILE *p,DKC_STREAM *output);
    00097
    00098 /*
    00099 DKC_EXTERN int WINAPI dkcTelecomConfirmFileGetHeader(DKC_STREAM *input,DKC_TELECOM_CONFIRM_FILE_HEADER01 *header);
    00100
    00101 DKC_EXTERN int WINAPI dkcTelecomConfirmFileGetBlock(DKC_STREAM *input,DKC_TELECOM_CONFIRM_FILE_BLOCK01 *block);
    00102 */
    00103
    00104 DKC_EXTERN int WINAPI dkcTelecomConfirmFileExtractOutputBlock(
    00105     DKC_TELECOM_CONFIRM_FILE *p,DKC_STREAM *input,const DKC_TELECOM_CONFIRM_FILE_BLOCK *block,
    00106     uint8 *buff,size_t buffsize
    00107 );
    00108
    00109
    00110 DKC_EXTERN int WINAPI dkcTelecomConfirmFileEncode(const char *dest_filename,const char *src_filename);
    00111
    00112
    00113 DKC_EXTERN int WINAPI dkcTelecomConfirmFileDecode(const char *dest_filename,const char *src_filename);
    00114
    00115
    00116 DKC_EXTERN size_t WINAPI dkcTelecomConfirmFileGetDecodeSize(const char *filename);
    00117
    00118 /*
    00119 DKC_EXTERN int WINAPI dkcTelecomConfirmFileEncode(uint8 *dest,size_t destsize,const uint8 *src,size_t srcsize);
    00120
    00121 DKC_EXTERN int WINAPI dkcTelecomConfirmFileDecode(uint8 *dest,size_t destsize,const uint8 *src,size_t srcsize);
    00122 */
    00123
    00124
    00125 #if !defined( DKUTIL_C_TELECOM_CONFIRM_FILE_C ) &&  defined(USE_DKC_INDEPENDENT_INCLUDE)
    00126 #   include "dkcTelecomConfirmFile.c"
    00127 #endif
    00128
    00129 #endif //eo0
    00130
    00131 #endif //end of include once