Skip to content

Commit 01cb538

Browse files
committed
drop deprecated constants
deprecated since 2.20 and 2.21 from December 2020, replaced with bitflags or associated constants.
1 parent 3e637f1 commit 01cb538

File tree

9 files changed

+0
-371
lines changed

9 files changed

+0
-371
lines changed

pulse-binding/src/context/mod.rs

-17
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,6 @@ bitflags! {
194194
}
195195
}
196196

197-
/// Some special flags for contexts.
198-
#[deprecated(since = "2.21.0", note = "Use the associated constants on `FlagSet`.")]
199-
pub mod flags {
200-
use super::FlagSet;
201-
202-
/// No flags set.
203-
pub const NOFLAGS: FlagSet = FlagSet::NOFLAGS;
204-
/// Disable autospawning of the PulseAudio daemon if required.
205-
pub const NOAUTOSPAWN: FlagSet = FlagSet::NOAUTOSPAWN;
206-
/// Don’t fail if the daemon is not available when [`Context::connect()`] is called, instead
207-
/// enter [`State::Connecting`] state and wait for the daemon to appear.
208-
///
209-
/// [`Context::connect()`]: super::Context::connect
210-
/// [`State::Connecting`]: super::State::Connecting
211-
pub const NOFAIL: FlagSet = FlagSet::NOFAIL;
212-
}
213-
214197
impl Context {
215198
/// Instantiates a new connection context with an abstract mainloop API and an application name.
216199
///

pulse-binding/src/context/subscribe.rs

-36
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ use crate::callbacks::{box_closure_get_capi_ptr, MultiUseCallback};
5656

5757
pub use capi::context::subscribe::pa_subscription_event_type_t as EventType;
5858

59-
/// Mask to extract facility value from the event type passed to the user callback.
60-
#[deprecated(since = "2.20.0", note = "use the associated constant on `Facility` instead")]
61-
pub const FACILITY_MASK: u32 = capi::PA_SUBSCRIPTION_EVENT_FACILITY_MASK;
62-
/// Mask to extract operation value from the event type passed to the user callback.
63-
#[deprecated(since = "2.20.0", note = "use the associated constant on `Operation` instead")]
64-
pub const OPERATION_MASK: u32 = capi::PA_SUBSCRIPTION_EVENT_TYPE_MASK;
65-
6659
bitflags! {
6760
/// A set of facility masks, to be passed to [`Context::subscribe()`].
6861
///
@@ -94,35 +87,6 @@ bitflags! {
9487
}
9588
}
9689

97-
/// A set of masks used for expressing which facilities you are interested in when subscribing.
98-
#[deprecated(since = "2.20.0", note = "Use the associated constants on `InterestMaskSet`.")]
99-
pub mod subscription_masks {
100-
use super::InterestMaskSet;
101-
102-
/// No facility (null selection; zero).
103-
pub const NULL: InterestMaskSet = InterestMaskSet::NULL;
104-
/// Sink facility.
105-
pub const SINK: InterestMaskSet = InterestMaskSet::SINK;
106-
/// Source facility.
107-
pub const SOURCE: InterestMaskSet = InterestMaskSet::SOURCE;
108-
/// Sink input facility.
109-
pub const SINK_INPUT: InterestMaskSet = InterestMaskSet::SINK_INPUT;
110-
/// Source output facility.
111-
pub const SOURCE_OUTPUT: InterestMaskSet = InterestMaskSet::SOURCE_OUTPUT;
112-
/// Module facility.
113-
pub const MODULE: InterestMaskSet = InterestMaskSet::MODULE;
114-
/// Client facility.
115-
pub const CLIENT: InterestMaskSet = InterestMaskSet::CLIENT;
116-
/// Sample cache facility.
117-
pub const SAMPLE_CACHE: InterestMaskSet = InterestMaskSet::SAMPLE_CACHE;
118-
/// Server facility.
119-
pub const SERVER: InterestMaskSet = InterestMaskSet::SERVER;
120-
/// Card facility.
121-
pub const MASK_CARD: InterestMaskSet = InterestMaskSet::CARD;
122-
/// All facilities.
123-
pub const ALL: InterestMaskSet = InterestMaskSet::ALL;
124-
}
125-
12690
/// Facility component of an event.
12791
#[repr(u32)]
12892
#[derive(Debug, Copy, Clone, PartialEq, Eq)]

pulse-binding/src/def.rs

-88
Original file line numberDiff line numberDiff line change
@@ -344,52 +344,6 @@ bitflags! {
344344
}
345345
}
346346

