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

Public Member Functions

string ComputeHa1ForAlgorithm (string userid, string password, string realm, string algorithm)
 
Linphone.Address CreateAddress (string addr)
 
Linphone.AuthInfo CreateAuthInfo (string username, string userid, string passwd, string ha1, string realm, string domain)
 
Linphone.AuthInfo CreateAuthInfo (string username, string userid, string passwd, string ha1, string realm, string domain, string algorithm)
 
Linphone.AuthInfo CreateAuthInfo (string username, Linphone.BearerToken accessToken, string realm)
 
Linphone.BearerToken CreateBearerToken (string token, long expirationTime)
 
Linphone.Buffer CreateBuffer ()
 
Linphone.Buffer CreateBufferFromData (uint data, long size)
 
Linphone.Buffer CreateBufferFromString (string data)
 
Linphone.ConferenceInfo CreateConferenceInfo ()
 
Linphone.ConferenceInfo CreateConferenceInfoFromIcalendarContent (Linphone.Content content)
 
Linphone.Config CreateConfig (string path)
 
Linphone.Config CreateConfigFromString (string data)
 
Linphone.Config CreateConfigWithFactory (string path, string factoryPath)
 
Linphone.Content CreateContent ()
 
Linphone.Content CreateContentFromFile (string filePath)
 
Linphone.Core CreateCore (string configPath, string factoryConfigPath, IntPtr systemContext)
 
Linphone.Core CreateCoreWithConfig (Linphone.Config config, IntPtr systemContext)
 
Linphone.DigestAuthenticationPolicy CreateDigestAuthenticationPolicy ()
 
Linphone.EktInfo CreateEktInfo ()
 
Linphone.ErrorInfo CreateErrorInfo ()
 
Linphone.FriendPhoneNumber CreateFriendPhoneNumber (string phoneNumber, string label)
 
Linphone.ParticipantDeviceIdentity CreateParticipantDeviceIdentity (Linphone.Address address, string name)
 
Linphone.ParticipantInfo CreateParticipantInfo (Linphone.Address address)
 
Linphone.Content CreateQrcode (string code, uint width, uint height, uint margin)
 
Linphone.Range CreateRange ()
 
Linphone.SignalInformation CreateSignalInformation ()
 
Linphone.Transports CreateTransports ()
 
Linphone.TunnelConfig CreateTunnelConfig ()
 
Linphone.Vcard CreateVcard ()
 
Linphone.VideoActivationPolicy CreateVideoActivationPolicy ()
 
Linphone.VideoDefinition CreateVideoDefinition (uint width, uint height)
 
Linphone.VideoDefinition CreateVideoDefinitionFromName (string name)
 
Linphone.VideoSourceDescriptor CreateVideoSourceDescriptor ()
 
void EnableLogCollection (Linphone.LogCollectionState state)
 
string GetCacheDir (IntPtr context)
 
string GetConfigDir (IntPtr context)
 
string GetDataDir (IntPtr context)
 
string GetDownloadDir (IntPtr context)
 
bool IsChatroomBackendAvailable (Linphone.ChatRoomBackend chatroomBackend)
 
bool SetVfsEncryption (uint encryptionModule, uint secret, long secretSize)
 
int WriteQrcodeFile (string filePath, string code, uint width, uint height, uint margin)
 

Static Public Member Functions

static void Clean ()
 

Properties

static Linphone.Factory Instance [get]
 
string CacheDir [set]
 
string ConfigDir [set]
 
string DataDir [set]
 
string DataResourcesDir [get, set]
 
IEnumerable< Linphone.DialPlanDialPlans [get]
 
string DownloadDir [set]
 
string ImageResourcesDir [get, set]
 
bool IsCacheDirSet [get]
 
bool IsConfigDirSet [get]
 
bool IsDataDirSet [get]
 
bool IsDatabaseStorageAvailable [get]
 
bool IsDownloadDirSet [get]
 
bool IsImdnAvailable [get]
 
bool IsQrcodeAvailable [get]
 
string LiblinphonePluginsDir [get, set]
 
string LogCollectionPath [set]
 
string MspluginsDir [get, set]
 
