Fix ALL the include guards.
[pdfium.git] / fpdfsdk / include / fsdk_define.h
index 433ff4c..8a839ab 100644 (file)
@@ -4,67 +4,33 @@
  
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#ifndef _FPDFSDK_DEFINE_H
-#define _FPDFSDK_DEFINE_H
+#ifndef FPDFSDK_INCLUDE_FSDK_DEFINE_H_
+#define FPDFSDK_INCLUDE_FSDK_DEFINE_H_
 
 #ifdef _WIN32
 #include <tchar.h>
 #include <math.h>
 #endif
 
-//#define API5
-#define API6
-#define  _FPDFAPI_ASYNC_PARSING_
-#define _FXSDK_OPENSOURCE_
+#include "../../core/include/fpdfapi/fpdf_parser.h" 
+#include "../../core/include/fpdfapi/fpdfapi.h" 
+#include "../../core/include/fpdfapi/fpdf_parser.h" 
+#include "../../core/include/fpdfapi/fpdf_module.h" 
+#include "../../core/include/fpdfapi/fpdf_render.h" 
+#include "../../core/include/fpdfapi/fpdf_pageobj.h" 
+#include "../../core/include/fpdfapi/fpdf_serial.h" 
 
-#ifdef _FPDFEMB_WCE_
-       #include "../../core/include/fpdfapi/fpdfapi.h" 
-       #include "../../core/include/fpdfapi/fpdf_parser.h" 
-       #include "../../core/include/fpdfapi/fpdf_module.h" 
-       #include "../../core/include/fpdfapi/fpdf_render.h" 
-       #include "../../core/include/fpdfapi/fpdf_pageobj.h" 
-       #include "../../core/include/fpdfapi/fpdf_serial.h" 
+#include "../../core/include/fpdftext/fpdf_text.h"
 
-       #include "../../core/include/fpdftext/fpdf_text.h"
+#include "../../core/include/fxge/fx_ge_win32.h"
+#include "../../core/include/fxge/fx_ge.h"
 
-       #include "../../core/include/fxge/fx_ge_win32.h"
-       #include "../../core/include/fxge/fx_ge.h"
+#include "../../core/include/fxcodec/fx_codec.h"
 
-       #include "../../core/include/fxcodec/fx_codec.h"
+#include "../../core/include/fpdfdoc/fpdf_doc.h" 
+#include "../../core/include/fpdfdoc/fpdf_vt.h" 
 
-       #include "../../core/include/fpdfdoc/fpdf_doc.h" 
-       #include "../../core/include/fpdfdoc/fpdf_vt.h" 
-
-       #include "../../core/include/fxcrt/fx_xml.h" 
-       #include "../../core/include/fxcrt/fx_crypt.h"
-
-#else
-       #ifdef API6
-               #include "../../core/include/fpdfapi/fpdf_parser.h" 
-               #include "../../core/include/fpdfapi/fpdfapi.h" 
-               #include "../../core/include/fpdfapi/fpdf_parser.h" 
-               #include "../../core/include/fpdfapi/fpdf_module.h" 
-               #include "../../core/include/fpdfapi/fpdf_render.h" 
-               #include "../../core/include/fpdfapi/fpdf_pageobj.h" 
-               #include "../../core/include/fpdfapi/fpdf_serial.h" 
-
-               #include "../../core/include/fpdftext/fpdf_text.h"
-
-               #include "../../core/include/fxge/fx_ge_win32.h"
-               #include "../../core/include/fxge/fx_ge.h"
-
-               #include "../../core/include/fxcodec/fx_codec.h"
-
-               #include "../../core/include/fpdfdoc/fpdf_doc.h" 
-               #include "../../core/include/fpdfdoc/fpdf_vt.h" 
-
-               #include "../../core/include/fxcrt/fx_xml.h" 
-       //      #include "../../core/include/fdrm/fx_crypt.h"
-               #ifdef _LICENSED_BUILD_
-                       #include "../../cryptopp/Cryptlib.h"
-               #endif
-       #endif
-#endif
+#include "../../core/include/fxcrt/fx_xml.h" 
 
 
 #ifndef FX_GetAValue
 
 typedef unsigned int FX_UINT;  
 
-#include "fpdfview.h"
+#include "../../public/fpdfview.h"
 
-class CPDF_CustomAccess FX_FINAL : public IFX_FileRead, public CFX_Object
+class CPDF_CustomAccess FX_FINAL : public IFX_FileRead
 {
 public:
        CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess);
        ~CPDF_CustomAccess() {}
 
-       virtual CFX_ByteString GetFullPath() { return ""; }
-       virtual FX_FILESIZE     GetSize() { return m_FileAccess.m_FileLen; }
+       virtual FX_FILESIZE     GetSize() FX_OVERRIDE { return m_FileAccess.m_FileLen; }
 
-       virtual FX_BOOL         GetByte(FX_DWORD pos, FX_BYTE& ch);
-       virtual FX_BOOL         GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size);
-       virtual void            Release() { delete this; }
+       virtual void            Release() FX_OVERRIDE { delete this; }
 
-       virtual FX_BOOL         ReadBlock(void* buffer, FX_FILESIZE offset, size_t size);
+       virtual FX_BOOL         ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) FX_OVERRIDE;
 
+private:
        FPDF_FILEACCESS         m_FileAccess;
-       FX_BYTE                         m_Buffer[512];
-       FX_DWORD                        m_BufferOffset;
 };
 
 void           FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable);
 FPDF_BOOL      FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy);
 
 
-#endif//_FPDFSDK_DEFINE_H
+#endif  // FPDFSDK_INCLUDE_FSDK_DEFINE_H_