347-
/// Special sink flags.
348-
#[deprecated(since = "2.20.0", note = "Use the associated constants on `SinkFlagSet`.")]
349-
pub mod sink_flags {
350-
use super::SinkFlagSet;
351-
352-
/// Flag to pass when no specific options are needed.
353-
pub const NOFLAGS: SinkFlagSet = SinkFlagSet::NOFLAGS;
354-
355-
/// Supports hardware volume control. This is a dynamic flag and may change at runtime after the
356-
/// sink has initialized.
357-
pub const HW_VOLUME_CTRL: SinkFlagSet = SinkFlagSet::HW_VOLUME_CTRL;
358-
359-
/// Supports latency querying.
360-
pub const LATENCY: SinkFlagSet = SinkFlagSet::LATENCY;
361-
362-
/// Is a hardware sink of some kind, in contrast to “virtual”/software sinks.
363-
pub const HARDWARE: SinkFlagSet = SinkFlagSet::HARDWARE;
364-
365-
/// Is a networked sink of some kind.
366-
pub const NETWORK: SinkFlagSet = SinkFlagSet::NETWORK;
367-
368-
/// Supports hardware mute control. This is a dynamic flag and may change at runtime after the
369-
/// sink has initialized.
370-
pub const HW_MUTE_CTRL: SinkFlagSet = SinkFlagSet::HW_MUTE_CTRL;
371-
372-
/// Volume can be translated to dB with the `From` based conversions between [`Volume`],
373-
/// [`VolumeLinear`] and [`VolumeDB`] types. This is a dynamic flag and may change at runtime
374-
/// after the sink has initialized.
375-
///
376-
/// [`Volume`]: crate::volume::Volume
377-
/// [`VolumeDB`]: crate::volume::VolumeDB
378-
/// [`VolumeLinear`]: crate::volume::VolumeLinear
379-
pub const DECIBEL_VOLUME: SinkFlagSet = SinkFlagSet::DECIBEL_VOLUME;
380-
381-
/// This sink is in flat volume mode, i.e. always the maximum of the volume of all connected
382-
/// inputs.
383-
pub const FLAT_VOLUME: SinkFlagSet = SinkFlagSet::FLAT_VOLUME;
384-
385-
/// The latency can be adjusted dynamically depending on the needs of the connected streams.
386-
pub const DYNAMIC_LATENCY: SinkFlagSet = SinkFlagSet::DYNAMIC_LATENCY;
387-
388-
/// The sink allows setting what formats are supported by the connected hardware. The actual
389-
/// functionality to do this might be provided by an extension.
390-
pub const SET_FORMATS: SinkFlagSet = SinkFlagSet::SET_FORMATS;
391-
}
392-
393347
/// Sink state.
394348
#[repr(C)]
395349
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
@@ -495,48 +449,6 @@ bitflags! {
495449
}
496450
}
497451

