Package org.linphone.core

# Class Factory

java.lang.Object
org.linphone.core.Factory

public abstract class Factory extends Object
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.

## Constructor Summary

Constructors
Constructor
Description
`Factory()`

## Method Summary

Modifier and Type
Method
Description
`abstract String`
`computeHa1ForAlgorithm(String userid, String password, String realm, String algorithm)`
Computes the hashed version of the password given the user ID and the realm,
using given algorithm.
`abstract Address`
`createAddress(String addr)`
Parse a string holding a SIP URI and create the according `Address`
object.
`abstract AuthInfo`
`createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain)`
Creates a `AuthInfo` object.
`abstract AuthInfo`
`createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain, String algorithm)`
Creates a `AuthInfo` object.
`abstract AuthInfo`
`createAuthInfo(String username, BearerToken accessToken, String realm)`
Creates a `AuthInfo` object.
`abstract BearerToken`
`createBearerToken(String token, long expirationTime)`
Create a new `BearerToken` object.
`abstract Buffer`
`createBuffer()`
Creates an object `Buffer`.
`abstract Buffer`
`createBufferFromData(byte[] data, int size)`
Creates an object `Buffer`.
`abstract Buffer`
`createBufferFromString(String data)`
Creates an object `Buffer`.
`abstract ConferenceInfo`
`createConferenceInfo()`
Creates an object `ConferenceInfo`.
`abstract ConferenceInfo`
`createConferenceInfoFromIcalendarContent(Content content)`
Creates an object `ConferenceInfo` from an Icalendar `Content`.
`abstract Config`
`createConfig(String path)`
Creates an object `Config`.
`abstract Config`
`createConfigFromString(String data)`
Creates an object `Config`.
`abstract Config`
`createConfigWithFactory(String path, String factoryPath)`
Creates an object `Config`.
`abstract Content`
`createContent()`
Creates an object `Content`.
`abstract Content`
`createContentFromFile(String filePath)`
Creates a file object of `Content` from a file path.
`abstract Core`
`createCore(String configPath, String factoryConfigPath, Object systemContext)`
Instantiate a `Core` object.
`abstract Core`
`createCoreWithConfig(Config config, Object systemContext)`
Instantiate a `Core` object with a given LinphoneConfig.
`abstract DigestAuthenticationPolicy`
`createDigestAuthenticationPolicy()`
Creates a `DigestAuthenticationPolicy` object.
`abstract EktInfo`
`createEktInfo()`
Creates an empty `EktInfo` object.
`abstract ErrorInfo`
`createErrorInfo()`
Creates an object LinphoneErrorInfo.
`abstract FriendPhoneNumber`
`createFriendPhoneNumber(String phoneNumber, String label)`
Creates a new `FriendPhoneNumber` object.
`abstract MessageWaitingIndication`
`createMessageWaitingIndicationFromContent(Content content)`
Creates a `MessageWaitingIndication` object from a `Content`.
`abstract ParticipantDeviceIdentity`
`createParticipantDeviceIdentity(Address address, String name)`
Creates a `ParticipantDeviceIdentity` object.
`abstract ParticipantInfo`
`createParticipantInfo(Address address)`
Creates an object `ConferenceInfo` from an Icalendar `Content`.
`abstract Content`
`createQrcode(String code, int width, int height, int margin)`
Creates a Bitmap QRCode and return it into an object `Content`.
`abstract Range`
`createRange()`
Creates an object LinphoneRange.
`abstract SignalInformation`
`createSignalInformation()`
Creates an object `SignalInformation`.
`abstract Transports`
`createTransports()`
Creates an object LinphoneTransports.
`abstract TunnelConfig`
`createTunnelConfig()`
Creates an object `TunnelConfig`.
`abstract Vcard`
`createVcard()`
Creates an empty `Vcard`.
`abstract VideoActivationPolicy`
`createVideoActivationPolicy()`
Creates an object LinphoneVideoActivationPolicy.
`abstract VideoDefinition`
`createVideoDefinition(int width, int height)`
Creates a `VideoDefinition` from a given width and height.
`abstract VideoDefinition`
`createVideoDefinitionFromName(String name)`
Creates a `VideoDefinition` from a given standard definition name.
`abstract VideoSourceDescriptor`
`createVideoSourceDescriptor()`
Creates an object `VideoSourceDescriptor`.
`abstract void`
`enableLogcatLogs(boolean enable)`
When enabled logs are printed into logcat.
`abstract void`
`enableLogCollection(LogCollectionState state)`
Enables or disables log collection.
`abstract String`
`getCacheDir(Object context)`
Get the cache path.
`abstract String`
`getConfigDir(Object context)`
Get the config path.
`abstract String`
`getDataDir(Object context)`
Get the data path.
`abstract String`
`getDataResourcesDir()`
Get the directory where the data resources are located.
`abstract DialPlan[]`
`getDialPlans()`
Returns a bctbx_list_t of all DialPlans.
`abstract String`
`getDownloadDir(Object context)`
Get the download path.
`abstract String`
`getImageResourcesDir()`
Get the directory where the image resources are located.
`abstract String`
`getLiblinphonePluginsDir()`
Get the directory where the liblinphone plugins are located.
`abstract LoggingService`
`getLoggingService()`
Gets the LoggingService singleton
`abstract String`
`getMspluginsDir()`
Get the directory where the mediastreamer2 plugins are located.
`abstract long`
`getNativePointer()`
Gets the native pointer used by this class to make native method calls.
`abstract VideoDefinition[]`
`getRecommendedVideoDefinitions()`
Get the recommended list of standard video definitions.
`abstract String`
`getRingResourcesDir()`
Get the directory where the ring resources are located.
`abstract String`
`getSoundResourcesDir()`
Get the directory where the sound resources are located.
`abstract VideoDefinition[]`
`getSupportedVideoDefinitions()`
Get the list of standard video definitions supported by Linphone.
`abstract String`
`getTopResourcesDir()`
Get the top directory where the resources are located.
`abstract Object`
`getUserData()`
Gets the object stored in this object user's data
`static final Factory`
`instance()`
`abstract boolean`
`isCacheDirSet()`
Test if cache dir has been set.
`abstract boolean`
`isChatroomBackendAvailable(ChatRoom.Backend chatroomBackend)`
Indicates if the given LinphoneChatRoomBackend is available.
`abstract boolean`
`isConfigDirSet()`
Test if config dir has been set.
`abstract boolean`
`isDatabaseStorageAvailable()`
Indicates if the storage in database is available.
`abstract boolean`
`isDataDirSet()`
Test if data dir has been set.
`abstract boolean`
`isDownloadDirSet()`
Test if download dir has been set.
`abstract boolean`
`isImdnAvailable()`
Indicates if IMDN are available.
`abstract boolean`
`isQrcodeAvailable()`
Indicates if the QRCode feature is available.
`abstract void`
`setCacheDir(String path)`
Set the directory where the application local cache is located.
`abstract void`
`setConfigDir(String path)`
Set the directory where the configurations are located.
`abstract void`
`setDataDir(String path)`
Set the directory where the application local data are located.
`abstract void`
`setDataResourcesDir(String path)`
Set the directory where the data resources are located.
`abstract void`
`setDebugMode(boolean enable, String tag)`
Deprecated.
use
invalid reference

    #enableVerboseLogs

