Liblinphone  5.5.0
Linphone.Content Class Reference
Inheritance diagram for Linphone.Content:
Linphone.LinphoneObject

Public Member Functions

void AddContentTypeParameter (string name, string val)
 
void AddCustomHeader (string headerName, string headerValue)
 
string ExportPlainFile ()
 
Linphone.Content FindPartByHeader (string headerName, string headerValue)
 
string GetCustomHeader (string headerName)
 
Linphone.Content GetPart (int index)
 
void SetBuffer (uint buffer, long size)
 
void SetKey (string key, long keyLength)
 

Properties

uint Buffer [get]
 
long CreationTimestamp [get]
 
string Disposition [get, set]
 
string Encoding [get, set]
 
int FileDuration [get, set]
 
string FilePath [get, set]
 
long FileSize [get]
 
bool IsFile [get]
 
bool IsFileEncrypted [get]
 
bool IsFileTransfer [get]
 
bool IsIcalendar [get]
 
bool IsMultipart [get]
 
bool IsText [get]
 
bool IsVoiceRecording [get]
 
string Key [get]
 
long KeySize [get]
 
string Name [get, set]
 
IEnumerable< Linphone.ContentParts [get]
 
string PlainFilePath [get]
 
string RelatedChatMessageId [get]
 
long Size [get, set]
 
string StringBuffer [get, set]
 
string Subtype [get, set]
 
string Type [get, set]
 
