zipglobal.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /****************************************************************************
  2. ** Filename: zipglobal.h
  3. ** Last updated [dd/mm/yyyy]: 27/03/2011
  4. **
  5. ** pkzip 2.0 file compression.
  6. **
  7. ** Some of the code has been inspired by other open source projects,
  8. ** (mainly Info-Zip and Gilles Vollant's minizip).
  9. ** Compression and decompression actually uses the zlib library.
  10. **
  11. ** Copyright (C) 2007-2012 Angius Fabrizio. All rights reserved.
  12. **
  13. ** This file is part of the OSDaB project (http://osdab.42cows.org/).
  14. **
  15. ** This file may be distributed and/or modified under the terms of the
  16. ** GNU General Public License version 2 as published by the Free Software
  17. ** Foundation and appearing in the file LICENSE.GPL included in the
  18. ** packaging of this file.
  19. **
  20. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  21. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  22. **
  23. ** See the file LICENSE.GPL that came with this software distribution or
  24. ** visit http://www.gnu.org/copyleft/gpl.html for GPL licensing information.
  25. **
  26. **********************************************************************/
  27. #ifndef OSDAB_ZIPGLOBAL__H
  28. #define OSDAB_ZIPGLOBAL__H
  29. #include <QtCore/QDateTime>
  30. #include <QtCore/QtGlobal>
  31. /* If you want to build the OSDaB Zip code as
  32. a library, define OSDAB_ZIP_LIB in the library's .pro file and
  33. in the libraries using it OR remove the #ifndef OSDAB_ZIP_LIB
  34. define below and leave the #else body. Also remember to define
  35. OSDAB_ZIP_BUILD_LIB in the library's project).
  36. */
  37. #ifndef OSDAB_ZIP_LIB
  38. # define OSDAB_ZIP_EXPORT
  39. #else
  40. # if defined(OSDAB_ZIP_BUILD_LIB)
  41. # define OSDAB_ZIP_EXPORT Q_DECL_EXPORT
  42. # else
  43. # define OSDAB_ZIP_EXPORT Q_DECL_IMPORT
  44. # endif
  45. #endif
  46. #ifdef OSDAB_NAMESPACE
  47. #define OSDAB_BEGIN_NAMESPACE(ModuleName) namespace Osdab { namespace ModuleName {
  48. #else
  49. #define OSDAB_BEGIN_NAMESPACE(ModuleName)
  50. #endif
  51. #ifdef OSDAB_NAMESPACE
  52. #define OSDAB_END_NAMESPACE } }
  53. #else
  54. #define OSDAB_END_NAMESPACE
  55. #endif
  56. #ifndef OSDAB_NAMESPACE
  57. #define OSDAB_ZIP_MANGLE(x) zip_##x
  58. #else
  59. #define OSDAB_ZIP_MANGLE(x) x
  60. #endif
  61. OSDAB_BEGIN_NAMESPACE(Zip)
  62. OSDAB_ZIP_EXPORT int OSDAB_ZIP_MANGLE(currentUtcOffset)();
  63. OSDAB_ZIP_EXPORT QDateTime OSDAB_ZIP_MANGLE(fromFileTimestamp)(const QDateTime& dateTime);
  64. OSDAB_ZIP_EXPORT bool OSDAB_ZIP_MANGLE(setFileTimestamp)(const QString& fileName, const QDateTime& dateTime);
  65. OSDAB_END_NAMESPACE
  66. #endif // OSDAB_ZIPGLOBAL__H