test.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright (C) 2009 Mamadou Diop.
  3. *
  4. * Contact: Mamadou Diop <diopmamadou(at)doubango.org>
  5. *
  6. * This file is part of Open Source Doubango Framework.
  7. *
  8. * DOUBANGO is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * DOUBANGO is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with DOUBANGO.
  20. *
  21. */
  22. #include "stdafx.h"
  23. #include "tinyxcap.h"
  24. #define LOOP 1
  25. #define RUN_TEST_ALL 0
  26. #define RUN_TEST_SELECTOR 0
  27. #define RUN_TEST_STACK 1
  28. #define XUI "sip:mamadou@micromethod.com"
  29. #define PASSWORD "mysecret"
  30. #define XCAP_ROOT "http://192.168.0.10:8080/services"
  31. #if RUN_TEST_SELECTOR || RUN_TEST_ALL
  32. #include "test_selector.h"
  33. #endif
  34. #if RUN_TEST_STACK || RUN_TEST_ALL
  35. #include "test_stack.h"
  36. #endif
  37. #ifdef _WIN32_WCE
  38. int _tmain(int argc, _TCHAR* argv[])
  39. #else
  40. int main()
  41. #endif
  42. {
  43. tnet_startup();
  44. /* Print copyright information */
  45. printf("Doubango Project\nCopyright (C) 2009 Mamadou Diop \n\n");
  46. #if LOOP
  47. while(1)
  48. #endif
  49. {
  50. /* XCAP document/node selector */
  51. #if RUN_TEST_SELECTOR || RUN_TEST_ALL
  52. test_selector();
  53. #endif
  54. /* XCAP stack */
  55. #if RUN_TEST_STACK || RUN_TEST_ALL
  56. test_stack();
  57. #endif
  58. }
  59. tnet_cleanup();
  60. return 0;
  61. }