zdk.net
Public Member Functions | Public Attributes | Properties | List of all members
ZDK_NET::Context Class Reference

ZDK's main entry point. More...

#include <Context.h>

Inheritance diagram for ZDK_NET::Context:
ZDK_NET::ZHandle

Public Member Functions

 Context (ZDK::Shared::Context src)
 
ZDK_NET::ResultStartContext ()
 Initialize the ZDK. More...
 
ZDK_NET::ResultStopContext ()
 Destroys the ZDK. More...
 
ZDK_NET::ResultAddProtocol (ZDK_NET::ProtocolType proto, int port)
 Creates a call manager instance for a protocol. More...
 
ZDK_NET::ResultTestSIPURI (System::String^ sipUri)
 
void SetStatusListener (ZDK_NET::ContextEventsHandler^ value)
 Configures the context event listener. More...
 
ZDK_NET::ResultNetworkChanged ()
 Notify the ZDK for changed network event. More...
 
void ForceNativeCrash (unsigned int delayMs)
 Force native crash. More...
 
virtual long long Handle () override
 
virtual void Initialize () override
 
virtual void ReleaseReference () override
 

Public Attributes

ZDK::IContext * cppRef = nullptr
 

Properties

bool ContextRunning [get]
 Returnes whether the context is running and functional. More...
 
ZDK_NET::CallsProviderCallsProvider [get]
 Gets the active calls information provider. More...
 
ZDK_NET::AccountProviderAccountProvider [get]
 Gets the account information and control provider. More...
 
ZDK_NET::ConferenceProviderConferenceProvider [get]
 Gets the conference controlling helper. More...
 
ZDK_NET::DNSRequestProviderDNSRequestProvider [get]
 Gets the DNS resolving requests provider. More...
 
ZDK_NET::ContextConfigurationConfiguration [get]
 Gets the general ZDK/Context configuration. More...
 
ZDK_NET::EncryptionConfigurationEncryptionConfiguration [get]
 Gets the encription specific configuration. More...
 
ZDK_NET::AudioEndpointControlAudioControls [get]
 Gets the audio endpoint's main entry point. More...
 
ZDK_NET::VideoEndpointControlVideoControls [get]
 Gets the video endpoint's main entry point. More...
 
ZDK_NET::RingBackToneControlRingback [get]
 Ringback tone's main entry point. More...
 
ZDK_NET::ActivationActivation [get]
 Gets the ZDK's Activation process handler. More...
 
ZDK_NET::LogLogger [get]
 Gets the ZDK's debug logging facility instance. More...
 
ZDK_NET::ProxyManagerProxyManager [get]
 Gets the ZDK's proxy manager. More...
 
ZDK_NET::BanafoManagerBanafoManager [get]
 Gets the ZDK's Banafo manager. More...
 
System::String^ LibraryVersion [get]
 Get the ZDK version. More...
 

Detailed Description

ZDK's main entry point.

Member Function Documentation

◆ AddProtocol()

ZDK_NET::Result ^ ZDK_NET::Context::AddProtocol ( ZDK_NET::ProtocolType  proto,
int  port 
)

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.

Parameters
[in]protoProtocol
[in]portPort at which to bind the main socket, or 0 for random port to be used
Returns
Result of the addition
See also
ProtocolType, Result

◆ ForceNativeCrash()

void ZDK_NET::Context::ForceNativeCrash ( unsigned int  delayMs)

Force native crash.

Forces a native crash to take place.

Parameters
[in]delayMsDelay in milliseconds. If 0 - crashes immediately!

◆ NetworkChanged()

ZDK_NET::Result ^ ZDK_NET::Context::NetworkChanged ( )

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.

Returns
Result of the invocation
See also
Result

◆ SetStatusListener()

void ZDK_NET::Context::SetStatusListener ( ZDK_NET::ContextEventsHandler value)

Configures the context event listener.

The set listener will be notified for each event.

Parameters
[in]valueThe context event listener to be added
See also
ContextEventsHandler

◆ StartContext()

ZDK_NET::Result ^ ZDK_NET::Context::StartContext ( )

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.

Returns
Result of the initialization
See also
StopContext(), Result

◆ StopContext()

ZDK_NET::Result ^ ZDK_NET::Context::StopContext ( )

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.

Returns
Result of the initialization
See also
StartContext(), Result

Property Documentation

◆ AccountProvider

ZDK_NET:: AccountProvider^ ZDK_NET::Context::AccountProvider
get

Gets the account information and control provider.

Manages creation and destruction of user accounts and provides information regarding them.

Returns
The account provider
See also
AccountProvider

◆ Activation

ZDK_NET:: Activation^ ZDK_NET::Context::Activation
get

Gets the ZDK's Activation process handler.

Returns
The activation handler
See also
Activation

◆ AudioControls

ZDK_NET:: AudioEndpointControl^ ZDK_NET::Context::AudioControls
get

Gets the audio endpoint's main entry point.

Entry point for controlling the audio endpoint

Returns
The audio endpoint control
See also
AudioEndpointControl

◆ BanafoManager

ZDK_NET:: BanafoManager^ ZDK_NET::Context::BanafoManager
get

Gets the ZDK's Banafo manager.

Returns
The ZDK's Banafo manager instance
See also
BanafoManager

◆ CallsProvider

ZDK_NET:: CallsProvider^ ZDK_NET::Context::CallsProvider
get

Gets the active calls information provider.

Returns
The calls provider
See also
CallsProvider

◆ ConferenceProvider

ZDK_NET:: ConferenceProvider^ ZDK_NET::Context::ConferenceProvider
get

Gets the conference controlling helper.

Returns
The conference provider
See also
ConferenceProvider

◆ Configuration

ZDK_NET:: ContextConfiguration^ ZDK_NET::Context::Configuration
get

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

Returns
The context configuration
See also
ContextConfiguration

◆ ContextRunning

bool ZDK_NET::Context::ContextRunning
get

Returnes whether the context is running and functional.

Returns
Context's running state

◆ DNSRequestProvider

ZDK_NET:: DNSRequestProvider^ ZDK_NET::Context::DNSRequestProvider
get

Gets the DNS resolving requests provider.

Returns
The DNS resolving requests provider
See also
DNSRequestProvider

◆ EncryptionConfiguration

ZDK_NET:: EncryptionConfiguration^ ZDK_NET::Context::EncryptionConfiguration
get

Gets the encription specific configuration.

Returns
The encription configuration
See also
EncryptionConfiguration

◆ LibraryVersion

System:: String^ ZDK_NET::Context::LibraryVersion
get

Get the ZDK version.

Get the revision of the ZDK's source last commit.

Returns
The revision as an ASCII string.

◆ Logger

ZDK_NET:: Log^ ZDK_NET::Context::Logger
get

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.

Returns
The ZDK's debug logging facility instance
See also
Log

◆ ProxyManager

ZDK_NET:: ProxyManager^ ZDK_NET::Context::ProxyManager
get

Gets the ZDK's proxy manager.

Returns
The ZDK's proxy manager instance
See also
ProxyManager

◆ Ringback

ZDK_NET:: RingBackToneControl^ ZDK_NET::Context::Ringback
get

Ringback tone's main entry point.

Entry point for controlling the ringback tone heard by the user when the remote peer starts ringing

Returns
The ringback tone control
See also
RingBackToneControl

◆ VideoControls

ZDK_NET:: VideoEndpointControl^ ZDK_NET::Context::VideoControls
get

Gets the video endpoint's main entry point.

Entry point for controlling the video endpoint

Returns
The video endpoint control
See also
VideoEndpointControl

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