/// <summary> /// Parses this from address param string. /// </summary> /// <param name="reader">Reader what contains address param string.</param> /// <exception cref="ArgumentNullException">Raised when <b>reader</b> is null.</exception> /// <exception cref="SIP_ParseException">Raised when invalid SIP message.</exception> public override void Parse(StringReader reader) { if (reader == null) { throw new ArgumentNullException("reader"); } // Parse address SIP_t_NameAddress address = new SIP_t_NameAddress(); address.Parse(reader); m_pAddress = address; // Parse parameters. ParseParameters(reader); }
/// <summary> /// Parses "contact-param" from specified reader. /// </summary> /// <param name="reader">Reader from where to parse.</param> /// <exception cref="ArgumentNullException">Raised when <b>reader</b> is null.</exception> /// <exception cref="SIP_ParseException">Raised when invalid SIP message.</exception> public override void Parse(StringReader reader) { /* * Contact = ("Contact" / "m" ) HCOLON * ( STAR / (contact-param *(COMMA contact-param))) * contact-param = (name-addr / addr-spec) *(SEMI contact-params) * name-addr = [ display-name ] LAQUOT addr-spec RAQUOT * addr-spec = SIP-URI / SIPS-URI / absoluteURI * display-name = *(token LWS)/ quoted-string * * contact-params = c-p-q / c-p-expires / contact-extension * c-p-q = "q" EQUAL qvalue * c-p-expires = "expires" EQUAL delta-seconds * contact-extension = generic-param * delta-seconds = 1*DIGIT * * When the header field value contains a display name, the URI including all URI * parameters is enclosed in "<" and ">". If no "<" and ">" are present, all * parameters after the URI are header parameters, not URI parameters. * * Even if the "display-name" is empty, the "name-addr" form MUST be * used if the "addr-spec" contains a comma, semicolon, or question * mark. There may or may not be LWS between the display-name and the "<". */ if (reader == null) { throw new ArgumentNullException("reader"); } // Parse address SIP_t_NameAddress address = new SIP_t_NameAddress(); address.Parse(reader); m_pAddress = address; // Parse parameters ParseParameters(reader); }
/// <summary> /// Parses "hi-entry" from specified reader. /// </summary> /// <param name="reader">Reader from where to parse.</param> /// <exception cref="ArgumentNullException">Raised when <b>reader</b> is null.</exception> /// <exception cref="SIP_ParseException">Raised when invalid SIP message.</exception> public override void Parse(StringReader reader) { /* * hi-entry = hi-targeted-to-uri *( SEMI hi-param ) * hi-targeted-to-uri= name-addr * hi-param = hi-index / hi-extension * hi-index = "index" EQUAL 1*DIGIT *(DOT 1*DIGIT) * hi-extension = generic-param */ if (reader == null) { throw new ArgumentNullException("reader"); } // name-addr m_pAddress = new SIP_t_NameAddress(); m_pAddress.Parse(reader); // Parse parameters ParseParameters(reader); }
/// <summary> /// Default constructor. /// </summary> /// <param name="value">SIP 'Referred-By' value.</param> public SIP_t_ReferredBy(string value) { m_pAddress = new SIP_t_NameAddress(); Parse(value); }
/// <summary> /// Default constructor. /// </summary> public SIP_t_ContactParam() { m_pAddress = new SIP_t_NameAddress(); }
/// <summary> /// Default constructor. /// </summary> /// <param name="address">To address.</param> public SIP_t_To(SIP_t_NameAddress address) { m_pAddress = address; }
/// <summary> /// Default constructor. /// </summary> /// <param name="value">To: header field value.</param> public SIP_t_To(string value) { m_pAddress = new SIP_t_NameAddress(); Parse(new StringReader(value)); }
/// <summary> /// Default constructor. /// </summary> /// <param name="address">From address.</param> public SIP_t_From(SIP_t_NameAddress address) { m_pAddress = address; }