00001
00017 #ifndef INC_MI32_BASE64_H
00018 #define INC_MI32_BASE64_H
00019
00020 #ifndef INC_MI32_SIMPLEAR_H
00021 #include <mi32/simplear.h>
00022 #endif
00023
00024 #ifndef GENERATING_DOXYGEN_OUTPUT
00025 class FILEPATH;
00026 class GENERICRW;
00027 #endif // GENERATING_DOXYGEN_OUTPUT
00028
00029 #ifdef MISYSTEMDLL
00030 #define CLASSLIBEXPORT MI_DLLCLASSEXPORT
00031 #else
00032 #define CLASSLIBEXPORT MI_DLLCLASSIMPORT
00033 #endif
00034
00035
00036 class CLASSLIBEXPORT BASE64_ENCODER {
00037 public:
00038 BASE64_ENCODER ();
00039 virtual ~BASE64_ENCODER ();
00040
00043 ERRVALUE Encode (
00044 const FILEPATH& filepath
00045 );
00046
00048 ERRVALUE Encode (
00049 GENERICRW& stream
00050 );
00051
00054 ERRVALUE Encode (
00055 const UINT8* buffer,
00056 int NumBytes
00057 );
00058
00059 private:
00060 #ifndef GENERATING_DOXYGEN_OUTPUT
00061 SIMPLE_ARRAY<char> m_WorkBuffer;
00062
00063
00064 BASE64_ENCODER(const BASE64_ENCODER&);
00065 BASE64_ENCODER& operator=(const BASE64_ENCODER&);
00066 #endif // GENERATING_DOXYGEN_OUTPUT
00067
00068
00069
00070
00071
00072
00073 virtual ERRVALUE v_Write (
00074 const char* buffer
00075 ) = 0;
00076
00077
00078
00079
00080
00081
00082 virtual ERRVALUE v_ShowStatus (
00083 double PercentDone
00084 );
00085
00086 };
00087
00088
00089 class CLASSLIBEXPORT BASE64_DECODER {
00090 public:
00091 BASE64_DECODER();
00092 virtual ~BASE64_DECODER();
00093
00095 ERRVALUE Decode (
00096 const FILEPATH& filepath
00097 );
00098
00100 ERRVALUE Decode (
00101 const char* buffer
00102 );
00103
00108 ERRVALUE Decode (
00109 GENERICRW& stream,
00110 INT64 size = -1
00111 );
00112
00113 private:
00114 #ifndef GENERATING_DOXYGEN_OUTPUT
00115
00116
00117 BASE64_DECODER(const BASE64_DECODER&);
00118 BASE64_DECODER& operator=(const BASE64_DECODER&);
00119 #endif // GENERATING_DOXYGEN_OUTPUT
00120
00121
00122
00123
00124 virtual ERRVALUE v_Write (
00125 const UINT8* buffer,
00126 int numbytes
00127 ) = 0;
00128
00129
00130
00131
00132 virtual ERRVALUE v_ShowStatus (
00133 double PercentDone
00134 );
00135
00136 };
00137
00138 #undef CLASSLIBEXPORT
00139
00140 #endif