[][src]Struct libsip::RegistrationManager

pub struct RegistrationManager { /* fields omitted */ }

Handle's the SIP registration process. This structure is designed to handle the authentication process from a SoftPhone's point of view.

Currently only Digest auth authentication is implemented.

Implementations

impl RegistrationManager[src]

pub fn new(account_uri: Uri, local_uri: Uri) -> RegistrationManager[src]

Create a new Registration Manager typically this will happen once in a program's lifecycle. account_uri is the sip uri used to authenticate with and local_uri is the sip uri of the listening socket.

pub fn username<S: Into<String>>(&mut self, s: S)[src]

Set the username used in the authentication process.

pub fn password<S: Into<String>>(&mut self, p: S)[src]

Set the password used in the authentication process.

pub fn get_request(&mut self, cfg: &HeaderWriteConfig) -> IoResult<SipMessage>[src]

Get the register request. if this method is called before set_challenge then no authentication header will be set, if called after set_challenge then the Authorization header will be set.

pub fn set_challenge(&mut self, msg: SipMessage) -> IoResult<()>[src]

After the first register request is sent. pass the received sip response to this function to perform compute the hashed password.

pub fn expires(&self) -> u32[src]

Retreive the expires header value.

pub fn cseq(&self) -> u32[src]

Retreive the current cseq counter.

pub fn via_header(&self) -> Header[src]

Retreive the via header being used to represent the local listening socket.

Trait Implementations

impl Clone for RegistrationManager[src]

impl Debug for RegistrationManager[src]

impl PartialEq<RegistrationManager> for RegistrationManager[src]

impl StructuralPartialEq for RegistrationManager[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,