• Api Documentation
Show / Hide Table of Contents
  • Linphone
    • AccountCreator
    • AccountCreatorActivationCodeStatus
    • AccountCreatorAlgoStatus
    • AccountCreatorDomainStatus
    • AccountCreatorEmailStatus
    • AccountCreatorLanguageStatus
    • AccountCreatorListener
    • AccountCreatorListener.OnActivateAccountDelegate
    • AccountCreatorListener.OnActivateAliasDelegate
    • AccountCreatorListener.OnCreateAccountDelegate
    • AccountCreatorListener.OnIsAccountActivatedDelegate
    • AccountCreatorListener.OnIsAccountExistDelegate
    • AccountCreatorListener.OnIsAccountLinkedDelegate
    • AccountCreatorListener.OnIsAliasUsedDelegate
    • AccountCreatorListener.OnLinkAccountDelegate
    • AccountCreatorListener.OnLoginLinphoneAccountDelegate
    • AccountCreatorListener.OnRecoverAccountDelegate
    • AccountCreatorListener.OnUpdateAccountDelegate
    • AccountCreatorPasswordStatus
    • AccountCreatorPhoneNumberStatus
    • AccountCreatorStatus
    • AccountCreatorTransportStatus
    • AccountCreatorUsernameStatus
    • Address
    • AddressFamily
    • AudioDevice
    • AudioDeviceCapabilities
    • AudioDeviceType
    • AuthInfo
    • AuthMethod
    • AVPFMode
    • Buffer
    • Call
    • CallDir
    • CallListener
    • CallListener.OnAckProcessingDelegate
    • CallListener.OnAudioDeviceChangedDelegate
    • CallListener.OnCameraNotWorkingDelegate
    • CallListener.OnDtmfReceivedDelegate
    • CallListener.OnEncryptionChangedDelegate
    • CallListener.OnInfoMessageReceivedDelegate
    • CallListener.OnNextVideoFrameDecodedDelegate
    • CallListener.OnSnapshotTakenDelegate
    • CallListener.OnStateChangedDelegate
    • CallListener.OnStatsUpdatedDelegate
    • CallListener.OnTmmbrReceivedDelegate
    • CallListener.OnTransferStateChangedDelegate
    • 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
    • ChatRoomListener
    • ChatRoomListener.OnChatMessageParticipantImdnStateChangedDelegate
    • ChatRoomListener.OnChatMessageReceivedDelegate
    • ChatRoomListener.OnChatMessageSendingDelegate
    • ChatRoomListener.OnChatMessageSentDelegate
    • ChatRoomListener.OnChatMessageShouldBeStoredDelegate
    • ChatRoomListener.OnConferenceAddressGenerationDelegate
    • ChatRoomListener.OnConferenceJoinedDelegate
    • ChatRoomListener.OnConferenceLeftDelegate
    • ChatRoomListener.OnEphemeralEventDelegate
    • ChatRoomListener.OnEphemeralMessageDeletedDelegate
    • ChatRoomListener.OnEphemeralMessageTimerStartedDelegate
    • ChatRoomListener.OnIsComposingReceivedDelegate
    • ChatRoomListener.OnMessageReceivedDelegate
    • ChatRoomListener.OnNewEventDelegate
    • ChatRoomListener.OnParticipantAddedDelegate
    • ChatRoomListener.OnParticipantAdminStatusChangedDelegate
    • ChatRoomListener.OnParticipantDeviceAddedDelegate
    • ChatRoomListener.OnParticipantDeviceRemovedDelegate
    • ChatRoomListener.OnParticipantRegistrationSubscriptionRequestedDelegate
    • ChatRoomListener.OnParticipantRegistrationUnsubscriptionRequestedDelegate
    • ChatRoomListener.OnParticipantRemovedDelegate
    • ChatRoomListener.OnSecurityEventDelegate
    • ChatRoomListener.OnStateChangedDelegate
    • ChatRoomListener.OnSubjectChangedDelegate
    • ChatRoomListener.OnUndecryptableMessageReceivedDelegate
    • ChatRoomParams
    • ChatRoomSecurityLevel
    • ChatRoomState
    • Conference
    • ConferenceListener
    • ConferenceListener.OnParticipantAddedDelegate
    • ConferenceListener.OnParticipantAdminStatusChangedDelegate
    • ConferenceListener.OnParticipantDeviceAddedDelegate
    • ConferenceListener.OnParticipantDeviceRemovedDelegate
    • ConferenceListener.OnParticipantRemovedDelegate
    • ConferenceListener.OnStateChangedDelegate
    • ConferenceListener.OnSubjectChangedDelegate
    • ConferenceParams
    • ConferenceState
    • Config
    • ConfiguringState
    • ConsolidatedPresence
    • Content
    • Core
    • CoreListener
    • CoreListener.OnAudioDeviceChangedDelegate
    • CoreListener.OnAudioDevicesListUpdatedDelegate
    • CoreListener.OnAuthenticationRequestedDelegate
    • CoreListener.OnBuddyInfoUpdatedDelegate
    • CoreListener.OnCallCreatedDelegate
    • CoreListener.OnCallEncryptionChangedDelegate
    • CoreListener.OnCallIdUpdatedDelegate
    • CoreListener.OnCallLogUpdatedDelegate
    • CoreListener.OnCallStateChangedDelegate
    • CoreListener.OnCallStatsUpdatedDelegate
    • CoreListener.OnChatRoomEphemeralMessageDeletedDelegate
    • CoreListener.OnChatRoomReadDelegate
    • CoreListener.OnChatRoomStateChangedDelegate
    • CoreListener.OnChatRoomSubjectChangedDelegate
    • 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.OnNetworkReachableDelegate
    • CoreListener.OnNewSubscriptionRequestedDelegate
    • CoreListener.OnNotifyPresenceReceivedDelegate
    • CoreListener.OnNotifyPresenceReceivedForUriOrTelDelegate
    • CoreListener.OnNotifyReceivedDelegate
    • CoreListener.OnPublishStateChangedDelegate
    • CoreListener.OnQrcodeFoundDelegate
    • CoreListener.OnReferReceivedDelegate
    • CoreListener.OnRegistrationStateChangedDelegate
    • CoreListener.OnSubscribeReceivedDelegate
    • CoreListener.OnSubscriptionStateChangedDelegate
    • CoreListener.OnTransferStateChangedDelegate
    • CoreListener.OnVersionUpdateCheckResultReceivedDelegate
    • CoreLogCollectionUploadState
    • DialPlan
    • EcCalibratorStatus
    • ErrorInfo
    • Event
    • EventListener
    • EventListener.OnNotifyResponseDelegate
    • EventLog
    • EventLogType
    • Factory
    • Friend
    • FriendCapability
    • FriendList
    • FriendListListener
    • FriendListListener.OnContactCreatedDelegate
    • FriendListListener.OnContactDeletedDelegate
    • FriendListListener.OnContactUpdatedDelegate
    • FriendListListener.OnPresenceReceivedDelegate
    • FriendListListener.OnSyncStatusChangedDelegate
    • FriendListStatus
    • FriendListSyncStatus
    • GlobalState
    • Headers
    • IceState
    • ImNotifPolicy
    • InfoMessage
    • LimeState
    • LinphoneException
    • LinphoneObject
    • LinphoneWrapper
    • LogCollectionState
    • LoggingService
    • LoggingServiceListener
    • LoggingServiceListener.OnLogMessageWrittenDelegate
    • LogLevel
    • MagicSearch
    • MediaDirection
    • MediaEncryption
    • MediaResourceMode
    • MediastreamerFactory
    • NatPolicy
    • Participant
    • ParticipantDevice
    • ParticipantDeviceIdentity
    • ParticipantImdnState
    • PayloadType
    • Player
    • PlayerListener
    • PlayerListener.OnEofReachedDelegate
    • PlayerState
    • PresenceActivity
    • PresenceActivityType
    • PresenceBasicStatus
    • PresenceModel
    • PresenceNote
    • PresencePerson
    • PresenceService
    • Privacy
    • ProxyConfig
    • PublishState
    • PushNotificationMessage
    • Range
    • Reason
    • RegistrationState
    • SearchResult
    • SecurityEventType
    • SessionExpiresRefresher
    • StreamType
    • SubscribePolicy
    • SubscriptionDir
    • SubscriptionState
    • ToneID
    • Transports
    • TransportType
    • Tunnel
    • TunnelConfig
    • TunnelMode
    • UpnpState
    • Vcard
    • VersionUpdateCheckResult
    • VideoActivationPolicy
    • VideoDefinition
    • XmlRpcArgType
    • XmlRpcRequest
    • XmlRpcRequestListener
    • XmlRpcRequestListener.OnResponseDelegate
    • XmlRpcSession
    • XmlRpcStatus
    • ZrtpPeerStatus

