plugin_wasapi_config.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* Copyright (C) 2013 Mamadou DIOP
  2. * Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
  3. *
  4. * This file is part of Open Source Doubango Framework.
  5. *
  6. * DOUBANGO is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * DOUBANGO is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with DOUBANGO.
  18. */
  19. #ifndef PLUGIN_WASAPI_CONFIG_H
  20. #define PLUGIN_WASAPI_CONFIG_H
  21. #ifdef __SYMBIAN32__
  22. #undef _WIN32 /* Because of WINSCW */
  23. #endif
  24. // Windows (XP/Vista/7/CE and Windows Mobile) macro definition
  25. #if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE)
  26. # define PLUGIN_WASAPI_UNDER_WINDOWS 1
  27. # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP)
  28. # define PLUGIN_WASAPI_UNDER_WINDOWS_RT 1
  29. # if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
  30. # define PLUGIN_WASAPI_UNDER_WINDOWS_PHONE 1
  31. # endif
  32. # endif
  33. #endif
  34. #if (PLUGIN_WASAPI_UNDER_WINDOWS || defined(__SYMBIAN32__)) && defined(PLUGIN_WASAPI_EXPORTS)
  35. # define PLUGIN_WASAPI_API __declspec(dllexport)
  36. # define PLUGIN_WASAPI_GEXTERN extern __declspec(dllexport)
  37. #elif (PLUGIN_WASAPI_UNDER_WINDOWS || defined(__SYMBIAN32__)) && !defined(PLUGIN_WASAPI_IMPORTS_IGNORE)
  38. # define PLUGIN_WASAPI_API __declspec(dllimport)
  39. # define PLUGIN_WASAPI_GEXTERN __declspec(dllimport)
  40. #else
  41. # define PLUGIN_WASAPI_API
  42. # define PLUGIN_WASAPI_GEXTERN extern
  43. #endif
  44. // x86
  45. #if defined(__x86_64__) || defined(__x86__) || defined(__i386__)
  46. # define PLUGIN_WASAPI_UNDER_X86 1
  47. #endif
  48. // Guards against C++ name mangling
  49. #ifdef __cplusplus
  50. # define PLUGIN_WASAPI_BEGIN_DECLS extern "C" {
  51. # define PLUGIN_WASAPI_END_DECLS }
  52. #else
  53. # define PLUGIN_WASAPI_BEGIN_DECLS
  54. # define PLUGIN_WASAPI_END_DECLS
  55. #endif
  56. #ifdef _MSC_VER
  57. # define inline __inline
  58. # define _CRT_SECURE_NO_WARNINGS
  59. # define _ALLOW_KEYWORD_MACROS
  60. #endif
  61. #include <stdint.h>
  62. #ifdef __SYMBIAN32__
  63. #include <stdlib.h>
  64. #endif
  65. #if HAVE_CONFIG_H
  66. #include <config.h>
  67. #endif
  68. #endif // PLUGIN_WASAPI_CONFIG_H