• Api Documentation
Show / Hide Table of Contents
  • Linphone
    • Account
    • AccountCreator
    • AccountCreatorActivationCodeStatus
    • AccountCreatorAlgoStatus
    • AccountCreatorBackend
    • AccountCreatorDomainStatus
    • AccountCreatorEmailStatus
    • AccountCreatorLanguageStatus
    • AccountCreatorListener
    • AccountCreatorListener.OnAccountCreationRequestTokenDelegate
    • AccountCreatorListener.OnAccountCreationTokenUsingRequestTokenDelegate
    • AccountCreatorListener.OnActivateAccountDelegate
    • AccountCreatorListener.OnActivateAliasDelegate
    • AccountCreatorListener.OnCreateAccountDelegate
    • AccountCreatorListener.OnIsAccountActivatedDelegate
    • AccountCreatorListener.OnIsAccountExistDelegate
    • AccountCreatorListener.OnIsAccountLinkedDelegate
    • AccountCreatorListener.OnIsAliasUsedDelegate
    • AccountCreatorListener.OnLinkAccountDelegate
    • AccountCreatorListener.OnLoginLinphoneAccountDelegate
    • AccountCreatorListener.OnRecoverAccountDelegate
    • AccountCreatorListener.OnSendTokenDelegate
    • AccountCreatorListener.OnUpdateAccountDelegate
    • AccountCreatorPasswordStatus
    • AccountCreatorPhoneNumberStatus
    • AccountCreatorStatus
    • AccountCreatorTransportStatus
    • AccountCreatorUsernameStatus
    • AccountListener
    • AccountListener.OnRegistrationStateChangedDelegate
    • AccountParams
    • Address
    • AddressFamily
    • AudioDevice
    • AudioDeviceCapabilities
    • AudioDeviceType
    • AuthInfo
    • AuthMethod
    • AVPFMode
    • Buffer
    • Call
    • CallDir
    • CallListener
    • CallListener.OnAckProcessingDelegate
    • CallListener.OnAudioDeviceChangedDelegate
    • CallListener.OnCameraNotWorkingDelegate
    • CallListener.OnDtmfReceivedDelegate
    • CallListener.OnEncryptionChangedDelegate
    • CallListener.OnGoclearAckSentDelegate
    • CallListener.OnInfoMessageReceivedDelegate
    • CallListener.OnNextVideoFrameDecodedDelegate
    • CallListener.OnReceiveMasterKeyChangedDelegate
    • CallListener.OnRemoteRecordingDelegate
    • CallListener.OnSendMasterKeyChangedDelegate
    • CallListener.OnSnapshotTakenDelegate
    • CallListener.OnStateChangedDelegate
    • CallListener.OnStatsUpdatedDelegate
    • CallListener.OnTmmbrReceivedDelegate
    • CallListener.OnTransferStateChangedDelegate
    • CallListener.OnVideoDisplayErrorOccurredDelegate
    • CallLog
    • CallParams
    • CallState
    • CallStats
    • CallStatus
    • ChatMessage
    • ChatMessageDirection
    • ChatMessageListener
    • ChatMessageListener.OnEphemeralMessageDeletedDelegate
    • ChatMessageListener.OnEphemeralMessageTimerStartedDelegate
    • ChatMessageListener.OnFileTransferProgressIndicationDelegate
    • ChatMessageListener.OnFileTransferRecvDelegate
    • ChatMessageListener.OnFileTransferSendChunkDelegate
    • ChatMessageListener.OnFileTransferSendDelegate
    • ChatMessageListener.OnMsgStateChangedDelegate
    • ChatMessageListener.OnParticipantImdnStateChangedDelegate
    • ChatMessageState
    • ChatRoom
    • ChatRoomBackend
    • ChatRoomCapabilities
    • ChatRoomEncryptionBackend
    • ChatRoomEphemeralMode
    • ChatRoomListener
    • ChatRoomListener.OnChatMessageParticipantImdnStateChangedDelegate
    • ChatRoomListener.OnChatMessageReceivedDelegate
    • ChatRoomListener.OnChatMessageSendingDelegate
    • ChatRoomListener.OnChatMessageSentDelegate
    • ChatRoomListener.OnChatMessageShouldBeStoredDelegate
    • ChatRoomListener.OnChatMessagesReceivedDelegate
    • ChatRoomListener.OnConferenceAddressGenerationDelegate
    • ChatRoomListener.OnConferenceJoinedDelegate
    • ChatRoomListener.OnConferenceLeftDelegate
    • ChatRoomListener.OnEphemeralEventDelegate
    • ChatRoomListener.OnEphemeralMessageDeletedDelegate
    • ChatRoomListener.OnEphemeralMessageTimerStartedDelegate
    • ChatRoomListener.OnIsComposingReceivedDelegate
    • ChatRoomListener.OnMessageReceivedDelegate
    • ChatRoomListener.OnMessagesReceivedDelegate
    • ChatRoomListener.OnNewEventDelegate
    • ChatRoomListener.OnNewEventsDelegate
    • ChatRoomListener.OnParticipantAddedDelegate
    • ChatRoomListener.OnParticipantAdminStatusChangedDelegate
    • ChatRoomListener.OnParticipantDeviceAddedDelegate
    • ChatRoomListener.OnParticipantDeviceMediaAvailabilityChangedDelegate
    • ChatRoomListener.OnParticipantDeviceRemovedDelegate
    • ChatRoomListener.OnParticipantDeviceStateChangedDelegate
    • ChatRoomListener.OnParticipantRegistrationSubscriptionRequestedDelegate
    • ChatRoomListener.OnParticipantRegistrationUnsubscriptionRequestedDelegate
    • ChatRoomListener.OnParticipantRemovedDelegate
    • ChatRoomListener.OnSecurityEventDelegate
    • ChatRoomListener.OnStateChangedDelegate
    • ChatRoomListener.OnSubjectChangedDelegate
    • ChatRoomListener.OnUndecryptableMessageReceivedDelegate
    • ChatRoomParams
    • ChatRoomSecurityLevel
    • ChatRoomState
    • Conference
    • ConferenceInfo
    • ConferenceInfoState
    • ConferenceJoiningMode
    • ConferenceLayout
    • ConferenceListener
    • ConferenceListener.OnActiveSpeakerParticipantDeviceDelegate
    • ConferenceListener.OnAudioDeviceChangedDelegate
    • ConferenceListener.OnAvailableMediaChangedDelegate
    • ConferenceListener.OnParticipantAddedDelegate
    • ConferenceListener.OnParticipantAdminStatusChangedDelegate
    • ConferenceListener.OnParticipantDeviceAddedDelegate
    • ConferenceListener.OnParticipantDeviceIsMutedDelegate
    • ConferenceListener.OnParticipantDeviceIsSpeakingChangedDelegate
    • ConferenceListener.OnParticipantDeviceMediaAvailabilityChangedDelegate
    • ConferenceListener.OnParticipantDeviceMediaCapabilityChangedDelegate
    • ConferenceListener.OnParticipantDeviceRemovedDelegate
    • ConferenceListener.OnParticipantDeviceStateChangedDelegate
    • ConferenceListener.OnParticipantRemovedDelegate
    • ConferenceListener.OnStateChangedDelegate
    • ConferenceListener.OnSubjectChangedDelegate
    • ConferenceParams
    • ConferenceParticipantListType
    • ConferenceScheduler
    • ConferenceSchedulerListener
    • ConferenceSchedulerListener.OnInvitationsSentDelegate
    • ConferenceSchedulerListener.OnStateChangedDelegate
    • ConferenceSchedulerState
    • ConferenceState
    • Config
    • ConfiguringState
    • ConsolidatedPresence
    • Content
    • Core
    • Core.MSOglContextInfo
    • CoreListener
    • CoreListener.OnAccountRegistrationStateChangedDelegate
    • CoreListener.OnAudioDeviceChangedDelegate
    • CoreListener.OnAudioDevicesListUpdatedDelegate
    • CoreListener.OnAuthenticationRequestedDelegate
    • CoreListener.OnBuddyInfoUpdatedDelegate
    • CoreListener.OnCallCreatedDelegate
    • CoreListener.OnCallEncryptionChangedDelegate
    • CoreListener.OnCallGoclearAckSentDelegate
    • CoreListener.OnCallIdUpdatedDelegate
    • CoreListener.OnCallLogUpdatedDelegate
    • CoreListener.OnCallReceiveMasterKeyChangedDelegate
    • CoreListener.OnCallSendMasterKeyChangedDelegate
    • CoreListener.OnCallStateChangedDelegate
    • CoreListener.OnCallStatsUpdatedDelegate
    • CoreListener.OnChatRoomEphemeralMessageDeletedDelegate
    • CoreListener.OnChatRoomReadDelegate
    • CoreListener.OnChatRoomSessionStateChangedDelegate
    • CoreListener.OnChatRoomStateChangedDelegate
    • CoreListener.OnChatRoomSubjectChangedDelegate
    • CoreListener.OnConferenceInfoReceivedDelegate
    • CoreListener.OnConferenceStateChangedDelegate
    • CoreListener.OnConfiguringStatusDelegate
    • CoreListener.OnDtmfReceivedDelegate
    • CoreListener.OnEcCalibrationAudioInitDelegate
    • CoreListener.OnEcCalibrationAudioUninitDelegate
    • CoreListener.OnEcCalibrationResultDelegate
    • CoreListener.OnFirstCallStartedDelegate
    • CoreListener.OnFriendListCreatedDelegate
    • CoreListener.OnFriendListRemovedDelegate
    • CoreListener.OnGlobalStateChangedDelegate
    • CoreListener.OnImeeUserRegistrationDelegate
    • CoreListener.OnInfoReceivedDelegate
    • CoreListener.OnIsComposingReceivedDelegate
    • CoreListener.OnLastCallEndedDelegate
    • CoreListener.OnLogCollectionUploadProgressIndicationDelegate
    • CoreListener.OnLogCollectionUploadStateChangedDelegate
    • CoreListener.OnMessageReceivedDelegate
    • CoreListener.OnMessageReceivedUnableDecryptDelegate
    • CoreListener.OnMessageSentDelegate
    • CoreListener.OnMessagesReceivedDelegate
    • CoreListener.OnNetworkReachableDelegate
    • CoreListener.OnNewSubscriptionRequestedDelegate
    • CoreListener.OnNotifyPresenceReceivedDelegate
    • CoreListener.OnNotifyPresenceReceivedForUriOrTelDelegate
    • CoreListener.OnNotifyReceivedDelegate
    • CoreListener.OnNotifySentDelegate
    • CoreListener.OnPreviewDisplayErrorOccurredDelegate
    • CoreListener.OnPublishStateChangedDelegate
    • CoreListener.OnPushNotificationReceivedDelegate
    • CoreListener.OnQrcodeFoundDelegate
    • CoreListener.OnReferReceivedDelegate
    • CoreListener.OnRegistrationStateChangedDelegate
    • CoreListener.OnSubscribeReceivedDelegate
    • CoreListener.OnSubscriptionStateChangedDelegate
    • CoreListener.OnTransferStateChangedDelegate
    • CoreListener.OnVersionUpdateCheckResultReceivedDelegate
    • CoreLogCollectionUploadState
    • DialPlan
    • DigestAuthenticationPolicy
    • EcCalibratorStatus
    • ErrorInfo
    • Event
    • EventListener
    • EventListener.OnNotifyResponseDelegate
    • EventLog
    • EventLogType
    • Factory
    • Friend
    • FriendCapability
    • FriendList
    • FriendListener
    • FriendListener.OnPresenceReceivedDelegate
    • FriendListListener
    • FriendListListener.OnContactCreatedDelegate
    • FriendListListener.OnContactDeletedDelegate
    • FriendListListener.OnContactUpdatedDelegate
    • FriendListListener.OnPresenceReceivedDelegate
    • FriendListListener.OnSyncStatusChangedDelegate
    • FriendListStatus
    • FriendListSyncStatus
    • FriendListType
    • FriendPhoneNumber
    • GlobalState
    • Headers
    • IceState
    • ImNotifPolicy
    • InfoMessage
    • Ldap
    • LdapAuthMethod
    • LdapCertVerificationMode
    • LdapCheck
    • LdapDebugLevel
    • LdapParams
    • LimeState
    • LinphoneException
    • LinphoneObject
    • LinphoneWrapper
    • LogCollectionState
    • LoggingService
    • LoggingServiceListener
    • LoggingServiceListener.OnLogMessageWrittenDelegate
    • LogLevel
    • MagicSearch
    • MagicSearchAggregation
    • MagicSearchListener
    • MagicSearchListener.OnLdapHaveMoreResultsDelegate
    • MagicSearchListener.OnSearchResultsReceivedDelegate
    • MagicSearchSource
    • MediaDirection
    • MediaEncryption
    • MediaResourceMode
    • MediastreamerFactory
    • NatPolicy
    • Participant
    • ParticipantDevice
    • ParticipantDeviceDisconnectionMethod
    • ParticipantDeviceIdentity
    • ParticipantDeviceJoiningMethod
    • ParticipantDeviceListener
    • ParticipantDeviceListener.OnIsMutedDelegate
    • ParticipantDeviceListener.OnIsSpeakingChangedDelegate
    • ParticipantDeviceListener.OnStateChangedDelegate
    • ParticipantDeviceListener.OnStreamAvailabilityChangedDelegate
    • ParticipantDeviceListener.OnStreamCapabilityChangedDelegate
    • ParticipantDeviceListener.OnVideoDisplayErrorOccurredDelegate
    • ParticipantDeviceState
    • ParticipantImdnState
    • PayloadType
    • Player
    • PlayerListener
    • PlayerListener.OnEofReachedDelegate
    • PlayerState
    • PresenceActivity
    • PresenceActivityType
    • PresenceBasicStatus
    • PresenceModel
    • PresenceNote
    • PresencePerson
    • PresenceService
    • Privacy
    • ProxyConfig
    • PublishState
    • PushNotificationConfig
    • PushNotificationMessage
    • Range
    • Reason
    • Recorder
    • RecorderFileFormat
    • RecorderParams
    • RecorderState
    • RegistrationState
    • SearchResult
    • SecurityEventType
    • SessionExpiresRefresher
    • SrtpSuite
    • StreamType
    • SubscribePolicy
    • SubscriptionDir
    • SubscriptionState
    • SupportLevel
    • ToneID
    • Transports
    • TransportType
    • Tunnel
    • TunnelConfig
    • TunnelMode
    • UpnpState
    • Vcard
    • VersionUpdateCheckResult
    • VideoActivationPolicy
    • VideoDefinition
    • VideoSourceDescriptor
    • VideoSourceType
    • XmlRpcArgType
    • XmlRpcRequest
    • XmlRpcRequestListener
    • XmlRpcRequestListener.OnResponseDelegate
    • XmlRpcSession
    • XmlRpcStatus
    • ZrtpKeyAgreement
    • ZrtpPeerStatus

