libpulse_sys/util.rs
1// Copyright 2017 Lyndon Brown
2//
3// This file is part of the PulseAudio Rust language linking library.
4//
5// Licensed under the MIT license or the Apache license (version 2.0), at your option. You may not
6// copy, modify, or distribute this file except in compliance with said license. You can find copies
7// of these licenses either in the LICENSE-MIT and LICENSE-APACHE files, or alternatively at
8// <http://opensource.org/licenses/MIT> and <http://www.apache.org/licenses/LICENSE-2.0>
9// respectively.
10//
11// Portions of documentation are copied from the LGPL 2.1+ licensed PulseAudio C headers on a
12// fair-use basis, as discussed in the overall project readme (available in the git repository).
13
14//! Assorted utility functions.
15
16use std::os::raw::{c_char, c_ulong};
17
18#[link(name = "pulse")]
19extern "C" {
20 pub fn pa_get_user_name(s: *mut c_char, l: usize) -> *mut c_char;
21 pub fn pa_get_host_name(s: *mut c_char, l: usize) -> *mut c_char;
22 pub fn pa_get_fqdn(s: *mut c_char, l: usize) -> *mut c_char;
23 pub fn pa_get_home_dir(s: *mut c_char, l: usize) -> *mut c_char;
24 pub fn pa_get_binary_name(s: *mut c_char, l: usize) -> *mut c_char;
25 pub fn pa_path_get_filename(p: *const c_char) -> *mut c_char;
26 pub fn pa_msleep(t: c_ulong) -> i32;
27 #[cfg(any(doc, feature = "pa_v13"))]
28 #[cfg_attr(docsrs, doc(cfg(feature = "pa_v13")))]
29 pub fn pa_thread_make_realtime(rtprio: i32) -> i32;
30}