// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie // SPDX-License-Identifier: MIT //! MPRIS for Zig: a media player's side of the Media Player Remote //! Interfacing Specification, the D-Bus interfaces through which desktop //! shells, media keys, `playerctl` and the like see and control players. //! //! A program describes what it is doing as a `State` whenever asked, and //! says what it can do with the commands of a `Server.Player`. The `Server` //! serves `org.mpris.MediaPlayer2` and its `Player`, `TrackList` and //! `Playlists` interfaces from that, and works out from one snapshot to the //! next what to tell the bus. //! //! ```zig //! var connection = try mdbus.Connection.connectSession(io, gpa, environ); //! const server = try mpris.Server.create(gpa, io, &connection, .{ //! .name = "myplayer", //! .identity = "My Player", //! .desktop_entry = "myplayer", //! }, .{ .context = &app, .snapshot = snapshot, .play_pause = playPause }); //! defer server.destroy(); //! try server.start(); //! // server.run() on a thread of its own; server.update() when anything changes //! ``` const std = @import("std"); const state = @import("state.zig"); pub const State = state.State; pub const Metadata = state.Metadata; pub const Playlist = state.Playlist; pub const PlaybackStatus = state.PlaybackStatus; pub const LoopStatus = state.LoopStatus; pub const no_track = state.no_track; pub const trackId = state.trackId; /// An MPRIS player on the session bus. pub const Server = @import("Server.zig"); test { std.testing.refAllDecls(@This()); _ = state; _ = &Server.create; _ = &Server.start; _ = &Server.run; _ = &Server.update; }