rt_ActionConfig.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*Copyright (C) 2013 Doubango Telecom <http://www.doubango.org>
  2. *
  3. * This file is part of Open Source Doubango Framework.
  4. *
  5. * DOUBANGO is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * DOUBANGO is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with DOUBANGO.
  17. */
  18. #pragma once
  19. #include "rt_Enums.h"
  20. class ActionConfig;
  21. namespace doubango_rt
  22. {
  23. namespace BackEnd
  24. {
  25. public ref class rtActionConfig sealed
  26. {
  27. public:
  28. rtActionConfig();
  29. virtual ~rtActionConfig();
  30. bool addHeader(Platform::String^ name, Platform::String^ value);
  31. #if COM_VISIBLE
  32. bool addPayload(Platform::String^ payload);
  33. #else
  34. bool addPayload(Platform::IntPtr payload, unsigned len);
  35. #endif
  36. bool setActiveMedia(rt_twrap_media_type_t type);
  37. rtActionConfig^ setResponseLine(short code, Platform::String^ phrase);
  38. rtActionConfig^ setMediaString(rt_twrap_media_type_t type, Platform::String^ key, Platform::String^ value);
  39. rtActionConfig^ setMediaInt(rt_twrap_media_type_t type, Platform::String^ key, int value);
  40. internal:
  41. ActionConfig* getWrappedActionConfig() {
  42. return m_pActionConfig;
  43. }
  44. private:
  45. ActionConfig* m_pActionConfig;
  46. };
  47. }
  48. }