libpulse-mainloop-glib-sys-1.21.1/.cargo_vcs_info.json0000644000000001650000000000100163020ustar { "git": { "sha1": "83adaf1280fe7ac5fdff6cd14f80bf749bddd29c" }, "path_in_vcs": "pulse-sys-mainloop-glib" }libpulse-mainloop-glib-sys-1.21.1/CHANGELOG.md000064400000000000000000000150361046102023000167060ustar 00000000000000# 1.21.1 (July 18th, 2023) * Fixed cross-crate version requirement. # 1.21.0 (July 18th, 2023) * Fixed docs.rs build failure. * Dropped PA v4 support. # 1.20.1 (January 9th, 2023) * Fixed broken build status badge in readme. # 1.20.0 (January 9th, 2023) * Bumped Rust edition to 2021. * Added `rust-version` (MSRV) attribute to `cargo.toml` file. * Updated required dependencies: - `libpulse-sys` from 1.19 to 1.20. # 1.19.2 (December 7th, 2021) * Fixed handling of pkg-config failure handling due to change in `pkg-config` crate. Thanks to @fredszaq on github for the initial patch. # 1.19.1 (August 29th, 2021) * Minor formatting tweaks. # 1.19.0 (July 28th, 2021) * Updated required dependencies: - `libpulse-sys` from 1.16 to 1.19. Note: versions 1.17 & 1.18 skipped, used only for main `libpulse-sys` crate changes. # 1.16.1 (December 15th, 2020) * Fixed mistake made trying to conditionally enable `#[cfg(doc)]` for docs.rs. # 1.16.0 (December 14th, 2020) * Made some changes to cargo features: - Removed the now obsolete `dox` cargo feature. - Removed the `pa_latest` and `pa_latest_common` cargo features. - Changed the default version feature level to `pa_v8`. * MSRV bumped from 1.40 to 1.41. * Made use of `#[cfg(doc)]` to always include stuff behind PA version feature guards in generated documentation. (Required bump of minimum supported Rust version from 1.40 to 1.41). * Added support for feature tagging in documentation (requires nightly Rust version, so only enabled if a certain config flag is used, as for the docs.rs copy). * Updated required dependencies: - `libpulse-sys` from 1.15 to 1.16. # 1.15.1 (November 25th, 2020) * Fixed deprecated license attribute syntax. # 1.15.0 (November 25th, 2020) * Updated required dependencies: - `libpulse-sys` from 1.14 to 1.15. # 1.14.0 (November 24th, 2020) * Updated required dependencies: - `libpulse-sys` from 1.13 to 1.14. # 1.13.2 (September 9th, 2020) * Bumped `pa_latest_common` feature to target PA v13. # 1.13.1 (June 2nd, 2020) * Fixed output of build script warning when pkg-config is missing (thanks to @cole-h on github!). # 1.13.0 (April 18th, 2020) * Removed deprecated Cargo features. * Updated required dependencies: - `libpulse-sys` from 1.12 to 1.13. # 1.12.1 (December 29th, 2019) * Improved the non-pkg-config fallback for lib linking. # 1.12.0 (December 29th, 2019) * Now using pkg-config in build script for more than just Linux. * Updated required dependencies: - `libpulse-sys` from 1.11 to 1.12. # 1.11.0 (September 17th, 2019) * Changed the license model from LGPL to dual MIT and Apache-2.0. See [here][issue26] for details. * Updated required dependencies: - `libpulse-sys` from 1.10 to 1.11. # 1.10.0 (September 15th, 2019) * Added PA v13 compatibility control feature. * Updated required dependencies: - `libpulse-sys` from 1.9 to 1.10. # 1.9.1 (August 19th, 2019) * Fixed broken doc.rs documentation generation. # 1.9.0 (August 19th, 2019) * Extended support to even older versions of PA, specifically up to and including v4. * Improved the build script. * Simplified feature flags, old ones left as temorary aliases, to be removed later. * Added a `dox` feature flag, for use with `cargo doc`. It enables the very latest PA version compatibility, while bypassing the pkg-config check, thus is useful for generating documentation that includes information on features from versions of PA that may be newer than the version you have installed. * Updated required dependencies: - `libpulse-sys` from 1.8 to 1.9. # 1.8.0 (August 15th, 2019) * Updated `use` conventions to that of Rust 1.30/1.31. * Specified edition in toml file. * Updated required dependencies: - `libpulse-sys` from 1.6 to 1.8. # 1.7.0 (August 13th, 2019) * Addressed long standing todo item of linking `GMainContext` to an actual glib crate. - Added dependency on `glib-sys`. - Replaced our own `GMainContext` type with the one from the `glib-sys` crate. # 1.6.1 (August 13th, 2019) * Fix missed use of UB empty enum trick. # 1.6.0 (August 12th, 2019) * Replaced use of empty enums for opaque types with a struct based alternative. According to the Rust nomicon ([here][nomicon-ros]) the use of the empty enum trick is apparently undefined behaviour. * Added a new `latest_pa_common_compatibility` feature flag, used by default now instead of `latest_pa_compatibility`. * Updated required dependencies: - `libpulse-sys` from 1.5 to 1.6. # 1.5.0 (December 22nd, 2018) * Added the new `latest_pa_compatibility` and `pa_v12_compatibility` feature flags, and deprecated `pa_encoding_from_string` in favour of `pa_v12_compatibility`. * Updated required dependencies: - `libpulse-sys` from 1.4 to 1.5. # 1.4.0 (November 4th, 2018) * Switched to using package-config for linking (though retaining the direct linking as a fallback for those without the necessary *.pc files installed). Thanks to @JohnAZoidberg on github for the original patch. * Clarified `pa_encoding_from_string` feature purpose. * Updated required dependencies: - `libpulse-sys` from 1.3 to 1.4. # 1.3.4 (October 8th, 2018) * Fixed broken attempt to include license file in bundled package. # 1.3.3 (October 8th, 2018) * Added dedicated changelog, split off from the old single project overview one. * Included copy of license file in bundled package and excluded the `.gitignore` file. # 1.3.2 (September 20th, 2018) * Fixed feature control. # 1.3.1 (September 3rd, 2018) * Added homepage and repo links, thanks to @berkus on github for the patch. * Expanded the `pa_encoding_from_string` feature to properly control it across dependencies. Thanks to @thejpster on github for reporting. # 1.3 (July 17th, 2018) * Mainloop API objects now correctly treated as immutable, per related change in version 2.1 of `libpulse-binding` and `libpulse-glib-binding`. * Updated required dependencies: - `libpulse-sys` from 1.2 to 1.3. # 1.2 (June 16th, 2018) * Updated required dependencies: - `libpulse-sys` from 1.1 to 1.2. # 1.1 (May 27th, 2018) * Updated required dependencies: - `libpulse-sys` from 1.0 to 1.1. # 1.0.2 (February 9th, 2018) * Added travis badge. # 1.0.1 (February 2nd, 2018) * Fixed toml file license string `LGPL-2.1` → `LGPL-2.1+`. * Fixed toml file missing author email address. # 1.0 (January 24th, 2018) * Original release. [issue26]: https://github.com/jnqnfe/pulse-binding-rust/issues/26 [nomicon-ros]: https://doc.rust-lang.org/nomicon/ffi.html#representing-opaque-structs libpulse-mainloop-glib-sys-1.21.1/Cargo.toml0000644000000031650000000000100143030ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" rust-version = "1.56" name = "libpulse-mainloop-glib-sys" version = "1.21.1" authors = ["Lyndon Brown "] build = "build.rs" links = "pulse-mainloop-glib" exclude = ["README.md"] description = "FFI bindings for the PulseAudio libpulse-mainloop-glib system library." homepage = "https://github.com/jnqnfe/pulse-binding-rust" readme = "README.md" keywords = [ "ffi", "pulseaudio", "glib", "audio", ] license = "MIT OR Apache-2.0" repository = "https://github.com/jnqnfe/pulse-binding-rust" [package.metadata.docs.rs] all-features = false no-default-features = true rustdoc-args = [ "--cfg", "docsrs", ] [dependencies.glib-sys] version = "0" default-features = false [dependencies.libpulse-sys] version = "1.21" default-features = false [build-dependencies.pkg-config] version = "0.3.23" [features] default = ["pa_v8"] pa_v12 = [ "pa_v8", "libpulse-sys/pa_v12", ] pa_v13 = [ "pa_v12", "libpulse-sys/pa_v13", ] pa_v14 = [ "pa_v13", "libpulse-sys/pa_v14", ] pa_v15 = [ "pa_v14", "libpulse-sys/pa_v15", ] pa_v6 = ["libpulse-sys/pa_v6"] pa_v8 = [ "pa_v6", "libpulse-sys/pa_v8", ] libpulse-mainloop-glib-sys-1.21.1/Cargo.toml.orig000064400000000000000000000023211046102023000177550ustar 00000000000000[package] edition = "2021" name = "libpulse-mainloop-glib-sys" version = "1.21.1" authors = ["Lyndon Brown "] license = "MIT OR Apache-2.0" readme = "README.md" description = "FFI bindings for the PulseAudio libpulse-mainloop-glib system library." keywords = ["ffi", "pulseaudio", "glib", "audio"] homepage = "https://github.com/jnqnfe/pulse-binding-rust" repository = "https://github.com/jnqnfe/pulse-binding-rust" exclude = ["README.md"] links = "pulse-mainloop-glib" build = "build.rs" rust-version = "1.56" [dependencies] libpulse-sys = { path = "../pulse-sys", version = "1.21", default-features = false } glib-sys = { version = "0", default-features = false } [build-dependencies] pkg-config = "0.3.23" [features] default = ["pa_v8"] # PA version compatibility selection # See the overall project `COMPATIBILITY.md` file for explanation. pa_v15 = ["pa_v14", "libpulse-sys/pa_v15"] pa_v14 = ["pa_v13", "libpulse-sys/pa_v14"] pa_v13 = ["pa_v12", "libpulse-sys/pa_v13"] pa_v12 = ["pa_v8", "libpulse-sys/pa_v12"] pa_v8 = ["pa_v6", "libpulse-sys/pa_v8"] pa_v6 = [ "libpulse-sys/pa_v6"] [package.metadata.docs.rs] all-features = false no-default-features = true rustdoc-args = ["--cfg", "docsrs"] libpulse-mainloop-glib-sys-1.21.1/LICENSE-APACHE000064400000000000000000000251371046102023000170240ustar 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. libpulse-mainloop-glib-sys-1.21.1/LICENSE-MIT000064400000000000000000000020401046102023000165200ustar 00000000000000Copyright (c) 2019 Lyndon Brown Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. libpulse-mainloop-glib-sys-1.21.1/README.md000064400000000000000000000052631046102023000163550ustar 00000000000000libpulse-mainloop-glib-sys ========================== [GitHub Workflow Status](https://github.com/jnqnfe/pulse-binding-rust/actions) [crates.io](https://crates.io/crates/libpulse-mainloop-glib-sys) [docs.rs](https://docs.rs/libpulse-mainloop-glib-sys) [min-rust-version](https://rust-lang.github.io/rfcs/2495-min-rust-version.html) FFI bindings for the PulseAudio libpulse-mainloop-glib system library. See also the higher-level [`libpulse-glib-binding`](https://crates.io/crates/libpulse-glib-binding) crate. ## Usage Add the following two crates to the dependencies specified in your `Cargo.toml` (you will likely need to use components from the main binding crate in addition to this crate itself): ```toml [dependencies] libpulse-sys = "1.0" libpulse-mainloop-glib-sys = "1.0" ``` Though you may wish to rename the crates to shorter names (for example `pulse` and `pulse_glib`) for cleaner references within your code: ```toml [dependencies] pulse = { version = "1.0", package = "libpulse-sys" } pulse_glib = { version = "1.0", package = "libpulse-mainloop-glib-sys" } ``` An alternative to that which some may prefer is: ```toml [dependencies.pulse] version = "1.0" package = "libpulse-sys" [dependencies.pulse_glib] version = "1.0" package = "libpulse-mainloop-glib-sys" ``` ### PulseAudio version compatibility The default functionality provided is support for PulseAudio version 8.0 or newer. This should be good enough for most needs, however if you _need_ to use something only available in a newer version then you can select the corresponding version compatibility feature to raise the minimum compatibility level. You can also reduce support down to even older versions if you wish. See the overall project `COMPATIBILITY.md` file for further details. ## License Licensed under either of * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) * [MIT license](http://opensource.org/licenses/MIT) at your option. ### Contribution Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. libpulse-mainloop-glib-sys-1.21.1/build.rs000064400000000000000000000051731046102023000165430ustar 00000000000000fn main() { // Skip pkg-config check if just generating documentation. if std::env::var_os("DOCS_RS").is_some() { return; } let lib_name = "libpulse-mainloop-glib"; let fallback_name = { #[cfg(target_os = "linux")] { "pulse-mainloop-glib::libpulse-mainloop-glib.so.0" } #[cfg(target_os = "macos")] { "pulse-mainloop-glib::libpulse-mainloop-glib.0.dylib" } #[cfg(windows)] { "pulse-mainloop-glib::libpulse-mainloop-glib-0.dll" } #[cfg(not(any(target_os = "linux", target_os = "macos", windows)))] { "pulse-mainloop-glib" } }; let min_version = "5.0"; let mut config = pkg_config::Config::new(); // Has the user got pkg-config and the PA pkg-config file installed (via dev package)? // This is a little crude, since impossible to reliably distinguish between pkg-config errors // (it only gives strings, and they could be translated). We perform a non-version specific // check here, and disable generation of cargo meta data, thus doing a 'exists' type check. config.cargo_metadata(false); let fallback = match config.probe(lib_name) { // We assume all failure here (being a non-version specific check) indicates no *.pc file Err(pkg_config::Error::ProbeFailure { .. }) | Err(pkg_config::Error::Failure { .. }) => { println!("cargo:warning=Pkg-config seems to not know about PulseAudio (dev package not installed?), \ trying generic fallback..."); true }, // Also allow fallback if pkg-config not installed, or disabled Err(pkg_config::Error::EnvNoPkgConfig(_)) | Err(pkg_config::Error::Command { .. }) => { println!("cargo:warning=No pkg-config or disabled, trying generic fallback..."); true }, // In all other cases we will perform a version-specfic check and honor the result _ => false, }; // If the user does not have pkg-config or the PA *.pc file (they have not installed the dev // package), then let’s try a default fallback (having to install dev packages for Rust // development is unnatural imo, ideally distros should start shipping *.pc files differently). if fallback { println!("cargo:rustc-link-lib={}", fallback_name); return; } config.cargo_metadata(true) .atleast_version(min_version); // Do version specific pkg-config check and honor result match config.probe(lib_name) { Err(e) => { println!("cargo:warning={}", e); std::process::exit(1); }, Ok(_) => {}, } } libpulse-mainloop-glib-sys-1.21.1/src/lib.rs000064400000000000000000000046361046102023000170040ustar 00000000000000// Copyright 2017 Lyndon Brown // // This file is part of the PulseAudio Rust language linking library. // // Licensed under the MIT license or the Apache license (version 2.0), at your option. You may not // copy, modify, or distribute this file except in compliance with said license. You can find copies // of these licenses either in the LICENSE-MIT and LICENSE-APACHE files, or alternatively at // and // respectively. // // Portions of documentation are copied from the LGPL 2.1+ licensed PulseAudio C headers on a // fair-use basis, as discussed in the overall project readme (available in the git repository). //! PulseAudio FFI binding for the `libpulse-mainloop-glib` system library. //! //! This crate does nothing more than offer a simple FFI binding to the C API of the [PulseAudio] //! client system library, specifically the GLIB mainloop component only. Please note that there is //! a “higher-level” binding available (the [`libpulse-glib-binding`] crate), built on top of this, //! which offers a more Rust-oriented interface. //! //! Unlike the “higher-level” binding just mentioned, virtually no documentation is provided here. //! Things that *are* documented here are typically only those directly re-exported by the //! “higher-level” binding. Please see either the equivalent documentation in that, or the //! documentation of the actual PulseAudio C header files, if you need documentation. //! //! [`libpulse-glib-binding`]: https://docs.rs/libpulse-glib-binding //! [PulseAudio]: https://en.wikipedia.org/wiki/PulseAudio #![doc( html_logo_url = "https://github.com/jnqnfe/pulse-binding-rust/raw/master/logo.svg", html_favicon_url = "https://github.com/jnqnfe/pulse-binding-rust/raw/master/favicon.ico" )] #![allow(non_camel_case_types, non_snake_case)] #![cfg_attr(docsrs, feature(doc_cfg))] extern crate libpulse_sys as pulse; extern crate glib_sys as glib; use glib::GMainContext; use pulse::mainloop::api::pa_mainloop_api; /// An opaque GLIB main loop object. #[repr(C)] pub struct pa_glib_mainloop { _private: [u8; 0] } #[rustfmt::skip] #[link(name = "pulse-mainloop-glib")] extern "C" { pub fn pa_glib_mainloop_new(c: *mut GMainContext) -> *mut pa_glib_mainloop; pub fn pa_glib_mainloop_free(g: *mut pa_glib_mainloop); pub fn pa_glib_mainloop_get_api(g: *const pa_glib_mainloop) -> *const pa_mainloop_api; }