Factory
public class Factory : LinphoneObject
Factory is a singleton object devoted to the creation of all the object of
Liblinphone that cannot be created by Core itself.
-
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 get().
Declaration
Swift
public static func clean() -
Create the
Factoryif that has not been done and return a pointer on it.Declaration
Swift
public static var Instance: Factory { get }Return Value
A pointer on the
Factory -
Get the directory where the data resources are located.
Declaration
Swift
public var dataResourcesDir: String { get set }Return Value
The path to the directory where the data resources are located
-
Get the directory where the image resources are located.
Declaration
Swift
public var imageResourcesDir: String { get set }Return Value
The path to the directory where the image resources are located
-
Indicates if the storage in database is available.
Declaration
Swift
public var isDatabaseStorageAvailable: Bool { get }Return Value
if the database storage is available, true otherwise
-
Indicates if IMDN are available.
Declaration
Swift
public var isImdnAvailable: Bool { get }Return Value
if IDMN are available
-
Sets the log collection path.
Declaration
Swift
public var logCollectionPath: String { get set }Parameters
paththe path of the logs
-
Get the directory where the mediastreamer2 plugins are located.
Declaration
Swift
public var mspluginsDir: String { get set }Return Value
The path to the directory where the mediastreamer2 plugins are located, or nil if it has not been set
-
Get the directory where the ring resources are located.
Declaration
Swift
public var ringResourcesDir: String { get set }Return Value
The path to the directory where the ring resources are located
-
Get the directory where the sound resources are located.
Declaration
Swift
public var soundResourcesDir: String { get set }Return Value
The path to the directory where the sound resources are located
-
Get the list of standard video definitions supported by Linphone.
Declaration
Swift
public var supportedVideoDefinitions: [VideoDefinition] { get }Return Value
A list of
VideoDefinitionobjects. LinphoneVideoDefinition -
Get the top directory where the resources are located.
Declaration
Swift
public var topResourcesDir: String { get set }Return Value
The path to the top directory where the resources are located
-
Creates a
AuthInfoobject. The object can be created empty, that is with all arguments set to nil. Username, userid, password, realm and domain can be set later using specific methods. At the end, username and passwd (or ha1) are required.Declaration
Swift
public func createAuthInfo(username: String, userid: String, passwd: String, ha1: String, realm: String, domain: String, algorithm: String) throws -> AuthInfoParameters
usernameThe username that needs to be authenticated
useridThe userid used for authenticating (use nil 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.
-
Creates a
AuthInfoobject. The object can be created empty, that is with all arguments set to nil. Username, userid, password, realm and domain can be set later using specific methods. At the end, username and passwd (or ha1) are required.Declaration
Swift
public func createAuthInfo(username: String, userid: String, passwd: String, ha1: String, realm: String, domain: String) throws -> AuthInfoParameters
usernameThe username that needs to be authenticated
useridThe userid used for authenticating (use nil 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.
-
Instantiate a
Coreobject. TheCoreobject is the primary handle for doing all phone actions. It should be unique within your application. TheCoreobject is not started automatically, you need to call Core.start() to that effect. The returnedCorewill be in LinphoneGlobalState Ready. Core ressources can be released using Core.stop() which is strongly encouraged on garbage collected languages.See
See also: linphone_core_new_with_config_3
Declaration
Swift
public func createCore(configPath: String, factoryConfigPath: String, systemContext: UnsafeMutableRawPointer?) throws -> CoreParameters
configPathfactoryConfigPathA 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 nil 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 nil on other platforms.
-
Instantiate a
Coreobject with a given LinphoneConfig. TheCoreobject is the primary handle for doing all phone actions. It should be unique within your application. TheCoreobject is not started automatically, you need to call Core.start() to that effect. The returnedCorewill be in LinphoneGlobalState Ready. Core ressources can be released using Core.stop() which is strongly encouraged on garbage collected languages.See
See also: linphone_factory_create_core_3
Declaration
-
Create a #LinphoneParticipantDeviceIdentity object.
Declaration
Swift
public func createParticipantDeviceIdentity(address: Address, name: String) throws -> ParticipantDeviceIdentityParameters
addressAddressobject.namethe name given to the device.
Return Value
A new #LinphoneParticipantDeviceIdentity.
-
Creates an object LinphoneTransports.
Declaration
Swift
public func createTransports() throws -> TransportsReturn Value
Transportsobject. -
Creates an object
TunnelConfig.Declaration
Swift
public func createTunnelConfig() throws -> TunnelConfigReturn Value
-
Creates an object LinphoneVideoActivationPolicy.
Declaration
Swift
public func createVideoActivationPolicy() throws -> VideoActivationPolicyReturn Value
VideoActivationPolicyobject. -
Create a
VideoDefinitionfrom a given width and height.Declaration
Swift
public func createVideoDefinition(width: UInt, height: UInt) throws -> VideoDefinitionParameters
widthThe width of the created video definition
heightThe height of the created video definition
Return Value
A new
VideoDefinitionobject -
Create a
VideoDefinitionfrom a given standard definition name.Declaration
Swift
public func createVideoDefinitionFromName(name: String) throws -> VideoDefinitionParameters
nameThe standard definition name of the video definition to create
Return Value
A new
VideoDefinitionobject -
Enables or disables log collection.
Declaration
Swift
public func enableLogCollection(state: LogCollectionState)Parameters
statethe policy for log collection
-
Indicates if the given LinphoneChatRoomBackend is available.
Declaration
Swift
public func isChatroomBackendAvailable(chatroomBackend: ChatRoomBackend) -> BoolParameters
chatroomBackendthe LinphoneChatRoomBackend
Return Value
if the chatroom backend is available, true otherwise
Factory Class Reference