split polypcore/util.[ch] into polypcore/core-util.[ch] and polyp/util.[ch]
[profile/ivi/pulseaudio.git] / src / polyp / util.h
1 #ifndef fooutilhfoo
2 #define fooutilhfoo
3
4 /* $Id$ */
5
6 /***
7   This file is part of polypaudio.
8  
9   polypaudio is free software; you can redistribute it and/or modify
10   it under the terms of the GNU Lesser General Public License as
11   published by the Free Software Foundation; either version 2.1 of the
12   License, or (at your option) any later version.
13  
14   polypaudio is distributed in the hope that it will be useful, but
15   WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17   Lesser General Public License for more details.
18  
19   You should have received a copy of the GNU Lesser General Public
20   License along with polypaudio; if not, write to the Free Software
21   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22   USA.
23 ***/
24
25 #include <sys/types.h>
26 #include <inttypes.h>
27
28 #include <polyp/sample.h>
29
30 struct timeval;
31
32 char *pa_get_user_name(char *s, size_t l);
33 char *pa_get_host_name(char *s, size_t l);
34 char *pa_get_fqdn(char *s, size_t l);
35 char *pa_get_home_dir(char *s, size_t l);
36
37 char *pa_get_binary_name(char *s, size_t l);
38 const char *pa_path_get_filename(const char *p);
39
40 struct timeval *pa_gettimeofday(struct timeval *tv);
41 pa_usec_t pa_timeval_diff(const struct timeval *a, const struct timeval *b);
42 int pa_timeval_cmp(const struct timeval *a, const struct timeval *b);
43 pa_usec_t pa_timeval_age(const struct timeval *tv);
44 void pa_timeval_add(struct timeval *tv, pa_usec_t v);
45
46 int pa_msleep(unsigned long t);
47
48 #endif