public abstract class Factory
extends java.lang.Object
Constructor | Description |
---|---|
Factory() |
Modifier and Type | Method | Description |
---|---|---|
abstract java.lang.String |
computeHa1ForAlgorithm(java.lang.String userid,
java.lang.String password,
java.lang.String realm,
java.lang.String algorithm) |
Computes the hashed version of the password given the user ID and the realm,
using given algorithm. |
abstract Address |
createAddress(java.lang.String addr) |
Parse a string holding a SIP URI and create the according
Address object. |
abstract AuthInfo |
createAuthInfo(java.lang.String username,
java.lang.String userid,
java.lang.String passwd,
java.lang.String ha1,
java.lang.String realm,
java.lang.String domain) |
Creates a
AuthInfo object. |
abstract AuthInfo |
createAuthInfo(java.lang.String username,
java.lang.String userid,
java.lang.String passwd,
java.lang.String ha1,
java.lang.String realm,
java.lang.String domain,
java.lang.String algorithm) |
Creates a
AuthInfo object. |
abstract Buffer |
createBuffer() |
Creates an object
Buffer . |
abstract Buffer |
createBufferFromData(byte[] data,
int size) |
Creates an object
Buffer . |
abstract Buffer |
createBufferFromString(java.lang.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(java.lang.String path) |
Creates an object
Config . |
abstract Config |
createConfigFromString(java.lang.String data) |
Creates an object
Config . |
abstract Config |
createConfigWithFactory(java.lang.String path,
java.lang.String factoryPath) |
Creates an object
Config . |
abstract Content |
createContent() |
Creates an object
Content . |
abstract Content |
createContentFromFile(java.lang.String filePath) |
Creates a file object of
Content from a file path. |
abstract Core |
createCore(java.lang.String configPath,
java.lang.String factoryConfigPath,
java.lang.Object systemContext) |
Instantiate a
Core object. |
abstract Core |
createCoreWithConfig(Config config,
java.lang.Object systemContext) |
Instantiate a
Core object with a given LinphoneConfig. |
abstract DigestAuthenticationPolicy |
createDigestAuthenticationPolicy() |
Create a
DigestAuthenticationPolicy object. |
abstract ErrorInfo |
createErrorInfo() |
Creates an object LinphoneErrorInfo.
|
abstract FriendPhoneNumber |
createFriendPhoneNumber(java.lang.String phoneNumber,
java.lang.String label) |
Creates a new
FriendPhoneNumber objects. |
abstract ParticipantDeviceIdentity |
createParticipantDeviceIdentity(Address address,
java.lang.String name) |
Create a
ParticipantDeviceIdentity object. |
abstract Content |
createQrcode(java.lang.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 Transports |
createTransports() |
Creates an object LinphoneTransports.
|
abstract TunnelConfig |
createTunnelConfig() |
Creates an object
TunnelConfig . |
abstract Vcard |
createVcard() |
Create an empty
Vcard . |
abstract VideoActivationPolicy |
createVideoActivationPolicy() |
Creates an object LinphoneVideoActivationPolicy.
|
abstract VideoDefinition |
createVideoDefinition(int width,
int height) |
Create a
VideoDefinition from a given width and height. |
abstract VideoDefinition |
createVideoDefinitionFromName(java.lang.String name) |
Create 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 java.lang.String |
getCacheDir(java.lang.Object context) |
Get the cache path.
|
abstract java.lang.String |
getConfigDir(java.lang.Object context) |
Get the config path.
|
abstract Core |
getCore(long ptr) |
|
abstract java.lang.String |
getDataDir(java.lang.Object context) |
Get the data path.
|
abstract java.lang.String |
getDataResourcesDir() |
Get the directory where the data resources are located.
|
abstract DialPlan[] |
getDialPlans() |
Returns a bctbx_list_t of all DialPlans.
|
abstract java.lang.String |
getDownloadDir(java.lang.Object context) |
Get the download path.
|
abstract java.lang.String |
getImageResourcesDir() |
Get the directory where the image resources are located.
|
abstract LoggingService |
getLoggingService() |
Gets the LoggingService singleton
|
abstract java.lang.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 java.lang.String |
getRingResourcesDir() |
Get the directory where the ring resources are located.
|
abstract java.lang.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 java.lang.String |
getTopResourcesDir() |
Get the top directory where the resources are located.
|
abstract java.lang.Object |
getUserData() |
Gets the object stored in this object user's data
|
static Factory |
instance() |
|
abstract boolean |
isCacheDirSet() |
Test if cache dir has been set.
|
abstract boolean |
isChatroomBackendAvailable(ChatRoomBackend 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(java.lang.String path) |
Set the directory where the application local cache is located.
|
abstract void |
setConfigDir(java.lang.String path) |
Set the directory where the configurations are located.
|
abstract void |
setDataDir(java.lang.String path) |
Set the directory where the application local data are located.
|
abstract void |
setDataResourcesDir(java.lang.String path) |
Set the directory where the data resources are located.
|
abstract void |
setDebugMode(boolean enable,
java.lang.String tag) |
Deprecated.
use
#enableVerboseLogs , setLoggerDomain(java.lang.String) and LoggingService.setLogLevel(org.linphone.core.LogLevel) instead. |
abstract void |
setDownloadDir(java.lang.String path) |
Set the directory where downloads are located.
|
abstract void |
setImageResourcesDir(java.lang.String path) |
Set the directory where the image resources are located.
|
abstract void |
setLogCollectionPath(java.lang.String path) |
Sets the log collection path.
|
abstract void |
setLoggerDomain(java.lang.String domain) |
Used to change the domain name in the app Logger (default is Linphone).
|
abstract void |
setMspluginsDir(java.lang.String path) |
Set the directory where the mediastreamer2 plugins are located.
|
abstract void |
setRingResourcesDir(java.lang.String path) |
Set the directory where the ring resources are located.
|
abstract void |
setSoundResourcesDir(java.lang.String path) |
Set the directory where the sound resources are located.
|
abstract void |
setTopResourcesDir(java.lang.String path) |
Set the top directory where the resources are located.
|
abstract void |
setUserData(java.lang.Object data) |
Sets the object to store in this object user's data
|
abstract void |
setVfsEncryption(int encryptionModule,
byte[] secret,
int secretSize) |
Select encryption module and set secret material to encrypt the files.
|
abstract int |
writeQrcodeFile(java.lang.String filePath,
java.lang.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). |
public static final Factory instance()
public abstract LoggingService getLoggingService()
public abstract void setDebugMode(boolean enable, java.lang.String tag)
#enableVerboseLogs
, setLoggerDomain(java.lang.String)
and LoggingService.setLogLevel(org.linphone.core.LogLevel)
instead.public abstract void setLoggerDomain(java.lang.String domain)
public abstract void enableLogcatLogs(boolean enable)
LoggingServiceListener
set by the app!public abstract Core getCore(long ptr)
public abstract void setCacheDir(@Nullable java.lang.String path)
getDataDir(java.lang.Object)
path
- The path to the directory where the application local cache ispublic abstract void setConfigDir(@Nullable java.lang.String path)
getConfigDir(java.lang.Object)
path
- The path to the directory where the configurations are located public abstract void setDataDir(@Nullable java.lang.String path)
getDataDir(java.lang.Object)
path
- The path to the directory where the application local data are@Nullable public abstract java.lang.String getDataResourcesDir()
public abstract void setDataResourcesDir(@Nullable java.lang.String path)
path
- The path where the data resources are located @NonNull public abstract DialPlan[] getDialPlans()
DialPlan
public abstract void setDownloadDir(@Nullable java.lang.String path)
getDownloadDir(java.lang.Object)
path
- The path to the directory where downloads are located @Nullable public abstract java.lang.String getImageResourcesDir()
public abstract void setImageResourcesDir(@Nullable java.lang.String path)
path
- The path where the image resources are located public abstract boolean isCacheDirSet()
public abstract boolean isConfigDirSet()
public abstract boolean isDataDirSet()
public abstract boolean isDatabaseStorageAvailable()
public abstract boolean isDownloadDirSet()
public abstract boolean isImdnAvailable()
public abstract boolean isQrcodeAvailable()
public abstract void setLogCollectionPath(@Nullable java.lang.String path)
path
- the path of the logs @Nullable public abstract java.lang.String getMspluginsDir()
public abstract void setMspluginsDir(@Nullable java.lang.String path)
path
- The path to the directory where the mediastreamer2 plugins are@NonNull public abstract VideoDefinition[] getRecommendedVideoDefinitions()
@Nullable public abstract java.lang.String getRingResourcesDir()
public abstract void setRingResourcesDir(@Nullable java.lang.String path)
path
- The path where the ring resources are located @Nullable public abstract java.lang.String getSoundResourcesDir()
public abstract void setSoundResourcesDir(@Nullable java.lang.String path)
path
- The path where the sound resources are located @NonNull public abstract VideoDefinition[] getSupportedVideoDefinitions()
@Nullable public abstract java.lang.String getTopResourcesDir()
public abstract void setTopResourcesDir(@Nullable java.lang.String path)
path
- The path to the top directory where the resources are located @Nullable public abstract java.lang.String computeHa1ForAlgorithm(@NonNull java.lang.String userid, @NonNull java.lang.String password, @NonNull java.lang.String realm, @NonNull java.lang.String algorithm)
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). @Nullable public abstract Address createAddress(@NonNull java.lang.String addr)
addr
- A string holding the SIP URI to parse. Address
. @NonNull public abstract AuthInfo createAuthInfo(@NonNull java.lang.String username, @Nullable java.lang.String userid, @Nullable java.lang.String passwd, @Nullable java.lang.String ha1, @Nullable java.lang.String realm, @Nullable java.lang.String domain, @Nullable java.lang.String algorithm)
AuthInfo
object. username
- The username that needs to be authenticated userid
- The userid used for authenticating (use null if you don't knowpasswd
- 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 sipdomain
- The SIP domain for which this authentication information isalgorithm
- The algorithm for encrypting password. AuthInfo
object. linphone_auth_info_destroy must be used toCore
makes a copy of AuthInfo
Core.addAuthInfo(org.linphone.core.AuthInfo)
. @NonNull public abstract AuthInfo createAuthInfo(@NonNull java.lang.String username, @Nullable java.lang.String userid, @Nullable java.lang.String passwd, @Nullable java.lang.String ha1, @Nullable java.lang.String realm, @Nullable java.lang.String domain)
AuthInfo
object. username
- The username that needs to be authenticated userid
- The userid used for authenticating (use null if you don't knowpasswd
- 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 sipdomain
- The SIP domain for which this authentication information isAuthInfo
object. linphone_auth_info_destroy must be used toCore
makes a copy of AuthInfo
Core.addAuthInfo(org.linphone.core.AuthInfo)
. @NonNull public abstract Buffer createBufferFromData(@NonNull byte[] data, int size)
data
- the data to set in the buffer size
- the size of the data Buffer
@NonNull public abstract Buffer createBufferFromString(@NonNull java.lang.String data)
data
- the data to set in the buffer Buffer
@NonNull public abstract ConferenceInfo createConferenceInfo()
ConferenceInfo
@Nullable public abstract ConferenceInfo createConferenceInfoFromIcalendarContent(@NonNull Content content)
content
- the Icalendar Content
ConferenceInfo
created from an Icalendar Content
@NonNull public abstract Config createConfig(@Nullable java.lang.String path)
path
- the path of the config Config
@NonNull public abstract Config createConfigFromString(@NonNull java.lang.String data)
data
- the config data Config
@NonNull public abstract Config createConfigWithFactory(@Nullable java.lang.String path, @Nullable java.lang.String factoryPath)
path
- the path of the config factoryPath
- the path of the factory Config
@NonNull public abstract Content createContentFromFile(@NonNull java.lang.String filePath)
filePath
- the path of the file Content
which can be used as a file @NonNull public abstract Core createCore(@Nullable java.lang.String configPath, @Nullable java.lang.String factoryConfigPath, @Nullable java.lang.Object systemContext)
Core
object. Core
object is the primary handle for doing all phone actions. ItCore
object is notCore.start()
to that effect. TheCore
will be in GlobalState
Ready. Core ressources canCore.stop()
which is strongly encouraged on garbageconfigPath
- A path to a config file. If it does not exists it will beCore
object. ItCore
will not storefactoryConfigPath
- A path to a read-only config file that can be used tosystemContext
- A pointer to a system object required by the core toCore
object @NonNull public abstract Core createCoreWithConfig(@NonNull Config config, @Nullable java.lang.Object systemContext)
Core
object with a given LinphoneConfig. Core
object is the primary handle for doing all phone actions. ItCore
object is notCore.start()
to that effect. TheCore
will be in GlobalState
Ready. Core ressources canCore.stop()
which is strongly encouraged on garbageconfig
- A Config
object holding the configuration for the Core
systemContext
- A pointer to a system object required by the core toCore
object createCore(java.lang.String, java.lang.String, java.lang.Object)
@NonNull public abstract DigestAuthenticationPolicy createDigestAuthenticationPolicy()
DigestAuthenticationPolicy
object. DigestAuthenticationPolicy
object which is used to configure aDigestAuthenticationPolicy
. @NonNull public abstract ErrorInfo createErrorInfo()
ErrorInfo
object. @NonNull public abstract FriendPhoneNumber createFriendPhoneNumber(@NonNull java.lang.String phoneNumber, @Nullable java.lang.String label)
phoneNumber
- The phone number. label
- the type of phone number, for example "home", "cell", etc. UseFriendPhoneNumber
object. @NonNull public abstract ParticipantDeviceIdentity createParticipantDeviceIdentity(@NonNull Address address, @Nullable java.lang.String name)
address
- Address
object. name
- the name given to the device. ParticipantDeviceIdentity
. @Nullable public abstract Content createQrcode(@NonNull java.lang.String code, int width, int height, int margin)
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. Content
@NonNull public abstract Range createRange()
Range
object. @NonNull public abstract Transports createTransports()
Transports
object. @NonNull public abstract TunnelConfig createTunnelConfig()
TunnelConfig
@NonNull public abstract VideoActivationPolicy createVideoActivationPolicy()
VideoActivationPolicy
object. @NonNull public abstract VideoDefinition createVideoDefinition(int width, int height)
width
- The width of the created video definition height
- The height of the created video definition VideoDefinition
object @NonNull public abstract VideoDefinition createVideoDefinitionFromName(@NonNull java.lang.String name)
name
- The standard definition name of the video definition to create VideoDefinition
object @NonNull public abstract VideoSourceDescriptor createVideoSourceDescriptor()
VideoSourceDescriptor
public abstract void enableLogCollection(LogCollectionState state)
state
- the LogCollectionState
for log collection @Nullable public abstract java.lang.String getCacheDir(@Nullable java.lang.Object context)
context
- used to compute path. Can be null. JavaPlatformHelper on Android@Nullable public abstract java.lang.String getConfigDir(@Nullable java.lang.Object context)
context
- used to compute path. Can be null. JavaPlatformHelper on Android@Nullable public abstract java.lang.String getDataDir(@Nullable java.lang.Object context)
context
- used to compute path. Can be null. JavaPlatformHelper on Android@Nullable public abstract java.lang.String getDownloadDir(@Nullable java.lang.Object context)
context
- used to compute path. Can be null. JavaPlatformHelper on Androidpublic abstract boolean isChatroomBackendAvailable(ChatRoomBackend chatroomBackend)
chatroomBackend
- the ChatRoomBackend
public abstract void setVfsEncryption(int encryptionModule, @Nullable byte[] secret, int secretSize)
encryptionModule
- One of the available encryption module for VFS, pick insecret
- the secret material used to encrypt the files, can be null forsecretSize
- size of the secret public abstract int writeQrcodeFile(@NonNull java.lang.String filePath, @NonNull java.lang.String code, int width, int height, int margin)
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. public abstract void setUserData(java.lang.Object data)
data
- the object to storepublic abstract java.lang.Object getUserData()
public abstract long getNativePointer()