, `setLoggerDomain(java.lang.String)` and `LoggingService.setLogLevel(org.linphone.core.LogLevel)` instead.
`abstract void`
`setDownloadDir(String path)`
Set the directory where downloads are located.
`abstract void`
`setImageResourcesDir(String path)`
Set the directory where the image resources are located.
`abstract void`
`setLiblinphonePluginsDir(String path)`
Set the directory where the liblinphone plugins are located.
`abstract void`
`setLogCollectionPath(String path)`
Sets the log collection path.
`abstract void`
`setLoggerDomain(String domain)`
Used to change the domain name in the app Logger (default is Linphone).
`abstract void`
`setMspluginsDir(String path)`
Set the directory where the mediastreamer2 plugins are located.
`abstract void`
`setRingResourcesDir(String path)`
Set the directory where the ring resources are located.
`abstract void`
`setSoundResourcesDir(String path)`
Set the directory where the sound resources are located.
`abstract void`
`setTopResourcesDir(String path)`
Set the top directory where the resources are located.
`abstract void`
`setUserData(Object data)`
Sets the object to store in this object user's data
`abstract boolean`
`setVfsEncryption(int encryptionModule, byte[] secret, int secretSize)`
Select encryption module and set secret material to encrypt the files.
`abstract int`
`writeQrcodeFile(String filePath, String code, int width, int height, int margin)`
Creates a QRCode and write it into a JPEG file specified by file_path (only if
build with JPEG).

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Factory

