2
0

common.hpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /**
  2. * Copyright (c) 2019 Paul-Louis Ageneau
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef RTC_COMMON_H
  19. #define RTC_COMMON_H
  20. #ifndef RTC_ENABLE_WEBSOCKET
  21. #define RTC_ENABLE_WEBSOCKET 1
  22. #endif
  23. #ifndef RTC_ENABLE_MEDIA
  24. #define RTC_ENABLE_MEDIA 1
  25. #endif
  26. #ifdef _WIN32
  27. #define RTC_CPP_EXPORT __declspec(dllexport)
  28. #ifndef _WIN32_WINNT
  29. #define _WIN32_WINNT 0x0602 // Windows 8
  30. #endif
  31. #ifdef _MSC_VER
  32. #pragma warning(disable : 4251) // disable "X needs to have dll-interface..."
  33. #endif
  34. #else
  35. #define RTC_CPP_EXPORT
  36. #endif
  37. #include "rtc.h" // for C API defines
  38. #include "log.hpp"
  39. #include "utils.hpp"
  40. #include <cstddef>
  41. #include <functional>
  42. #include <memory>
  43. #include <mutex>
  44. #include <optional>
  45. #include <string>
  46. #include <string_view>
  47. #include <vector>
  48. namespace rtc {
  49. using std::byte;
  50. using std::nullopt;
  51. using std::shared_ptr;
  52. using std::string;
  53. using std::string_view;
  54. using std::unique_ptr;
  55. using std::weak_ptr;
  56. using binary = std::vector<byte>;
  57. using binary_ptr = std::shared_ptr<binary>;
  58. using std::size_t;
  59. using std::uint16_t;
  60. using std::uint32_t;
  61. using std::uint64_t;
  62. using std::uint8_t;
  63. } // namespace rtc
  64. #endif