Class Content

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

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

Inheritance
System.Object
LinphoneObject
Content
Inherited Members
LinphoneObject.StringArrayToBctbxList(IEnumerable<String>)
LinphoneObject.CleanStringArrayPtrs()
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Linphone
Assembly: cs.temp.dll.dll
Syntax
public class Content : LinphoneObject

Properties

Buffer

Get the content data buffer, usually a string.

Declaration
public uint Buffer { get; }
Property Value
Type Description
System.UInt32

The content data buffer.

Disposition

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

Declaration
public string Disposition { get; set; }
Property Value
Type Description
System.String

The disposition of the Content.

Encoding

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

Declaration
public string Encoding { get; set; }
Property Value
Type Description
System.String

The encoding of the data buffer.

FileDuration

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

Declaration
public int FileDuration { get; }
Property Value
Type Description
System.Int32

FilePath

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

Declaration
public string FilePath { get; set; }
Property Value
Type Description
System.String

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

FileSize

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

Declaration
public long FileSize { get; }
Property Value
Type Description
System.Int64

The represented file size.

IsFile

Tells whether or not this content contains a file.

Declaration
public bool IsFile { get; }
Property Value
Type Description
System.Boolean

true if this content contains a file, false otherwise.

IsFileEncrypted

Tells whether or not this content contains an encrypted file.