public Factory()

## Method Details

### instance

public static final Factory instance()

### getLoggingService

public abstract LoggingService getLoggingService()
Gets the LoggingService singleton

### setDebugMode

public abstract void setDebugMode(boolean enable, String tag)
Deprecated.
use
invalid reference

    #enableVerboseLogs

, `setLoggerDomain(java.lang.String)` and `LoggingService.setLogLevel(org.linphone.core.LogLevel)` instead.
When enabled, sets the verbosity level to MESSAGE and every log will be printed into logcat.

### setLoggerDomain

public abstract void setLoggerDomain(String domain)
Used to change the domain name in the app Logger (default is Linphone).

### enableLogcatLogs

public abstract void enableLogcatLogs(boolean enable)
When enabled logs are printed into logcat. warning: This won't have any effect if there is a `LoggingServiceListener` set by the app!

### setCacheDir

public abstract void setCacheDir(String path)
Set the directory where the application local cache is located.
If the path is empty (default value), the path will be computed when calling
`getDataDir(java.lang.Object)`

Parameters:
  `path` - The path to the directory where the application local cache is
  located

### setConfigDir

public abstract void setConfigDir(String path)
Set the directory where the configurations are located.
If the path is empty (default value), the path will be computed when calling
`getConfigDir(java.lang.Object)`

Parameters:
  `path` - The path to the directory where the configurations are located

### setDataDir

public abstract void setDataDir(String path)
Set the directory where the application local data are located.
If the path is empty (default value), the path will be computed when calling
`getDataDir(java.lang.Object)`

Parameters:
  `path` - The path to the directory where the application local data are
  located

### getDataResourcesDir

public abstract String getDataResourcesDir()
Get the directory where the data resources are located.

Returns:
  The path to the directory where the data resources are located

### setDataResourcesDir

public abstract void setDataResourcesDir(String path)
Set the directory where the data resources are located.

Parameters:
  `path` - The path where the data resources are located

### getDialPlans

public abstract DialPlan[] getDialPlans()
Returns a bctbx_list_t of all DialPlans.

Returns:
  A list of `DialPlan`

### setDownloadDir

public abstract void setDownloadDir(String path)
Set the directory where downloads are located.
If the path is empty (default value), the path will be computed when calling
`getDownloadDir(java.lang.Object)`

Parameters:
  `path` - The path to the directory where downloads are located

### getImageResourcesDir

public abstract String getImageResourcesDir()
Get the directory where the image resources are located.

Returns:
  The path to the directory where the image resources are located

### setImageResourcesDir

public abstract void setImageResourcesDir(String path)
Set the directory where the image resources are located.

Parameters:
  `path` - The path where the image resources are located

### isCacheDirSet

public abstract boolean isCacheDirSet()
Test if cache dir has been set.