498-
/// Special source flags.
499-
#[deprecated(since = "2.20.0", note = "Use the associated constants on `SourceFlagSet`.")]
500-
pub mod source_flags {
501-
use super::SourceFlagSet;
502-
503-
/// Flag to pass when no specific options are needed.
504-
pub const NOFLAGS: SourceFlagSet = SourceFlagSet::NOFLAGS;
505-
506-
/// Supports hardware volume control. This is a dynamic flag and may change at runtime after the
507-
/// source has initialized.
508-
pub const HW_VOLUME_CTRL: SourceFlagSet = SourceFlagSet::HW_VOLUME_CTRL;
509-
510-
/// Supports latency querying.
511-
pub const LATENCY: SourceFlagSet = SourceFlagSet::LATENCY;
512-
513-
/// Is a hardware source of some kind, in contrast to “virtual”/software source.
514-
pub const HARDWARE: SourceFlagSet = SourceFlagSet::HARDWARE;
515-
516-
/// Is a networked source of some kind.
517-
pub const NETWORK: SourceFlagSet = SourceFlagSet::NETWORK;
518-
519-
/// Supports hardware mute control. This is a dynamic flag and may change at runtime after the
520-
/// source has initialized.
521-
pub const HW_MUTE_CTRL: SourceFlagSet = SourceFlagSet::HW_MUTE_CTRL;
522-
523-
/// Volume can be translated to dB with the `From` based conversions between [`Volume`],
524-
/// [`VolumeLinear`] and [`VolumeDB`] types. This is a dynamic flag and may change at runtime
525-
/// after the source has initialized.
526-
///
527-
/// [`Volume`]: crate::volume::Volume
528-
/// [`VolumeDB`]: crate::volume::VolumeDB
529-
/// [`VolumeLinear`]: crate::volume::VolumeLinear
530-
pub const DECIBEL_VOLUME: SourceFlagSet = SourceFlagSet::DECIBEL_VOLUME;
531-
532-
/// The latency can be adjusted dynamically depending on the needs of the connected streams.
533-
pub const DYNAMIC_LATENCY: SourceFlagSet = SourceFlagSet::DYNAMIC_LATENCY;
534-
535-
/// This source is in flat volume mode, i.e. always the maximum of the volume of all connected
536-
/// outputs.
537-
pub const FLAT_VOLUME: SourceFlagSet = SourceFlagSet::FLAT_VOLUME;
538-
}
539-
540452
/// Source state.
541453
#[repr(C)]
542454
#[derive(Debug, Copy, Clone, PartialEq, Eq)]

pulse-binding/src/direction.rs

-11
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,6 @@ bitflags! {
2929
}
3030
}
3131

32-
/// Available flags for [`FlagSet`].
33-
#[deprecated(since = "2.20.0", note = "Use the associated constants on `FlagSet`.")]
34-
pub mod flags {
35-
use super::FlagSet;
36-
37-
/// Output flag.
38-
pub const OUTPUT: FlagSet = FlagSet::OUTPUT;
39-
/// Input flag.
40-
pub const INPUT: FlagSet = FlagSet::INPUT;
41-
}
42-
4332
impl FlagSet {
4433
/// Checks whether direction is valid (either input, output or bidirectional).
4534
#[inline]

pulse-binding/src/mainloop/events/io.rs

-17
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,6 @@ bitflags! {
3838
}
3939
}
4040

41-
/// Flags for [`FlagSet`].
42-
#[deprecated(since = "2.20.0", note = "Use the associated constants on `FlagSet`.")]
43-
pub mod flags {
44-
use super::FlagSet;
45-
46-
/// No event.
47-
pub const NULL: FlagSet = FlagSet::NULL;
48-
/// Input event.
49-
pub const INPUT: FlagSet = FlagSet::INPUT;
50-
/// Output event.
51-
pub const OUTPUT: FlagSet = FlagSet::OUTPUT;
52-
/// Hangup event.
53-
pub const HANGUP: FlagSet = FlagSet::HANGUP;
54-
/// Error event.
55-
pub const ERROR: FlagSet = FlagSet::ERROR;
56-
}
57-
5841
/// An IO event source
5942
pub struct IoEvent<T>
6043
where T: MainloopInnerType

pulse-binding/src/sample.rs

-8
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ use std::borrow::Cow;
6868
use num_derive::{FromPrimitive, ToPrimitive};
6969
use crate::time::MicroSeconds;
7070

71-
/// Maximum number of allowed channels.
72-
#[deprecated(since = "2.20.0", note = "use associated constants on structs instead")]
73-
pub const CHANNELS_MAX: u8 = capi::PA_CHANNELS_MAX;
74-
75-
/// Maximum allowed sample rate.
76-
#[deprecated(since = "2.20.0", note = "use the associated constant on `Spec` instead")]
77-
pub const RATE_MAX: u32 = capi::PA_RATE_MAX;
78-
7971
/// Sample format.
8072
///
8173
/// Note, native-endian (endian-independent) associated constants are available on this type which

0 commit comments

Comments
 (0)