poll_types.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2005 iptelorg GmbH
  5. *
  6. * This file is part of ser, a free SIP server.
  7. *
  8. * ser 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 2 of the License, or
  11. * (at your option) any later version
  12. *
  13. * For a license to use the ser software under conditions
  14. * other than those described here, or to purchase support for this
  15. * software, please contact iptel.org by e-mail at the following addresses:
  16. * [email protected]
  17. *
  18. * ser is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  26. */
  27. /*
  28. * io wait poll methods (enum, strings, related function)
  29. * see io_wait.h for more details
  30. *
  31. *
  32. */
  33. /*
  34. * History:
  35. * --------
  36. * 2005-06-15 created by andrei
  37. */
  38. #ifndef _poll_types_h
  39. #define _poll_types_h
  40. enum poll_types { POLL_NONE, POLL_POLL, POLL_EPOLL_LT, POLL_EPOLL_ET,
  41. POLL_SIGIO_RT, POLL_SELECT, POLL_KQUEUE, POLL_DEVPOLL,
  42. POLL_END};
  43. /* all the function and vars are defined in io_wait.c */
  44. extern char* poll_method_str[POLL_END];
  45. extern char* poll_support;
  46. enum poll_types choose_poll_method(void);
  47. /* returns 0 on success, and an error message on error */
  48. char* check_poll_method(enum poll_types poll_method);
  49. char* poll_method_name(enum poll_types poll_method);
  50. enum poll_types get_poll_type(char* s);
  51. #endif