Returns:
  true if cache dir has been set.

### isConfigDirSet

public abstract boolean isConfigDirSet()
Test if config dir has been set.

Returns:
  true if config dir has been set.

### isDataDirSet

public abstract boolean isDataDirSet()
Test if data dir has been set.

Returns:
  true if data dir has been set.

### isDatabaseStorageAvailable

public abstract boolean isDatabaseStorageAvailable()
Indicates if the storage in database is available.

Returns:
  true if the database storage is available, false otherwise

### isDownloadDirSet

public abstract boolean isDownloadDirSet()
Test if download dir has been set.

Returns:
  true if download dir has been set.

### isImdnAvailable

public abstract boolean isImdnAvailable()
Indicates if IMDN are available.

Returns:
  true if IDMN are available

### isQrcodeAvailable

public abstract boolean isQrcodeAvailable()
Indicates if the QRCode feature is available.

Returns:
  true if QRCodes can be used

### getLiblinphonePluginsDir

public abstract String getLiblinphonePluginsDir()
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.

### setLiblinphonePluginsDir

public abstract void setLiblinphonePluginsDir(String path)
Set the directory where the liblinphone plugins are located.

Parameters:
  `path` - The path to the directory where the liblinphone plugins are located

### setLogCollectionPath

public abstract void setLogCollectionPath(String path)
Sets the log collection path.

Parameters:
  `path` - the path of the logs

### getMspluginsDir

public abstract String getMspluginsDir()
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.

### setMspluginsDir

public abstract void setMspluginsDir(String path)
Set the directory where the mediastreamer2 plugins are located.

Parameters:
  `path` - The path to the directory where the mediastreamer2 plugins are
  located

### getRecommendedVideoDefinitions

public abstract VideoDefinition[] getRecommendedVideoDefinitions()
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.

### getRingResourcesDir

public abstract String getRingResourcesDir()
Get the directory where the ring resources are located.

Returns:
  The path to the directory where the ring resources are located

### setRingResourcesDir

public abstract void setRingResourcesDir(String path)
Set the directory where the ring resources are located.

Parameters:
  `path` - The path where the ring resources are located

### getSoundResourcesDir

public abstract String getSoundResourcesDir()
Get the directory where the sound resources are located.

Returns:
  The path to the directory where the sound resources are located

### setSoundResourcesDir

public abstract void setSoundResourcesDir(String path)
Set the directory where the sound resources are located.

Parameters:
  `path` - The path where the sound resources are located

### getSupportedVideoDefinitions

public abstract VideoDefinition[] getSupportedVideoDefinitions()
Get the list of standard video definitions supported by Linphone.

Returns:
  A list of video definitions.

### getTopResourcesDir

public abstract String getTopResourcesDir()
Get the top directory where the resources are located.

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

### setTopResourcesDir

public abstract void setTopResourcesDir(String path)
Set the top directory where the resources are located.
If you only define this top directory, the other resources directory will
automatically be derived form this one.

Parameters:
  `path` - The path to the top directory where the resources are located

### computeHa1ForAlgorithm

public abstract String computeHa1ForAlgorithm(String userid, String password, String realm, String algorithm)
Computes the hashed version of the password given the user ID and the realm,
using given algorithm.

Parameters:
  `userid` - the username or user ID to use.
  `password` - the password to hash.
  `realm` - the real to use.
  `algorithm` - the algorithm to use (MD5 or SHA-256).
Returns:
  the generated hash if it succeeded, null otherwise.

### createAddress

public abstract Address createAddress(String addr)
Parse a string holding a SIP URI and create the according `Address`
object.

Parameters:
  `addr` - A string holding the SIP URI to parse.
Returns:
  A new `Address`.

### createAuthInfo

public abstract AuthInfo createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain)
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.

