Home | History | Annotate | Download | only in pulse
      1 #ifndef fooutilhfoo
      2 #define fooutilhfoo
      3 
      4 /* $Id: util.h 1971 2007-10-28 19:13:50Z lennart $ */
      5 
      6 /***
      7   This file is part of PulseAudio.
      8 
      9   Copyright 2004-2006 Lennart Poettering
     10   Copyright 2006 Pierre Ossman <ossman (at) cendio.se> for Cendio AB
     11 
     12   PulseAudio is free software; you can redistribute it and/or modify
     13   it under the terms of the GNU Lesser General Public License as
     14   published by the Free Software Foundation; either version 2.1 of the
     15   License, or (at your option) any later version.
     16 
     17   PulseAudio is distributed in the hope that it will be useful, but
     18   WITHOUT ANY WARRANTY; without even the implied warranty of
     19   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
     20   Lesser General Public License for more details.
     21 
     22   You should have received a copy of the GNU Lesser General Public
     23   License along with PulseAudio; if not, write to the Free Software
     24   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
     25   USA.
     26 ***/
     27 
     28 #include <stddef.h>
     29 
     30 #include <pulse/cdecl.h>
     31 
     32 /** \file
     33  * Assorted utility functions */
     34 
     35 PA_C_DECL_BEGIN
     36 
     37 /** Return the current username in the specified string buffer. */
     38 char *pa_get_user_name(char *s, size_t l);
     39 
     40 /** Return the current hostname in the specified buffer. */
     41 char *pa_get_host_name(char *s, size_t l);
     42 
     43 /** Return the fully qualified domain name in s */
     44 char *pa_get_fqdn(char *s, size_t l);
     45 
     46 /** Return the home directory of the current user */
     47 char *pa_get_home_dir(char *s, size_t l);
     48 
     49 /** Return the binary file name of the current process. This is not
     50  * supported on all architectures, in which case NULL is returned. */
     51 char *pa_get_binary_name(char *s, size_t l);
     52 
     53 /** Return a pointer to the filename inside a path (which is the last
     54  * component). */
     55 char *pa_path_get_filename(const char *p);
     56 
     57 /** Wait t milliseconds */
     58 int pa_msleep(unsigned long t);
     59 
     60 PA_C_DECL_END
     61 
     62 #endif
     63