[][src]Struct libsip::InviteHelper

pub struct InviteHelper {
    pub uri: Uri,
    pub headers: Headers,
    pub body: Vec<u8>,
}

Structure to ease getting data from a Sip INVITE request. Also is used to generate the appropiate Ringing and Ok responses.

Fields

uri: Uriheaders: Headersbody: Vec<u8>

Implementations

impl InviteHelper[src]

pub fn from(&self) -> IoResult<NamedHeader>[src]

Retrieve value of the $variant header.

pub fn to(&self) -> IoResult<NamedHeader>[src]

Retrieve value of the $variant header.

pub fn call_id(&self) -> IoResult<String>[src]

Retrieve value of the $variant header.

pub fn via(&self) -> IoResult<ViaHeader>[src]

Retrieve value of the $variant header.

pub fn new(msg: SipMessage) -> IoResult<InviteHelper>[src]

Create a InviteHelper from the given SipMessage.

pub fn new_from_vars(
    uri: Uri,
    headers: Headers,
    body: Vec<u8>
) -> IoResult<InviteHelper>
[src]

Create an InviteHelper from the given variables.

pub fn data(&self) -> Vec<u8>[src]

Return a clone of the body of this message.

pub fn ringing(&self, header_cfg: &HeaderWriteConfig) -> IoResult<SipMessage>[src]

Get A Ringing(180) request to answer this invite.

pub fn accept(
    &self,
    sdp: Vec<u8>,
    header_cfg: &HeaderWriteConfig
) -> IoResult<SipMessage>
[src]

Generate a response that will accept the invite with the sdp as the body.

pub fn bye(&self, header_cfg: &HeaderWriteConfig) -> IoResult<SipMessage>[src]

Generate a Bye response for this Invite Request.

pub fn check_cseq(&self, cseq: u32) -> IoResult<bool>[src]

Verify the CSeq header is equal to cseq.

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

Get the messages required to cancel a invitation.

Trait Implementations

impl Debug for InviteHelper[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, 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>,