Declaration
public bool IsFileEncrypted { get; }
Property Value
Type Description
System.Boolean

True is this content contains a file and this file is encrypted, false otherwise.

IsFileTransfer

Tells whether or not this content is a file transfer.

Declaration
public bool IsFileTransfer { get; }
Property Value
Type Description
System.Boolean

true if this content is a file transfer, false otherwise.

IsIcalendar

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

Declaration
public bool IsIcalendar { get; }
Property Value
Type Description
System.Boolean

true if this content type is 'text/calendar;conference-event=yes', false otherwise.

IsMultipart

Tell whether a content is a multipart content.

Declaration
public bool IsMultipart { get; }
Property Value
Type Description
System.Boolean

A boolean value telling whether the content is multipart or not.

IsText

Tells whether or not this content contains text.

Declaration
public bool IsText { get; }
Property Value
Type Description
System.Boolean

true if this content contains plain text, false otherwise.

IsVoiceRecording

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

Declaration
public bool IsVoiceRecording { get; }
Property Value
Type Description
System.Boolean

true if this content type is 'audio/wav;voice-recording=yes', false otherwise.

Key

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

Declaration
public string Key { get; }
Property Value
Type Description
System.String

The key to encrypt/decrypt the file associated to this content.

KeySize

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

Declaration
public long KeySize { get; }
Property Value
Type Description
System.Int64

