alternative.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef fooalternativehfoo
  2. #define fooalternativehfoo
  3. /***
  4. This file is part of avahi.
  5. avahi is free software; you can redistribute it and/or modify it
  6. under the terms of the GNU Lesser General Public License as
  7. published by the Free Software Foundation; either version 2.1 of the
  8. License, or (at your option) any later version.
  9. avahi is distributed in the hope that it will be useful, but WITHOUT
  10. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
  12. Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with avahi; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  16. USA.
  17. ***/
  18. /** \file alternative.h Functions to find alternative names for hosts and services in the case of name collision */
  19. #include <avahi-common/cdecl.h>
  20. AVAHI_C_DECL_BEGIN
  21. /** Find an alternative for the specified host name. If called with an
  22. * original host name, "-2" is appended, afterwards the number is
  23. * increased on each call. (i.e. "foo" becomes "foo-2" becomes "foo-3"
  24. * and so on.) avahi_free() the result. */
  25. char *avahi_alternative_host_name(const char *s);
  26. /** Find an alternative for the specified service name. If called with
  27. * an original service name, " #2" is appended. Afterwards the number
  28. * is increased on each call (i.e. "foo" becomes "foo #2" becomes "foo
  29. * #3" and so on.) avahi_free() the result. */
  30. char *avahi_alternative_service_name(const char *s);
  31. AVAHI_C_DECL_END
  32. #endif