Class Factory

The factory is a singleton object devoted to the creation of all the objects of Liblinphone that cannot be created by Core itself.

It is also used to configure a few behaviors before creating the Core, like the logs verbosity or collection.

Inheritance
System.Object
LinphoneObject
Factory
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 Factory : LinphoneObject

Properties

DataResourcesDir

Get the directory where the data resources are located.

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

The path to the directory where the data resources are located

DialPlans

Returns a bctbx_list_t of all DialPlans.

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

A list of DialPlan

ImageResourcesDir

Get the directory where the image resources are located.

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

The path to the directory where the image resources are located

Instance

Create the Factory if that has not been done and return a pointer on it.

Declaration
public static Factory Instance { get; }
Property Value
Type Description
Factory

A pointer on the Factory

IsDatabaseStorageAvailable

Indicates if the storage in database is available.

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

true if the database storage is available, false otherwise

IsImdnAvailable

Indicates if IMDN are available.

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

true if IDMN are available

LogCollectionPath

Sets the log collection path.

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

MspluginsDir

Get the directory where the mediastreamer2 plugins are located.

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

The path to the directory where the mediastreamer2 plugins are located, or null if it has not been set.

RingResourcesDir

Get the directory where the ring resources are located.

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

The path to the directory where the ring resources are located