Parameters:
  `username` - The username that needs to be authenticated
  `userid` - The userid used for authenticating (use null if you don't know
  what it is)
  `passwd` - The password in clear text
  `ha1` - The ha1-encrypted password if password is not given in clear text.
  `realm` - The authentication domain (which can be larger than the sip
  domain. Unfortunately many SIP servers don't use this parameter.
  `domain` - The SIP domain for which this authentication information is
  valid, if it has to be restricted for a single SIP domain.
Returns:
  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 `Core.addAuthInfo(org.linphone.core.AuthInfo)`.

### createAuthInfo

public abstract AuthInfo createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain, String algorithm)
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.

Parameters:
  `username` - The username that needs to be authenticated
  `userid` - The userid used for authenticating (use null if you don't know
  what it is)
  `passwd` - The password in clear text
  `ha1` - The ha1-encrypted password if password is not given in clear text.
  `realm` - The authentication domain (which can be larger than the sip
  domain. Unfortunately many SIP servers don't use this parameter.
  `domain` - The SIP domain for which this authentication information is
  valid, if it has to be restricted for a single SIP domain.
  `algorithm` - The algorithm for encrypting password.
Returns:
  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 `Core.addAuthInfo(org.linphone.core.AuthInfo)`.

### createAuthInfo

public abstract AuthInfo createAuthInfo(String username, BearerToken accessToken, String realm)
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.

Parameters:
  `username` - The username that needs to be authenticated
  `accessToken` - An access token to send to authenticate
  `realm` - The authentication domain (which can be larger than the sip
  domain. Unfortunately many SIP servers don't use this parameter.
Returns:
  A `AuthInfo` object. linphone_auth_info_unref must be used to
  destroy it when no longer needed. The `Core` makes a copy of `AuthInfo`
  passed through `Core.addAuthInfo(org.linphone.core.AuthInfo)`.

### createBearerToken

public abstract BearerToken createBearerToken(String token, long expirationTime)
Create a new `BearerToken` object.
The expiration time may be set to zero if unknown, in which case the `Core`
will anyway use the refresh token if an access token is rejected by a server.

Parameters:
  `token` - the token, as an opaque string.
  `expirationTime` - the expiration time as the number of seconds since the
  Epoch, 1970-01-01 00:00:00 +0000 (UTC).
Returns:
  the newly created `BearerToken` .

### createBuffer

public abstract Buffer createBuffer()
Creates an object `Buffer`.

Returns:
  a `Buffer`

### createBufferFromData

public abstract Buffer createBufferFromData(byte[] data, int size)
Creates an object `Buffer`.

Parameters:
  `data` - the data to set in the buffer
  `size` - the size of the data
Returns:
  a `Buffer`

### createBufferFromString

public abstract Buffer createBufferFromString(String data)
Creates an object `Buffer`.

Parameters:
  `data` - the data to set in the buffer
Returns:
  a `Buffer`

### createConferenceInfo

public abstract ConferenceInfo createConferenceInfo()
Creates an object `ConferenceInfo`.

Returns:
  a `ConferenceInfo`

### createConferenceInfoFromIcalendarContent

public abstract ConferenceInfo createConferenceInfoFromIcalendarContent(Content content)
Creates an object `ConferenceInfo` from an Icalendar `Content`.

Parameters:
  `content` - the Icalendar `Content`
Returns:
  a `ConferenceInfo` created from an Icalendar `Content`

### createConfig

public abstract Config createConfig(String path)
Creates an object `Config`.

Parameters:
  `path` - the path of the config
Returns:
  a `Config`

### createConfigFromString

public abstract Config createConfigFromString(String data)
Creates an object `Config`.

Parameters:
  `data` - the config data
Returns:
  a `Config`

### createConfigWithFactory

public abstract Config createConfigWithFactory(String path, String factoryPath)
Creates an object `Config`.

Parameters:
  `path` - the path of the config
  `factoryPath` - the path of the factory
Returns:
  a `Config`

### createContent

public abstract Content createContent()
Creates an object `Content`.

Returns:
  a `Content`

### createContentFromFile

public abstract Content createContentFromFile(String filePath)
Creates a file object of `Content` from a file path.

Parameters:
  `filePath` - the path of the file
Returns:
  a `Content` which can be used as a file

### createCore

public abstract Core createCore(String configPath, String factoryConfigPath, Object systemContext)
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 `Core.start()` to that effect. The
returned `Core` will be in `GlobalState` Ready. Core ressources can
be released using `Core.stop()` which is strongly encouraged on garbage
collected languages.

Parameters:
  `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.
  `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.
  `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:
  a `Core` object
  see: linphone_core_new_with_config_3()

### createCoreWithConfig

public abstract Core createCoreWithConfig(Config config, Object systemContext)
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 `Core.start()` to that effect. The
returned `Core` will be in `GlobalState` Ready. Core ressources can
be released using `Core.stop()` which is strongly encouraged on garbage
collected languages.

Parameters:
  `config` - A `Config` object holding the configuration for the `Core`
  to be instantiated.
  `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:
  a `Core` object
  see: `createCore(java.lang.String, java.lang.String, java.lang.Object)`

### createDigestAuthenticationPolicy

public abstract DigestAuthenticationPolicy createDigestAuthenticationPolicy()
Creates a `DigestAuthenticationPolicy` object.
The `DigestAuthenticationPolicy` object is used to configure a policy for
digest authentication, such as allowing MD5 or mode without qop=auth.

Returns:
  A new `DigestAuthenticationPolicy`.

### createEktInfo

public abstract EktInfo createEktInfo()
Creates an empty `EktInfo` object.

Returns:
  A new `EktInfo` object

### createErrorInfo

public abstract ErrorInfo createErrorInfo()
Creates an object LinphoneErrorInfo.

Returns:
  a `ErrorInfo` object.

### createFriendPhoneNumber

public abstract FriendPhoneNumber createFriendPhoneNumber(String phoneNumber, String label)
Creates a new `FriendPhoneNumber` object.

Parameters:
  `phoneNumber` - The phone number.
  `label` - the type of phone number, for example "home", "cell", etc. Use
  null or empty for no label.
Returns:
  The newly created `FriendPhoneNumber` object.

### createMessageWaitingIndicationFromContent

public abstract MessageWaitingIndication createMessageWaitingIndicationFromContent(Content content)
Creates a `MessageWaitingIndication` object from a `Content`.

Parameters:
  `content` - `Content` object.
Returns:
  The parsed message waiting indication if the content contains one, null
  otherwise.

### createParticipantDeviceIdentity

public abstract ParticipantDeviceIdentity createParticipantDeviceIdentity(Address address, String name)
Creates a `ParticipantDeviceIdentity` object.

Parameters:
  `address` - `Address` object.
  `name` - The name given to the device.
Returns:
  A new `ParticipantDeviceIdentity`.

### createParticipantInfo

public abstract ParticipantInfo createParticipantInfo(Address address)
Creates an object `ConferenceInfo` from an Icalendar `Content`.

Parameters:
  `address` - the `Address` of the participant
Returns:
  a `ParticipantInfo`

### createQrcode

public abstract Content createQrcode(String code, int width, int height, int margin)
Creates a Bitmap QRCode and return it into an object `Content`.

Parameters:
  `code` - The code to be generated into an image. It must not be empty.
  `width` - The requested width of the QRCode image. It will be 100 if 0.
  `height` - The requested height of the QRCode image. It will be 100 if 0.
  `margin` - The requested margin of the QRCode image.
Returns:
  a `Content`

### createRange

public abstract Range createRange()
Creates an object LinphoneRange.

Returns:
  a `Range` object.

### createSignalInformation

public abstract SignalInformation createSignalInformation()
Creates an object `SignalInformation`.

Returns:
  a `SignalInformation`

### createTransports

public abstract Transports createTransports()
Creates an object LinphoneTransports.

Returns:
  a `Transports` object.

### createTunnelConfig

public abstract TunnelConfig createTunnelConfig()
Creates an object `TunnelConfig`.

Returns:
  a `TunnelConfig`

### createVcard

public abstract Vcard createVcard()
Creates an empty `Vcard`.

Returns:
  A new `Vcard`.

### createVideoActivationPolicy

public abstract VideoActivationPolicy createVideoActivationPolicy()
Creates an object LinphoneVideoActivationPolicy.

Returns:
  `VideoActivationPolicy` object.

### createVideoDefinition

public abstract VideoDefinition createVideoDefinition(int width, int height)
Creates a `VideoDefinition` from a given width and height.

Parameters:
  `width` - The width of the created video definition
  `height` - The height of the created video definition
Returns:
  A new `VideoDefinition` object

### createVideoDefinitionFromName

public abstract VideoDefinition createVideoDefinitionFromName(String name)
Creates a `VideoDefinition` from a given standard definition name.

Parameters:
  `name` - The standard definition name of the video definition to create
Returns:
  A new `VideoDefinition` object

### createVideoSourceDescriptor

public abstract VideoSourceDescriptor createVideoSourceDescriptor()
Creates an object `VideoSourceDescriptor`.

Returns:
  a `VideoSourceDescriptor`

### enableLogCollection

public abstract void enableLogCollection(LogCollectionState state)
Enables or disables log collection.

Parameters:
  `state` - the `LogCollectionState` for log collection

### getCacheDir

public abstract String getCacheDir(Object context)
Get the cache path.

Parameters:
  `context` - used to compute path. Can be null. JavaPlatformHelper on Android
  and char *appGroupId on iOS with shared core.
Returns:
  The cache path

### getConfigDir

public abstract String getConfigDir(Object context)
Get the config path.

Parameters:
  `context` - used to compute path. Can be null. JavaPlatformHelper on Android
  and char *appGroupId on iOS with shared core.
Returns:
  The config path

### getDataDir

public abstract String getDataDir(Object context)
Get the data path.

Parameters:
  `context` - used to compute path. Can be null. JavaPlatformHelper on Android
  and char *appGroupId on iOS with shared core.
Returns:
  The data path

### getDownloadDir

public abstract String getDownloadDir(Object context)
Get the download path.

Parameters:
  `context` - used to compute path. Can be null. JavaPlatformHelper on Android
  and char *appGroupId on iOS with shared core.
Returns:
  The download path

### isChatroomBackendAvailable

public abstract boolean isChatroomBackendAvailable(ChatRoom.Backend chatroomBackend)
Indicates if the given LinphoneChatRoomBackend is available.

Parameters:
  `chatroomBackend` - the
  invalid reference

      ChatRoom#Backend

Returns:
  true if the chatroom backend is available, false otherwise

### setVfsEncryption

public abstract boolean setVfsEncryption(int encryptionModule, byte[] secret, int secretSize)
Select encryption module and set secret material to encrypt the files.

Parameters:
  `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
  `secret` - the secret material used to encrypt the files, can be null for
  the _PLAIN module
  `secretSize` - size of the secret
Returns:
  true if everything went well, false if it appears that the given secret
  is unable to decrypt existing configuration

### writeQrcodeFile

public abstract int writeQrcodeFile(String filePath, String code, int width, int height, int margin)
Creates a QRCode and write it into a JPEG file specified by file_path (only if
build with JPEG).

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

### setUserData

public abstract void setUserData(Object data)
Sets the object to store in this object user's data

Parameters:
  `data` - the object to store

### getUserData

public abstract Object getUserData()
Gets the object stored in this object user's data

Returns:
  the object store if any, null otherwise

### getNativePointer

public abstract long getNativePointer()
Gets the native pointer used by this class to make native method calls.

Returns:
  the nativer pointer, as long