pub trait Device: AsRawFd {
fn get_auth_token(&self) -> Result<AuthToken> { ... }
fn set_client_cap(&self, cap: ClientCapability, set: bool) -> Result<()> { ... }
fn set_master(&self) -> Result<()> { ... }
fn drop_master(&self) -> Result<()> { ... }
}
Expand description
A trait for all DRM devices.
Provided Methods§
sourcefn get_auth_token(&self) -> Result<AuthToken>
fn get_auth_token(&self) -> Result<AuthToken>
Generates and returns a magic token unique to the current process.
This token can be used to authenticate with the DRM Master.
sourcefn set_client_cap(&self, cap: ClientCapability, set: bool) -> Result<()>
fn set_client_cap(&self, cap: ClientCapability, set: bool) -> Result<()>
Tells the DRM device whether we understand or do not understand a particular capability.
Some features, such as atomic modesetting, require informing the device that the process can use such features before it will expose them.
sourcefn set_master(&self) -> Result<()>
fn set_master(&self) -> Result<()>
Attempts to acquire the DRM Master lock.
sourcefn drop_master(&self) -> Result<()>
fn drop_master(&self) -> Result<()>
Attempts to release the DRM Master lock.