Class CpimMessage
Class for Common Profile for Instant Messaging (CPIM) messages defined by RFC 3862. CPIM messages are not used in standalone manner in NG9-1-1 applications. They are always encapsulated in MSRP messages.
Inherited Members
Namespace: SipLib.Msrp
Assembly: SipLib.dll
Syntax
public class CpimMessage
Constructors
| Edit this page View SourceCpimMessage()
Default constructor
Declaration
public CpimMessage()
Fields
| Edit this page View SourceNS
Gets or sets the list of Name Space (NS) headers. Optional. Initialized to an empty string. NS headers are not used in this implementation and are treated as simple strings.
Declaration
public List<string> NS
Field Value
Type | Description |
---|---|
List<string> |
NonStandardHeaders
Stores unknown or non-standard headers lines (header: headervalue). Initialized to an empty list.
Declaration
public List<string> NonStandardHeaders
Field Value
Type | Description |
---|---|
List<string> |
Properties
| Edit this page View SourceBody
Gets or sets the contents (body) of the message.
Declaration
public byte[]? Body { get; set; }
Property Value
Type | Description |
---|---|
byte[] |
ContentID
Gets or set the Content-ID header value. Optional.
Declaration
public string? ContentID { get; set; }
Property Value
Type | Description |
---|---|
string |
ContentType
Gets or sets the Content-Type header value. Required. Must be set to a valid MIME type such as text/plain.
Declaration
public string? ContentType { get; set; }
Property Value
Type | Description |
---|---|
string |
DateTime
Gets or sets the value of the DateTime header field. Optional. A value of DateTime.MinValue indicates that the DateTime header is not present.
Declaration
public DateTime DateTime { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
From
Gets or sets the From header. Required.
Declaration
public SIPUserField? From { get; set; }
Property Value
Type | Description |
---|---|
SIPUserField |
Require
Gets or sets the value of the Require header field. Optional.
Declaration
public string? Require { get; set; }
Property Value
Type | Description |
---|---|
string |
Subject
Gets or sets the a list of Subject header values. Optional. Initialized to an empty list.
Declaration
public List<string> Subject { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
To
Gets or sets a list of To header fields. Initialized to an empty list. The list must contain at least one To header
Declaration
public List<SIPUserField> To { get; set; }
Property Value
Type | Description |
---|---|
List<SIPUserField> |
cc
Gets or sets the list of cc header fields. Initialized to an empty list. cc headers are optional.
Declaration
public List<SIPUserField> cc { get; set; }
Property Value
Type | Description |
---|---|
List<SIPUserField> |
Methods
| Edit this page View SourceParseCpimBytes(byte[])
Parses a CPIM message contained in a byte array.
Declaration
public static CpimMessage? ParseCpimBytes(byte[] cpimBytes)
Parameters
Type | Name | Description |
---|---|---|
byte[] | cpimBytes | Input message |
Returns
Type | Description |
---|---|
CpimMessage | Returns a new CpimMessage object if successful or null is a parsing error occurred |
ToByteArray()
Converts this object into a byte array so that it may be encapsulated in a MSRP message.
Declaration
public byte[] ToByteArray()
Returns
Type | Description |
---|---|
byte[] | Returns a UTF8 encoded byte array. |