pub trait PushService {
// Required methods
fn provider(&self) -> &str;
fn prid(&self) -> &str;
// Provided methods
fn param(&self) -> Option<&str> { ... }
fn device(&self) -> Result<Device, BuildError> { ... }
}Expand description
The push notification service a device can be woken through (§3).
sipx implements this nowhere, and that is deliberate. Waking a device means speaking some vendor’s HTTP API over some vendor’s credentials, on a schedule that vendor sets — none of which is SIP, and all of which would date faster than the rest of this crate. What sipx needs from a push service is three strings, and this is them.
An implementation is an adapter the application writes over whatever it already uses to reach its push service. The tests use a stub for the same reason: there is nothing here that a real implementation would exercise differently.
Required Methods§
Sourcefn provider(&self) -> &str
fn provider(&self) -> &str
The pn-provider value naming this service (§8.7).
A value from the registry §8.8 creates. It is the name the registrar has to recognise, so
inventing one produces a binding nothing will ever wake — see Support::supports.