Class SdpAttribute
Class for processing the Attributes "a=" type of the SDP contents. See Section 5.13 of RFC 4566.
Inherited Members
Namespace: SipLib.Sdp
Assembly: SipLib.dll
Syntax
public class SdpAttribute
Constructors
| Edit this page View SourceSdpAttribute()
Constructs a new, empty SdpAttribute object. Use this constructor when for attribute objects for SDP contents of a new SIP message.
Declaration
public SdpAttribute()
SdpAttribute(string, string?)
Constructs a new SdpAttribute given the attribute name and the value.
Declaration
public SdpAttribute(string AttrName, string? AttrValue)
Parameters
Type | Name | Description |
---|---|---|
string | AttrName | Name of the attribute. |
string | AttrValue | Value of the attribute |
Fields
| Edit this page View SourceAttribute
Contains the attribute name.
Declaration
public string Attribute
Field Value
Type | Description |
---|---|
string |
Params
Contains the parameters for the SDP a= attribute. This dictionary will be empty if there are no parameters. The key is the name of the parameter and the value is the parameter value. The parameter value may be null or empty if there is no associated value for the parameter name.
Declaration
public Dictionary<string, string> Params
Field Value
Type | Description |
---|---|
Dictionary<string, string> |
Value
Contains the attribute value. This string may be empty or null if the attribute does not have a value.
Declaration
public string? Value
Field Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceCreateCopy()
Creates a copy of this object.
Declaration
public SdpAttribute CreateCopy()
Returns
Type | Description |
---|---|
SdpAttribute | A new object with a copy of each member variable. |
GetAttributeParameter(string, ref string?)
Gets the parameter value for a named parameter for this SDP attribute.
Declaration
public bool GetAttributeParameter(string strParamName, ref string? strValue)
Parameters
Type | Name | Description |
---|---|---|
string | strParamName | Name of the SDP attribute parameter to search for. |
string | strValue | Output. Value of the parameter. This may be null or empty if the named parameter is not found or if the parameter has no associated value. |
Returns
Type | Description |
---|---|
bool | Returns true if the parameter named in strParameter is found or false if it is not. |
ParseSdpAttribute(string)
Parses the input string and Constructs a new SdpAttribute object from the attribute information received in the SDP contents of a SIP message.
Declaration
public static SdpAttribute ParseSdpAttribute(string strAttributeIn)
Parameters
Type | Name | Description |
---|---|---|
string | strAttributeIn | The format must be either "Attribute" or "Attribute:Value". |
Returns
Type | Description |
---|---|
SdpAttribute | A new SdpAttribute object. |
ToString()
Converts the SdpAttribute object to a string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The format is either "a=Attribute:Value\r\n" or "a=Attribute\r\n". |