ZDK
|
ZDK's main entry point. More...
#include <IContext.h>
Public Member Functions | |
virtual ZDK::Shared::Result | InitDNS (void *jvm, void *connectivityManager)=0 |
Initialize DNS when used on Android. More... | |
virtual ZDK::Shared::Result | StartContext ()=0 |
Initialize the ZDK. More... | |
virtual ZDK::Shared::Result | StopContext ()=0 |
Destroys the ZDK. More... | |
virtual ZDK::Shared::Result | AddProtocol (ZDK::ProtocolType proto, int port)=0 |
Creates a call manager instance for a protocol. More... | |
virtual bool | ContextRunning () const =0 |
Returnes whether the context is running and functional. More... | |
virtual ZDK::Shared::Result | TestSIPURI (ZDK::Shared::String sipURI)=0 |
Checks if a string is a SIP AoR or SIP Uri. More... | |
virtual void | SetStatusListener (ZDK::Shared::ContextEventsHandler value)=0 |
Configures the context event listener. More... | |
virtual ZDK::Shared::Result | NetworkChanged ()=0 |
Notify the ZDK for changed network event. More... | |
virtual ZDK::Shared::CallsProvider | CallsProvider ()=0 |
Gets the active calls information provider. More... | |
virtual ZDK::Shared::AccountProvider | AccountProvider ()=0 |
Gets the account information and control provider. More... | |
virtual ZDK::Shared::ConferenceProvider | ConferenceProvider ()=0 |
Gets the conference controlling helper. More... | |
virtual ZDK::Shared::DNSRequestProvider | DNSRequestProvider ()=0 |
Gets the DNS resolving requests provider. More... | |
virtual ZDK::Shared::ContextConfiguration | Configuration ()=0 |
Gets the general ZDK/Context configuration. More... | |
virtual ZDK::Shared::EncryptionConfiguration | EncryptionConfiguration ()=0 |
Gets the encription specific configuration. More... | |
virtual ZDK::Shared::AudioEndpointControl | AudioControls ()=0 |
Gets the audio endpoint's main entry point. More... | |
virtual ZDK::Shared::VideoEndpointControl | VideoControls ()=0 |
Gets the video endpoint's main entry point. More... | |
virtual ZDK::Shared::RingBackToneControl | Ringback ()=0 |
Ringback tone's main entry point. More... | |
virtual ZDK::Shared::Activation | Activation ()=0 |
Gets the ZDK's Activation process handler. More... | |
virtual ZDK::Shared::Log | Logger ()=0 |
Gets the ZDK's debug logging facility instance. More... | |
virtual ZDK::Shared::String | LibraryVersion ()=0 |
Get the ZDK version. More... | |
![]() | |
virtual ZDK::ZDKHandle | Handle () const =0 |
virtual | operator ZDK::ZDKHandle () const =0 |
virtual void | Initialize ()=0 |
virtual void | ReleaseReference ()=0 |
ZDK's main entry point.
|
pure virtual |
Gets the account information and control provider.
Manages creation and destruction of user accounts and provides information regarding them.
|
pure virtual |
|
pure virtual |
Creates a call manager instance for a protocol.
Creates a call manager instance for a specific protocol.
Protocol MUST be added before creating accounts using it!
Will be automatically destroyed by StopContext().
Some call managers are automatically created by StartContext(). SIP cannot be created by this function.
[in] | proto | Protocol |
[in] | port | Port at which to bind the main socket |
|
pure virtual |
Gets the audio endpoint's main entry point.
Entry point for controlling the audio endpoint
|
pure virtual |
|
pure virtual |
|
pure virtual |
Gets the general ZDK/Context configuration.
The configuration is applied with StartContext()! Any changes after StartContext() has been invoked will not take effect until a restart happens - StopContext() followed by StartContext().
|
pure virtual |
Returnes whether the context is running and functional.
|
pure virtual |
Gets the DNS resolving requests provider.
|
pure virtual |
Gets the encription specific configuration.
|
pure virtual |
Initialize DNS when used on Android.
Automatically invoked from the zdk.jni! MUST be called before StartContext()!
Performs initializations internally required by the c-ares library when used on Android.
As of Android 8 (API level 26) getting DNS server information has become more restrictive and can only be accessed using the Connectivity Manager. It is necessary to pass the connectivity manager to c-ares via JNI. Also, the ACCESS_NETWORK_STATE permission must be present in the Android application.
Android older than 8 do not need to to be initalized as they are less restrictive. However, this is a run time not compile time limitation. Proper Android initalization should take place regardless of the targeted Android version.
Deinitalization will take place internally.
[in] | jvm | Pointer to the JVM |
[in] | connectivityManager | Pointer to Java object of type ConnectivityManager |
|
pure virtual |
Get the ZDK version.
Get the revision of the ZDK's source last commit.
|
pure virtual |
Gets the ZDK's debug logging facility instance.
Only a single instance of the debug logging facility is created and returned during the life time of the library.
|
pure virtual |
Notify the ZDK for changed network event.
Handles the network change event - resets the DNS, re-register users, refreshes active calls, etc.
Each invocation restarts a timer delaying the execution of the handling with 500ms from the last received event - if invoked more then once in the delay period, the handling will happen 500ms after the last call.
|
pure virtual |
Ringback tone's main entry point.
Entry point for controlling the ringback tone heard by the user when the remote peer starts ringing
|
pure virtual |
Configures the context event listener.
The set listener will be notified for each event.
[in] | value | The context event listener to be added |
|
pure virtual |
Initialize the ZDK.
Create all internal structures, protocol stacks, network transports and event queues. It will test the available audio devices. It will spawn necessary processing threads. You must call StopContext() to close the network transports, stop all threads and free all structures.
Do not call this function more than once in a row - use StopContext() to clean up and then you can call StartContext() again.
|
pure virtual |
Destroys the ZDK.
Closes network transports, terminates worker threads and frees all structures. You can call StartContext() after this to re-open the library.
This is a blocking call and will always take some time to finish but has a hard-limit of 2 seconds for IAX and 4 seconds for SIP which in the worst case means 6-7 seconds with some additional time for thread synchronisation.
|
pure virtual |
Checks if a string is a SIP AoR or SIP Uri.
Processes the string as a dial target to check if it is a valid SIP Uri or a valid SIP Address of Record or a tel uri.
SIP Uri: sip:user[:password][:port][;params] SIP AoR: "Display Name" <sip:user[:password][:port][;params]>;[aor-params] tel uri: tel:phonenumber[;params]
[in] | pSipUri | UTF-8 encoded to parse |
|
pure virtual |
Gets the video endpoint's main entry point.
Entry point for controlling the video endpoint