SoundResourcesDir

Get the directory where the sound resources are located.

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

The path to the directory where the sound resources are located

SupportedVideoDefinitions

Get the list of standard video definitions supported by Linphone.

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

A list of video definitions.

TopResourcesDir

Get the top directory where the resources are located.

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

The path to the top directory where the resources are located

Methods

Clean()

Clean the factory.

This function is generally useless as the factory is unique per process, however calling this function at the end avoid getting reports from belle-sip leak detector about memory leaked in Linphone.Factory..

Declaration
public static void Clean()

CreateAddress(String)

Parse a string holding a SIP URI and create the according Address object.

Declaration
public Address CreateAddress(string addr)
Parameters
Type Name Description
System.String addr

A string holding the SIP URI to parse.

Returns
Type Description
Address

A new Address.

CreateAuthInfo(String, String, String, String, String, String)

Creates a AuthInfo object.

The object can be created empty, that is with all arguments set to null. Username, userid, password, realm and domain can be set later using specific methods. At the end, username and passwd (or ha1) are required.

Declaration
public AuthInfo CreateAuthInfo(string username, string userid, string passwd, string ha1, string realm, string domain)
Parameters
Type Name Description
System.String username

The username that needs to be authenticated

System.String userid

The userid used for authenticating (use null if you don't know what it is)

System.String passwd

The password in clear text

System.String ha1

The ha1-encrypted password if password is not given in clear text.

System.String realm

The authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter.

System.String domain

The SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.

Returns
Type Description
AuthInfo

A AuthInfo object. linphone_auth_info_destroy must be used to destroy it when no longer needed. The Core makes a copy of AuthInfo passed through Linphone.Core.AddAuthInfo().

CreateAuthInfo(String, String, String, String, String, String, String)

Creates a AuthInfo object.

The object can be created empty, that is with all arguments set to null. Username, userid, password, realm and domain can be set later using specific methods. At the end, username and passwd (or ha1) are required.

Declaration
public AuthInfo CreateAuthInfo(string username, string userid, string passwd, string ha1, string realm, string domain, string algorithm)
Parameters
Type Name Description
System.String username

The username that needs to be authenticated

System.String userid

The userid used for authenticating (use null if you don't know what it is)

System.String passwd

The password in clear text

System.String ha1

The ha1-encrypted password if password is not given in clear text.

System.String realm

The authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter.

System.String domain

The SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.

System.String algorithm

The algorithm for encrypting password.

Returns
Type Description
AuthInfo

A AuthInfo object. linphone_auth_info_destroy must be used to destroy it when no longer needed. The Core makes a copy of AuthInfo passed through Linphone.Core.AddAuthInfo().

CreateBuffer()

Creates an object Buffer.

Declaration
public Buffer CreateBuffer()
Returns
Type Description
Buffer

a Buffer

CreateBufferFromData(UInt32, Int64)

Creates an object Buffer.

Declaration
public Buffer CreateBufferFromData(uint data, long size)
Parameters
Type Name Description
System.UInt32 data

the data to set in the buffer

System.Int64 size

the size of the data

Returns
Type Description
Buffer

a Buffer

CreateBufferFromString(String)

Creates an object Buffer.

Declaration
public Buffer CreateBufferFromString(string data)
Parameters
Type Name Description
System.String data

the data to set in the buffer

Returns
Type Description
Buffer

a Buffer

CreateConfig(String)

Creates an object Config.

Declaration
public Config CreateConfig(string path)
Parameters
Type Name Description
System.String path

the path of the config

Returns
Type Description
Config

a Config

CreateConfigFromString(String)

Creates an object Config.

Declaration
public Config CreateConfigFromString(string data)
Parameters
Type Name Description
System.String data

the config data

Returns
Type Description
Config

a Config

CreateConfigWithFactory(String, String)

Creates an object Config.

Declaration
public Config CreateConfigWithFactory(string path, string factoryPath)
Parameters
Type Name Description
System.String path

the path of the config

System.String factoryPath

the path of the factory

Returns
Type Description
Config

a Config

CreateContent()

Creates an object Content.

Declaration
public Content CreateContent()
Returns
Type Description
Content

a Content

CreateCore(String, String, IntPtr)

Instantiate a Core object.

The Core object is the primary handle for doing all phone actions. It should be unique within your application. The Core object is not started automatically, you need to call Start() to that effect. The returned Core will be in GlobalState Ready. Core ressources can be released using Stop() which is strongly encouraged on garbage collected languages.

Declaration
public Core CreateCore(string configPath, string factoryConfigPath, IntPtr systemContext)
Parameters
Type Name Description
System.String configPath

A path to a config file. If it does not exists it will be created. The config file is used to store all settings, proxies... so that all these settings become persistent over the life of the Core object. It is allowed to set a null config file. In that case Core will not store any settings.

System.String factoryConfigPath

A path to a read-only config file that can be used to store hard-coded preferences such as proxy settings or internal preferences. The settings in this factory file always override the ones in the normal config file. It is optional, use null if unneeded.

System.IntPtr systemContext

A pointer to a system object required by the core to operate. Currently it is required to pass an android Context on android, pass null on other platforms.

Returns
Type Description
Core

a Core object

Remarks

See : linphone_core_new_with_config_3()

CreateCoreWithConfig(Config, IntPtr)

Instantiate a Core object with a given LinphoneConfig.

The Core object is the primary handle for doing all phone actions. It should be unique within your application. The Core object is not started automatically, you need to call Start() to that effect. The returned Core will be in GlobalState Ready. Core ressources can be released using Stop() which is strongly encouraged on garbage collected languages.

Declaration
public Core CreateCoreWithConfig(Config config, IntPtr systemContext)
Parameters
Type Name Description
Config config

A Config object holding the configuration for the Core to be instantiated.

System.IntPtr systemContext

A pointer to a system object required by the core to operate. Currently it is required to pass an android Context on android, pass null on other platforms.

Returns
Type Description
Core

a Core object

Remarks

See : Linphone.Factory.CreateCore()

CreateErrorInfo()

Creates an object LinphoneErrorInfo.

Declaration
public ErrorInfo CreateErrorInfo()
Returns
Type Description
ErrorInfo

a ErrorInfo object.

CreateParticipantDeviceIdentity(Address, String)

Create a ParticipantDeviceIdentity object.

Declaration
public ParticipantDeviceIdentity CreateParticipantDeviceIdentity(Address address, string name)
Parameters
Type Name Description
Address address

Address object.

System.String name

the name given to the device.

Returns
Type Description
ParticipantDeviceIdentity

A new ParticipantDeviceIdentity.

CreateRange()

Creates an object LinphoneRange.

Declaration
public Range CreateRange()
Returns
Type Description
Range

a Range object.

CreateTransports()

Creates an object LinphoneTransports.

Declaration
public Transports CreateTransports()
Returns
Type Description
Transports

a Transports object.

CreateTunnelConfig()

Creates an object TunnelConfig.

Declaration
public TunnelConfig CreateTunnelConfig()
Returns
Type Description
TunnelConfig

a TunnelConfig

CreateVcard()

Create an empty Vcard.

Declaration
public Vcard CreateVcard()
Returns
Type Description
Vcard

a new Vcard.

CreateVideoActivationPolicy()

Creates an object LinphoneVideoActivationPolicy.

Declaration
public VideoActivationPolicy CreateVideoActivationPolicy()
Returns
Type Description
VideoActivationPolicy

VideoActivationPolicy object.

CreateVideoDefinition(UInt32, UInt32)

Create a VideoDefinition from a given width and height.

Declaration
public VideoDefinition CreateVideoDefinition(uint width, uint height)
Parameters
Type Name Description
System.UInt32 width

The width of the created video definition

System.UInt32 height

The height of the created video definition

Returns
Type Description
VideoDefinition

A new VideoDefinition object

CreateVideoDefinitionFromName(String)

Create a VideoDefinition from a given standard definition name.

Declaration
public VideoDefinition CreateVideoDefinitionFromName(string name)
Parameters
Type Name Description
System.String name

The standard definition name of the video definition to create

Returns
Type Description
VideoDefinition

A new VideoDefinition object

EnableLogCollection(LogCollectionState)

Enables or disables log collection.

Declaration
public void EnableLogCollection(LogCollectionState state)
Parameters
Type Name Description
LogCollectionState state

the LogCollectionState for log collection

GetConfigDir(IntPtr)

Get the config path.

Declaration
public string GetConfigDir(IntPtr context)
Parameters
Type Name Description
System.IntPtr context

used to compute path. Can be null. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.

Returns
Type Description
System.String

The config path

GetDataDir(IntPtr)

Get the data path.

Declaration
public string GetDataDir(IntPtr context)
Parameters
Type Name Description
System.IntPtr context

used to compute path. Can be null. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.

Returns
Type Description
System.String

The data path

GetDownloadDir(IntPtr)

Get the download path.

Declaration
public string GetDownloadDir(IntPtr context)
Parameters
Type Name Description
System.IntPtr context

used to compute path. Can be null. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.

Returns
Type Description
System.String

The download path

IsChatroomBackendAvailable(ChatRoomBackend)

Indicates if the given LinphoneChatRoomBackend is available.

Declaration
public bool IsChatroomBackendAvailable(ChatRoomBackend chatroomBackend)
Parameters
Type Name Description
ChatRoomBackend chatroomBackend

the ChatRoomBackend

Returns
Type Description
System.Boolean

true if the chatroom backend is available, false otherwise

SetVfsEncryption(UInt32, UInt32, Int64)

Select encryption module and set secret material to encrypt the files.

Declaration
public void SetVfsEncryption(uint encryptionModule, uint secret, long secretSize)
Parameters
Type Name Description
System.UInt32 encryptionModule

One of the available encryption module for VFS, pick in the LINPHONE_VFS_ENCRYPTION_* list if set to _UNSET, default bctoolbox VFS is switch to Standard one

System.UInt32 secret

the secret material used to encrypt the files, can be null for the _PLAIN module

System.Int64 secretSize

size of the secret

In This Article
Back to top Generated by DocFX