The key size in bytes

Name

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.

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

The name of the content.

Parts

Get all the parts from a multipart content.

Declaration
public IEnumerable<Content> Parts { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<Content>

A object holding the part if found, null otherwise.

PlainFilePath

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.

Declaration
public string PlainFilePath { get; }
Property Value
Type Description
System.String

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

Size

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

Declaration
public long Size { get; set; }
Property Value
Type Description
System.Int64

The content data buffer size.

StringBuffer

Get the string content data buffer.

Declaration
public string StringBuffer { get; set; }
Property Value
Type Description
System.String

The string content data buffer.

Subtype

Get the mime subtype of the content data.

Declaration
public string Subtype { get; set; }
Property Value
Type Description
System.String

The mime subtype of the content data, for example "html".

Type

Get the mime type of the content data.

Declaration
public string Type { get; set; }
Property Value
Type Description
System.String

The mime type of the content data, for example "application".

Utf8Text

Get the string content data buffer.

Introduced in 01/07/2020

Declaration
public string Utf8Text { get; set; }
Property Value
Type Description
System.String

The string content data buffer in UTF8.

Methods

AddContentTypeParameter(String, String)

Adds a parameter to the ContentType header.

Declaration
public void AddContentTypeParameter(string name, string val)
Parameters
Type Name Description
System.String name

the name of the parameter to add.

System.String val

the value of the parameter to add.

AddCustomHeader(String, String)

Adds a custom header in a content.

Declaration
public void AddCustomHeader(string headerName, string headerValue)
Parameters
Type Name Description
System.String headerName

The name of the header to add.

System.String headerValue

The value of the header to add.

ExportPlainFile()

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.

Declaration
public string ExportPlainFile()
Returns
Type Description
System.String

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

FindPartByHeader(String, String)

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

Declaration
public Content FindPartByHeader(string headerName, string headerValue)
Parameters
Type Name Description
System.String headerName

The name of the header to look for.

System.String headerValue

The value of the header to look for.

Returns
Type Description
Content

A Content object object the part if found, null otherwise.

GetCustomHeader(String)

Get a custom header value of a content.

Declaration
public string GetCustomHeader(string headerName)
Parameters
Type Name Description
System.String headerName

The name of the header to get the value from.

Returns
Type Description
System.String

The value of the header if found, null otherwise.

GetPart(Int32)

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

Declaration
public Content GetPart(int index)
Parameters
Type Name Description
System.Int32 index

The index of the part to get.

Returns
Type Description
Content

A Content object holding the part if found, null otherwise.

SetBuffer(UInt32, Int64)

Set the content data buffer, usually a string.

Declaration
public void SetBuffer(uint buffer, long size)
Parameters
Type Name Description
System.UInt32 buffer

The content data buffer.

System.Int64 size

The size of the content data buffer.

SetKey(String, Int64)

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

Declaration
public void SetKey(string key, long keyLength)
Parameters
Type Name Description
System.String key

The key to be used to encrypt/decrypt file associated to this content.

System.Int64 keyLength

The lengh of the key.

In This Article
Back to top Generated by DocFX