util.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef fooutilhfoo
  2. #define fooutilhfoo
  3. /***
  4. This file is part of PulseAudio.
  5. Copyright 2004-2006 Lennart Poettering
  6. Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
  7. PulseAudio is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU Lesser General Public License as
  9. published by the Free Software Foundation; either version 2.1 of the
  10. License, or (at your option) any later version.
  11. PulseAudio is distributed in the hope that it will be useful, but
  12. WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. Lesser General Public License for more details.
  15. You should have received a copy of the GNU Lesser General Public
  16. License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
  17. ***/
  18. #include <stddef.h>
  19. #include <pulse/cdecl.h>
  20. #include <pulse/version.h>
  21. /** \file
  22. * Assorted utility functions */
  23. PA_C_DECL_BEGIN
  24. /** Return the current username in the specified string buffer. */
  25. char *pa_get_user_name(char *s, size_t l);
  26. /** Return the current hostname in the specified buffer. */
  27. char *pa_get_host_name(char *s, size_t l);
  28. /** Return the fully qualified domain name in s */
  29. char *pa_get_fqdn(char *s, size_t l);
  30. /** Return the home directory of the current user */
  31. char *pa_get_home_dir(char *s, size_t l);
  32. /** Return the binary file name of the current process. This is not
  33. * supported on all architectures, in which case NULL is returned. */
  34. char *pa_get_binary_name(char *s, size_t l);
  35. /** Return a pointer to the filename inside a path (which is the last
  36. * component). If passed NULL will return NULL. */
  37. char *pa_path_get_filename(const char *p);
  38. /** Wait t milliseconds */
  39. int pa_msleep(unsigned long t);
  40. PA_C_DECL_END
  41. #endif