string Utf8Text [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from Linphone.LinphoneObject
static String linphone_pointer_to_string (IntPtr ptr)
 
static IntPtr linphone_string_to_pointer ([MarshalAs(LinphoneWrapper.ByteStringMarshalling)] String str)
 
IntPtr StringArrayToBctbxList (IEnumerable< string > stringlist)
 
void CleanStringArrayPtrs (IntPtr l)
 

Detailed Description

This object holds data that can be embedded in a signaling message or IM message.

Use Linphone.Core.CreateContent() to create it, and then you should set at least it's type and subtype and fill the buffer with your data. A Linphone.Content can be multipart (contain other contents), have file information (name, path, size), be encrypted, have custom headers, etc...

Member Function Documentation

void Linphone.Content.AddContentTypeParameter ( string  name,
string  val 
)
inline

Adds a parameter to the ContentType header.

Parameters
namethe name of the parameter to add.
valthe value of the parameter to add.
void Linphone.Content.AddCustomHeader ( string  headerName,
string  headerValue 
)
inline

Adds a custom header in a content.

Parameters
headerNameThe name of the header to add.
headerValueThe value of the header to add.
string Linphone.Content.ExportPlainFile ( )
inline

Generates a temporary plain copy of the file and returns its paths The caller is responsible to then delete this temporary copy and the returned string.

Returns
The file path set for this content if it has been set, null otherwise.
Linphone.Content Linphone.Content.FindPartByHeader ( string  headerName,
string  headerValue 
)
inline

Find a part from a multipart content looking for a part header with a specified value.

Parameters
headerNameThe name of the header to look for.
headerValueThe value of the header to look for.
Returns
A Linphone.Content object object the part if found, null otherwise.
string Linphone.Content.GetCustomHeader ( string  headerName)
inline

Get a custom header value of a content.

Parameters
headerNameThe name of the header to get the value from.
Returns
The value of the header if found, null otherwise.
Linphone.Content Linphone.Content.GetPart ( int  index)
inline

Get a part from a multipart content according to its index.

Parameters
indexThe index of the part to get.
Returns
A Linphone.Content object holding the part if found, null otherwise.
void Linphone.Content.SetBuffer ( uint  buffer,
long  size 
)
inline

Set the content data buffer, usually a string.

Parameters
bufferThe content data buffer.
sizeThe size of the content data buffer.
void Linphone.Content.SetKey ( string  key,
long  keyLength 
)
inline

Set the key associated with a RCS file transfer message if encrypted.

Parameters
keyThe key to be used to encrypt/decrypt file associated to this content.
keyLengthThe lengh of the key.

Property Documentation

uint Linphone.Content.Buffer
get

Get the content data buffer, usually a string.

Returns
The content data buffer.
long Linphone.Content.CreationTimestamp
get

Returns the creation timestamp if this content is a FileContent (received or sent by chat).

Returns
The timestamp at which this content was created if available, -1 otherwise.
string Linphone.Content.Disposition
getset

Get the disposition of the Content, for example "recipient-list".

Returns
The disposition of the Content.
string Linphone.Content.Encoding
getset

Get the encoding of the data buffer, for example "gzip".

Returns
The encoding of the data buffer.
int Linphone.Content.FileDuration
getset

Gets the file duration in seconds, if information is available.

Returns
The duration of the file in milliseconds or -1 if information isn't available.
string Linphone.Content.FilePath
getset

Get the file transfer filepath set for this content (replace linphone_chat_message_get_file_transfer_filepath).

Returns
The file path set for this content if it has been set, null otherwise.
long Linphone.Content.FileSize
get

Get the file size if content is either a FileContent or a FileTransferContent.

Returns
The represented file size.
bool Linphone.Content.IsFile
get

Tells whether or not this content contains a file.

Returns
true if this content contains a file, false otherwise.
bool Linphone.Content.IsFileEncrypted
get

Tells whether or not this content contains an encrypted file.

Returns
True is this content contains a file and this file is encrypted, false otherwise.
bool Linphone.Content.IsFileTransfer
get

Tells whether or not this content is a file transfer.

Returns
true if this content is a file transfer, false otherwise.
bool Linphone.Content.IsIcalendar
get

Tells whether or not this content contains an icalendar by checking it's content type.

Returns
true if this content type is 'text/calendar;conference-event=yes', false otherwise.
bool Linphone.Content.IsMultipart
get

Tell whether a content is a multipart content.

Returns
A boolean value telling whether the content is multipart or not.
bool Linphone.Content.IsText
get

Tells whether or not this content contains text.

Returns
true if this content contains plain text, false otherwise.
bool Linphone.Content.IsVoiceRecording
get

Tells whether or not this content contains a voice recording by checking it's content type.

Returns
true if this content type is 'audio/wav;voice-recording=yes', false otherwise.
string Linphone.Content.Key
get

Get the key associated with a RCS file transfer message if encrypted.

Returns
The key to encrypt/decrypt the file associated to this content.
long Linphone.Content.KeySize
get

Get the size of key associated with a RCS file transfer message if encrypted.

Returns
The key size in bytes
string Linphone.Content.Name
getset

Get the name associated with a RCS file transfer message.

It is used to store the original filename of the file to be downloaded from server.

Returns
The name of the content.
IEnumerable<Linphone.Content> Linphone.Content.Parts
get

Get all the parts from a multipart content.

Returns
A A list of Linphone.Content objects. object holding the part if found, null otherwise.
string Linphone.Content.PlainFilePath
get

Generates a temporary plain copy of the file and returns its paths The caller is responsible to then delete this temporary copy and the returned string.

Returns
The file path set for this content if it has been set, null otherwise.

Deprecated : 2022-01-07. Use Linphone.Content.ExportPlainFile() instead.

string Linphone.Content.RelatedChatMessageId
get

Returns the chat message id for which this content is related to, if any.

Returns
The chat message ID if this content is related to a chat message, null otherwise.
long Linphone.Content.Size
getset

Get the content data buffer size, excluding null character despite null character is always set for convenience.

Returns
The content data buffer size.
string Linphone.Content.StringBuffer
getset

Get the string content data buffer.

Returns
The string content data buffer.

Deprecated : 2020-07-01. Use Linphone.Content.Utf8Text instead.

string Linphone.Content.Subtype
getset

Get the mime subtype of the content data.

Returns
The mime subtype of the content data, for example "html".
string Linphone.Content.Type
getset

Get the mime type of the content data.

Returns
The mime type of the content data, for example "application".
string Linphone.Content.Utf8Text
getset

Get the string content data buffer.

Introduced in 01/07/2020

Returns
The string content data buffer in UTF8.

The documentation for this class was generated from the following file: