1 module pulse.util; 2 3 import core.stdc.config; 4 5 extern (C): 6 7 /*** 8 This file is part of PulseAudio. 9 10 Copyright 2004-2006 Lennart Poettering 11 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB 12 13 PulseAudio is free software; you can redistribute it and/or modify 14 it under the terms of the GNU Lesser General Public License as 15 published by the Free Software Foundation; either version 2.1 of the 16 License, or (at your option) any later version. 17 18 PulseAudio is distributed in the hope that it will be useful, but 19 WITHOUT ANY WARRANTY; without even the implied warranty of 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 Lesser General Public License for more details. 22 23 You should have received a copy of the GNU Lesser General Public 24 License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. 25 ***/ 26 27 /** \file 28 * Assorted utility functions */ 29 30 /** Return the current username in the specified string buffer. */ 31 char* pa_get_user_name (char* s, size_t l); 32 33 /** Return the current hostname in the specified buffer. */ 34 char* pa_get_host_name (char* s, size_t l); 35 36 /** Return the fully qualified domain name in s */ 37 char* pa_get_fqdn (char* s, size_t l); 38 39 /** Return the home directory of the current user */ 40 char* pa_get_home_dir (char* s, size_t l); 41 42 /** Return the binary file name of the current process. This is not 43 * supported on all architectures, in which case NULL is returned. */ 44 char* pa_get_binary_name (char* s, size_t l); 45 46 /** Return a pointer to the filename inside a path (which is the last 47 * component). If passed NULL will return NULL. */ 48 char* pa_path_get_filename (const(char)* p); 49 50 /** Wait t milliseconds */ 51 int pa_msleep (c_ulong t); 52 53 /** Make the calling thread realtime if we can. On Linux, this uses RealTimeKit 54 * if available and POSIX APIs otherwise (the latter applies to other UNIX 55 * variants as well). This is also implemented for macOS and Windows. 56 * \since 13.0 */ 57 int pa_thread_make_realtime (int rtprio); 58