IEnumerable< Linphone.VideoDefinitionRecommendedVideoDefinitions [get]
 
string RingResourcesDir [get, set]
 
string SoundResourcesDir [get, set]
 
IEnumerable< Linphone.VideoDefinitionSupportedVideoDefinitions [get]
 
string TopResourcesDir [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

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

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

Member Function Documentation

static void Linphone.Factory.Clean ( )
inlinestatic

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..

string Linphone.Factory.ComputeHa1ForAlgorithm ( string  userid,
string  password,
string  realm,
string  algorithm 
)
inline

Computes the hashed version of the password given the user ID and the realm, using given algorithm.

Parameters
useridthe username or user ID to use.
passwordthe password to hash.
realmthe real to use.
algorithmthe algorithm to use (MD5 or SHA-256).
Returns
the generated hash if it succeeded, null otherwise.
Linphone.Address Linphone.Factory.CreateAddress ( string  addr)
inline

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

Parameters
addrA string holding the SIP URI to parse.
Returns
A new Linphone.Address.
Linphone.AuthInfo Linphone.Factory.CreateAuthInfo ( string  username,
string  userid,
string  passwd,
string  ha1,
string  realm,
string  domain 
)
inline

Creates a Linphone.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.

Parameters
usernameThe username that needs to be authenticated
useridThe userid used for authenticating (use null if you don't know what it is)
passwdThe password in clear text
ha1The ha1-encrypted password if password is not given in clear text.
realmThe authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter.
domainThe SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
Returns
A Linphone.AuthInfo object. linphone_auth_info_destroy must be used to destroy it when no longer needed. The Linphone.Core makes a copy of Linphone.AuthInfo passed through Linphone.Core.AddAuthInfo().
Linphone.AuthInfo Linphone.Factory.CreateAuthInfo ( string  username,
string  userid,
string  passwd,
string  ha1,
string  realm,
string  domain,
string  algorithm 
)
inline

Creates a Linphone.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.

Parameters
usernameThe username that needs to be authenticated
useridThe userid used for authenticating (use null if you don't know what it is)
passwdThe password in clear text
ha1The ha1-encrypted password if password is not given in clear text.
realmThe authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter.
domainThe SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
algorithmThe algorithm for encrypting password.
Returns
A Linphone.AuthInfo object. linphone_auth_info_destroy must be used to destroy it when no longer needed. The Linphone.Core makes a copy of Linphone.AuthInfo passed through Linphone.Core.AddAuthInfo().
Linphone.AuthInfo Linphone.Factory.CreateAuthInfo ( string  username,
Linphone.BearerToken  accessToken,
string  realm 
)
inline

Creates a Linphone.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.

Parameters
usernameThe username that needs to be authenticated
accessTokenAn access token to send to authenticate
realmThe authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter.
Returns
A Linphone.AuthInfo object. linphone_auth_info_unref must be used to destroy it when no longer needed. The Linphone.Core makes a copy of Linphone.AuthInfo passed through Linphone.Core.AddAuthInfo().
Linphone.BearerToken Linphone.Factory.CreateBearerToken ( string  token,
long  expirationTime 
)
inline

Create a new Linphone.BearerToken object.

The expiration time may be set to zero if unknown, in which case the Linphone.Core will anyway use the refresh token if an access token is rejected by a server.

Parameters
tokenthe token, as an opaque string.
expirationTimethe expiration time as the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
Returns
the newly created Linphone.BearerToken .
Linphone.Buffer Linphone.Factory.CreateBuffer ( )
inline

Creates an object Linphone.Buffer.

Returns
a Linphone.Buffer
Linphone.Buffer Linphone.Factory.CreateBufferFromData ( uint  data,
long  size 
)
inline

Creates an object Linphone.Buffer.

Parameters
datathe data to set in the buffer
sizethe size of the data
Returns
a Linphone.Buffer
Linphone.Buffer Linphone.Factory.CreateBufferFromString ( string  data)
inline

Creates an object Linphone.Buffer.

Parameters
datathe data to set in the buffer
Returns
a Linphone.Buffer
Linphone.ConferenceInfo Linphone.Factory.CreateConferenceInfo ( )
inline

Creates an object Linphone.ConferenceInfo.

Returns
a Linphone.ConferenceInfo
Linphone.ConferenceInfo Linphone.Factory.CreateConferenceInfoFromIcalendarContent ( Linphone.Content  content)
inline

Creates an object Linphone.ConferenceInfo from an Icalendar Linphone.Content.

Parameters
contentthe Icalendar Linphone.Content
Returns
a Linphone.ConferenceInfo created from an Icalendar Linphone.Content
Linphone.Config Linphone.Factory.CreateConfig ( string  path)
inline

Creates an object Linphone.Config.

Parameters
paththe path of the config
Returns
a Linphone.Config
Linphone.Config Linphone.Factory.CreateConfigFromString ( string  data)
inline

Creates an object Linphone.Config.

Parameters
datathe config data
Returns
a Linphone.Config
Linphone.Config Linphone.Factory.CreateConfigWithFactory ( string  path,
string  factoryPath 
)
inline

Creates an object Linphone.Config.

Parameters
paththe path of the config
factoryPaththe path of the factory
Returns
a Linphone.Config
Linphone.Content Linphone.Factory.CreateContent ( )
inline

Creates an object Linphone.Content.

Returns
a Linphone.Content
Linphone.Content Linphone.Factory.CreateContentFromFile ( string  filePath)
inline

Creates a file object of Linphone.Content from a file path.

Parameters
filePaththe path of the file
Returns
a Linphone.Content which can be used as a file
Linphone.Core Linphone.Factory.CreateCore ( string  configPath,
string  factoryConfigPath,
IntPtr  systemContext 
)
inline

Instantiate a Linphone.Core object.

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

Parameters
configPathA 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 Linphone.Core object. It is allowed to set a null config file. In that case Linphone.Core will not store any settings.
factoryConfigPathA 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.
systemContextA 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
a Linphone.Core object

See : linphone_core_new_with_config_3()

Linphone.Core Linphone.Factory.CreateCoreWithConfig ( Linphone.Config  config,
IntPtr  systemContext 
)
inline

Instantiate a Linphone.Core object with a given LinphoneConfig.

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

Parameters
configA Linphone.Config object holding the configuration for the Linphone.Core to be instantiated.
systemContextA 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
a Linphone.Core object

See : Linphone.Factory.CreateCore()

Linphone.DigestAuthenticationPolicy Linphone.Factory.CreateDigestAuthenticationPolicy ( )
inline

Create a Linphone.DigestAuthenticationPolicy object.

The Linphone.DigestAuthenticationPolicy object which is used to configure a policy for digest authentication, such as allowing MD5 or mode without qop=auth.

Returns
a new Linphone.DigestAuthenticationPolicy .
Linphone.EktInfo Linphone.Factory.CreateEktInfo ( )
inline

Create an empty Linphone.EktInfo object.

Returns
A new Linphone.EktInfo object
Linphone.ErrorInfo Linphone.Factory.CreateErrorInfo ( )
inline

Creates an object LinphoneErrorInfo.

Returns
a Linphone.ErrorInfo object.
Linphone.FriendPhoneNumber Linphone.Factory.CreateFriendPhoneNumber ( string  phoneNumber,
string  label 
)
inline

Creates a new Linphone.FriendPhoneNumber object.

Parameters
phoneNumberThe phone number.
labelthe type of phone number, for example "home", "cell", etc. Use null or empty for no label.
Returns
The newly created Linphone.FriendPhoneNumber object.
Linphone.ParticipantDeviceIdentity Linphone.Factory.CreateParticipantDeviceIdentity ( Linphone.Address  address,
string  name 
)
inline

Create a Linphone.ParticipantDeviceIdentity object.

Parameters
addressLinphone.Address object.
namethe name given to the device.
Returns
A new Linphone.ParticipantDeviceIdentity.
Linphone.ParticipantInfo Linphone.Factory.CreateParticipantInfo ( Linphone.Address  address)
inline

Creates an object Linphone.ConferenceInfo from an Icalendar Linphone.Content.

Parameters
addressthe Linphone.Address of the participant
Returns
a Linphone.ParticipantInfo
Linphone.Content Linphone.Factory.CreateQrcode ( string  code,
uint  width,
uint  height,
uint  margin 
)
inline

Creates a Bitmap QRCode and return it into an object Linphone.Content.

Parameters
codeThe code to be generated into an image. It must not be empty.
widthThe requested width of the QRCode image. It will be 100 if 0.
heightThe requested height of the QRCode image. It will be 100 if 0.
marginThe requested margin of the QRCode image.
Returns
a Linphone.Content
Linphone.Range Linphone.Factory.CreateRange ( )
inline

Creates an object LinphoneRange.

Returns
a Linphone.Range object.
Linphone.SignalInformation Linphone.Factory.CreateSignalInformation ( )
inline
Linphone.Transports Linphone.Factory.CreateTransports ( )
inline

Creates an object LinphoneTransports.

Returns
a Linphone.Transports object.
Linphone.TunnelConfig Linphone.Factory.CreateTunnelConfig ( )
inline

Creates an object Linphone.TunnelConfig.

Returns
a Linphone.TunnelConfig
Linphone.Vcard Linphone.Factory.CreateVcard ( )
inline

Create an empty Linphone.Vcard.

Returns
a new Linphone.Vcard.
Linphone.VideoActivationPolicy Linphone.Factory.CreateVideoActivationPolicy ( )
inline

Creates an object LinphoneVideoActivationPolicy.

Returns
Linphone.VideoActivationPolicy object.
Linphone.VideoDefinition Linphone.Factory.CreateVideoDefinition ( uint  width,
uint  height 
)
inline

Create a Linphone.VideoDefinition from a given width and height.

Parameters
widthThe width of the created video definition
heightThe height of the created video definition
Returns
A new Linphone.VideoDefinition object
Linphone.VideoDefinition Linphone.Factory.CreateVideoDefinitionFromName ( string  name)
inline

Create a Linphone.VideoDefinition from a given standard definition name.

Parameters
nameThe standard definition name of the video definition to create
Returns
A new Linphone.VideoDefinition object
Linphone.VideoSourceDescriptor Linphone.Factory.CreateVideoSourceDescriptor ( )
inline
void Linphone.Factory.EnableLogCollection ( Linphone.LogCollectionState  state)
inline

Enables or disables log collection.

Parameters
statethe Linphone.LogCollectionState for log collection
string Linphone.Factory.GetCacheDir ( IntPtr  context)
inline

Get the cache path.

Parameters
contextused to compute path. Can be null. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
Returns
The cache path
string Linphone.Factory.GetConfigDir ( IntPtr  context)
inline

Get the config path.

Parameters
contextused to compute path. Can be null. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
Returns
The config path
string Linphone.Factory.GetDataDir ( IntPtr  context)
inline

Get the data path.

Parameters
contextused to compute path. Can be null. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
Returns
The data path
string Linphone.Factory.GetDownloadDir ( IntPtr  context)
inline

Get the download path.

Parameters
contextused to compute path. Can be null. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
Returns
The download path
bool Linphone.Factory.IsChatroomBackendAvailable ( Linphone.ChatRoomBackend  chatroomBackend)
inline

Indicates if the given LinphoneChatRoomBackend is available.

Parameters
chatroomBackendthe Linphone.ChatRoomBackend
Returns
true if the chatroom backend is available, false otherwise
bool Linphone.Factory.SetVfsEncryption ( uint  encryptionModule,
uint  secret,
long  secretSize 
)
inline

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

Parameters
encryptionModuleOne 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
secretthe secret material used to encrypt the files, can be null for the _PLAIN module
secretSizesize of the secret
Returns
true if everything went well, false if it appears that the given secret is unable to decrypt existing configuration
int Linphone.Factory.WriteQrcodeFile ( string  filePath,
string  code,
uint  width,
uint  height,
uint  margin 
)
inline

Creates a QRCode and write it into a JPEG file specified by file_path (only if build with JPEG).

Parameters
filePathThe file where to write the QRCode JPEG image.
codeThe code to be generated into an image. It must not be empty.
widthThe requested width of the QRCode image. It will be 100 if 0.
heightThe requested height of the QRCode image. It will be 100 if 0.
marginThe requested margin of the QRCode image.
Returns
0 if successful, -2 if JPEG is not supported, -1 otherwise

Property Documentation

string Linphone.Factory.CacheDir
set

Set the directory where the application local cache is located.

If the path is empty (default value), the path will be computed when calling Linphone.Factory.DataDir

Parameters
pathThe path to the directory where the application local cache is located
string Linphone.Factory.ConfigDir
set

Set the directory where the configurations are located.

If the path is empty (default value), the path will be computed when calling Linphone.Factory.ConfigDir

Parameters
pathThe path to the directory where the configurations are located
string Linphone.Factory.DataDir
set

Set the directory where the application local data are located.

If the path is empty (default value), the path will be computed when calling Linphone.Factory.DataDir

Parameters
pathThe path to the directory where the application local data are located
string Linphone.Factory.DataResourcesDir
getset

Get the directory where the data resources are located.

Returns
The path to the directory where the data resources are located
IEnumerable<Linphone.DialPlan> Linphone.Factory.DialPlans
get

Returns a bctbx_list_t of all DialPlans.

Returns
A list of Linphone.DialPlan A list of Linphone.DialPlan objects.
string Linphone.Factory.DownloadDir
set

Set the directory where downloads are located.

If the path is empty (default value), the path will be computed when calling Linphone.Factory.DownloadDir

Parameters
pathThe path to the directory where downloads are located
string Linphone.Factory.ImageResourcesDir
getset

Get the directory where the image resources are located.

Returns
The path to the directory where the image resources are located
Linphone.Factory Linphone.Factory.Instance
staticget

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

Returns
A pointer on the Linphone.Factory
bool Linphone.Factory.IsCacheDirSet
get

Test if cache dir has been set.

Returns
true if cache dir has been set.
bool Linphone.Factory.IsConfigDirSet
get

Test if config dir has been set.

Returns
true if config dir has been set.
bool Linphone.Factory.IsDatabaseStorageAvailable
get

Indicates if the storage in database is available.

Returns
true if the database storage is available, false otherwise
bool Linphone.Factory.IsDataDirSet
get

Test if data dir has been set.

Returns
true if data dir has been set.
bool Linphone.Factory.IsDownloadDirSet
get

Test if download dir has been set.

Returns
true if download dir has been set.
bool Linphone.Factory.IsImdnAvailable
get

Indicates if IMDN are available.

Returns
true if IDMN are available
bool Linphone.Factory.IsQrcodeAvailable
get

Indicates if the QRCode feature is available.

Returns
true if QRCodes can be used
string Linphone.Factory.LiblinphonePluginsDir
getset

Get the directory where the liblinphone plugins are located.

Returns
The path to the directory where the liblinphone plugins are located, or null if it has not been set.
string Linphone.Factory.LogCollectionPath
set

Sets the log collection path.

Parameters
paththe path of the logs
string Linphone.Factory.MspluginsDir
getset

Get the directory where the mediastreamer2 plugins are located.

Returns
The path to the directory where the mediastreamer2 plugins are located, or null if it has not been set.
IEnumerable<Linphone.VideoDefinition> Linphone.Factory.RecommendedVideoDefinitions
get

Get the recommended list of standard video definitions.

This list is suitable for a widest set of hardware for all video codec implementations, and thus excludes some very high definition formats that are unlikely to work unless specific hardware or codecs are used.

Returns
A list of video definitions. A list of Linphone.VideoDefinition objects.
string Linphone.Factory.RingResourcesDir
getset

Get the directory where the ring resources are located.

Returns
The path to the directory where the ring resources are located
string Linphone.Factory.SoundResourcesDir
getset

Get the directory where the sound resources are located.

Returns
The path to the directory where the sound resources are located
IEnumerable<Linphone.VideoDefinition> Linphone.Factory.SupportedVideoDefinitions
get

Get the list of standard video definitions supported by Linphone.

Returns
A list of video definitions. A list of Linphone.VideoDefinition objects.
string Linphone.Factory.TopResourcesDir
getset

Get the top directory where the resources are located.

Returns
The path to the top directory where the resources are located

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