ZDK
|
The main account class. More...
#include <IAccount.h>
Public Member Functions | |
virtual ZDK::ZDKHandle | UserHandle () const =0 |
Gets the underlying user handler ID. More... | |
virtual void | Configuration (ZDK::Shared::AccountConfig value)=0 |
Sets the account configuration. More... | |
virtual ZDK::Shared::AccountConfig | Configuration () const =0 |
Gets a COPY of the account configuration. More... | |
virtual ZDK::Shared::Result | RegisterAccount ()=0 |
Registers the user to the configured service. More... | |
virtual ZDK::Shared::Result | UnRegister ()=0 |
Cancels registration and/or unregisters the user. More... | |
virtual ZDK::Shared::Result | CreateUser ()=0 |
Creates a new user account. More... | |
virtual ZDK::Shared::Result | RemoveUser ()=0 |
Destroys an user account object. More... | |
virtual ZDK::ZDKHandle | AccountID () const =0 |
Gets the ID of the account. More... | |
virtual ZDK::Shared::String | AccountName () const =0 |
Gets the account name. More... | |
virtual void | AccountName (ZDK::Shared::String value)=0 |
Configures the account name. More... | |
virtual ZDK::AccountStatus | RegistrationStatus () const =0 |
Gets the current account registration status. More... | |
virtual void | ClearMediaCodecs ()=0 |
Clears the account's codec list. More... | |
virtual ZDK::Shared::ItemList< ZDK::AudioVideoCodecs > | MediaCodecs () const =0 |
Gets the account's codecs allowed to be used. More... | |
virtual void | MediaCodecs (ZDK::Shared::ItemList< ZDK::AudioVideoCodecs > value)=0 |
Configures the account's codecs allowed to be used. More... | |
virtual void | SetStatusEventListener (ZDK::Shared::AccountEventsHandler value)=0 |
Adds a new account event listener. More... | |
virtual void | DropStatusEventListener (ZDK::Shared::AccountEventsHandler value)=0 |
Removes a specific already added account event listener. More... | |
virtual ZDK::Shared::Call | CreateCall (ZDK::Shared::String calleeNumber, bool handlingVoipPhoneCallEvents, bool video)=0 |
Creates and starts an outgoing call. More... | |
virtual ZDK::Shared::ItemList< ZDK::Shared::Call > | GetActiveCalls () const =0 |
Gets a list with all account's active/ongoing calls. More... | |
virtual ZDK::Shared::Message | CreateMessage (ZDK::MessageType type)=0 |
Creates a new EMPTY chat message with the given type. More... | |
virtual ZDK::Shared::Result | ChatSessionEnd (ZDK::Shared::String pPeer)=0 |
End a chat session. More... | |
virtual ZDK::Shared::Result | SetPresenceStatus (ZDK::ContactStateType status, ZDK::Shared::String message)=0 |
Start a presence publication for the user. More... | |
virtual ZDK::Shared::Result | StartPush (bool shouldReregister, bool enableRtpMediaProxy)=0 |
virtual ZDK::Shared::Result | StopPushAndUnregister (bool shouldRegister)=0 |
virtual ZDK::Shared::Result | RelinquishCallOwnership (ZDK::Shared::Call call)=0 |
virtual void | UpdatePushURI (ZDK::Shared::String newPushURI)=0 |
WILL BE MOVED IN IPushConfig! | |
virtual void | UpdatePushToken (ZDK::Shared::String newPushToken)=0 |
WILL BE MOVED IN IPushConfig! | |
virtual void | UpdatePushType (ZDK::Shared::String newPushType)=0 |
WILL BE MOVED IN IPushConfig! | |
virtual ZDK::Shared::String | PushURI () const =0 |
WILL BE MOVED IN IPushConfig! | |
virtual void | PushURI (ZDK::Shared::String value)=0 |
WILL BE MOVED IN IPushConfig! | |
virtual ZDK::Shared::FileTransfer | InitiateFileTransfer ()=0 |
Initiates a new file transfer. More... | |
virtual ZDK::Shared::String | GenerateUUID (bool noPrefix, int bufLen)=0 |
Generate a random UUID. More... | |
virtual ZDK::Shared::Result | ReplaceUserRegistration ()=0 |
Replace user registration. More... | |
virtual int | ActualRegistrationExpiry ()=0 |
Get the user registration expiry time. More... | |
virtual void | SetProbeEventListener (ZDK::Shared::SIPProbeEventsHandler value)=0 |
Adds a new SIP probe event listener. More... | |
virtual void | DropProbeEventListener (ZDK::Shared::SIPProbeEventsHandler value)=0 |
Removes a specific already added SIP probe event listener. More... | |
virtual ZDK::Shared::Result | ProbeSipTransport (ZDK::Shared::String domain, ZDK::Shared::String outboundProxy, ZDK::Shared::String username, ZDK::Shared::String authUsername, ZDK::Shared::String password)=0 |
Probes for available transports for the given SIP settings. More... | |
virtual ZDK::Shared::Result | TerminateConnection ()=0 |
Terminates user's TCP-based connection. More... | |
![]() | |
virtual ZDK::ZDKHandle | Handle () const =0 |
virtual | operator ZDK::ZDKHandle () const =0 |
virtual void | Initialize ()=0 |
virtual void | ReleaseReference ()=0 |
The main account class.
|
pure virtual |
Gets the ID of the account.
|
pure virtual |
Gets the account name.
|
pure virtual |
Configures the account name.
[in] | value | The account's name |
|
pure virtual |
Get the user registration expiry time.
The actual registration validity period returned by the registrar. The stack will not wait for the full period to refresh the registration. It will try to refresh it after 90% of the negotiated time has elapsed.
|
pure virtual |
|
pure virtual |
Clears the account's codec list.
Equivalent to providing an empty list to MediaCodecs().
|
pure virtual |
Sets the account configuration.
All changes checks and actions are taken automatically - e.g. reregister the account
[in] | value | The account configuration |
|
pure virtual |
Gets a COPY of the account configuration.
Changes in the returned configuration are not handled!
|
pure virtual |
Creates and starts an outgoing call.
Creates a call originating from the specified user and starts it. If there is no error the function will return immediately. Updates on the call status will come via callbacks.
[in] | calleeNumber | The number/user to call. The actual address is created from this ID and the account's configued domain. |
[in] | handlingVoipPhoneCallEvents | Indicator whether to handle/receive call specific events |
[in] | video | Indicator whether to initiate a video call, if supported |
|
pure virtual |
Creates a new EMPTY chat message with the given type.
Creates and returns a new empty chat message from the given type that has to be filled in and then sent!
|
pure virtual |
Creates a new user account.
Creates a new protocol user, based on the assigned configuration, that can be used to register on a server for incoming calls, create outgoing calls, subscribe for presence, etc. This is a mandatory operation before using most of the ZDK's functions.
|
pure virtual |
Removes a specific already added SIP probe event listener.
All added/left listeners will be notified for each event.
[in] | value | The SIP probe event listener to be removed |
|
pure virtual |
Removes a specific already added account event listener.
All added/left listeners will be notified for each event.
[in] | value | The account event listener to be removed |
|
pure virtual |
Generate a random UUID.
Generates a valid RFC 4122 (RFC 2141) UUID URN that can be used for RFC 5626 (SIP Outbound).
The result is a string in the format
"urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
or the format
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
depending on the "noPrefix" parameter. The prefix is there for easier use of ISIPConfig's SipInstance().
In case the "urn:uuid:" prefix is not desired, put 1 to the "noPrefix" parameter. The resulting string will be shorter and will contain only the random part.
If "noPrefix" is set to 0, the resulting string can be given directly to ISIPConfig's SipInstance().
[in] | noPrefix | Set to 0 for full URN, 1 for a UUID without prefix |
[in] | bufLen | Available bytes in the buffer (64 bytes or more are sufficient) |
|
pure virtual |
Gets a list with all account's active/ongoing calls.
|
pure virtual |
Initiates a new file transfer.
NOT IMPLEMENTED!
|
pure virtual |
Gets the account's codecs allowed to be used.
The order in which codecs are added is important. The codecs that are first in the list have greater priority. To reorder the list re-add the codecs with the proper order.
|
pure virtual |
Configures the account's codecs allowed to be used.
The order in which codecs are added is important. The codecs that are first in the list have greater priority. To reorder the list re-add the codecs with the proper order.
[in] | value | The full list with codecs to be used |
|
pure virtual |
Probes for available transports for the given SIP settings.
Probes consecutively for transport availability over SIP with the given account settings.
The tests are done via SIP REGISTER requests with the given settings. The actual account's configuration will be used for this. No user-specific callbacks will be fired for this process.
This might be useful during the creation/configuration of the user account in order to notify the user for the supported transports and/or misconfiguration of either server or credentials.
During the TLS checks a Certificate-related callback can be fired which will usually result in TLS being rejected as a viable transport and the probing will continue with TCP.
If the TLS settings are changed the probing can be restarted.
The profile generated for the TLS test will benefit from any certificates that were added for a SIP user with the same configuration.
STUN and rport will not be used or tested. This may cause the probing to fail because of NAT issues.
The transports are checked in this order:
Each test will generate an informative callback. The process will be considered successful after the first successful REGISTER. The newly created binding on the server will be removed (the temporary profile will be unregistered).
[in] | domain | Domain (SIP user creation: realm entry) |
[in] | outboundProxy | Outbound proxy (SIP user creation: server entry) |
[in] | username | Username |
[in] | authUsername | Authentication username |
[in] | password | Authentication password |
|
pure virtual |
Registers the user to the configured service.
Starts the user's registration process. If the registration process was started the function returns Ok. The result of the process will be delivered by a callback.
|
pure virtual |
Gets the current account registration status.
|
pure virtual |
Destroys an user account object.
Destroys an user account object and all related structures. Automatically unregisters the account from the server.
Fails if the user has active calls.
|
pure virtual |
Replace user registration.
For protocols such as IAX2 there is no "binding" and this operation does not apply. For those types of protocols the function will internally call RegisterUser() and then return its status.
This function will first try to cleanly remove any active bindings on the registrar server that were put by this instance of the library.
Then it will try to create a new registration binding on the server.
This is mostly useful when switching network types and an IP address change has been detected. This function will try to remove the old (stale) binding that is currently active on the server and replace it with a "fresh" one done from the new IP address.
!NOTE! Network changed handling MUST be done with IContext's NetworkChanged()!
A better approach might be to use SIP Outbound (RFC 5626) but that requires server support.
|
pure virtual |
Start a presence publication for the user.
Use this function to publish the user's status on the server (if the server supports it). Use this function again at any time to change the account's status.
[in] | status | Status of the user |
[in] | message | If not NULLor empty, this will be published in the PIDF |
|
pure virtual |
Adds a new SIP probe event listener.
All added listeners will be notified for each event.
[in] | value | The SIP probe event listener to be added |
|
pure virtual |
Adds a new account event listener.
All added listeners will be notified for each event.
[in] | value | The account event listener to be added |
|
pure virtual |
Terminates user's TCP-based connection.
Destroys the currently used TCP-based connection. That triggers re-registration of EVERY already registered user using this socket/connection.
Very handy when PUSH is used for example, where it is nearly certain the connection is stale/half-opened.
|
pure virtual |
Cancels registration and/or unregisters the user.
If the user account is in the process of registration this function will cancel it. If the user was already registered an unregistration process will start. If there is no error the function will return immediately and the final result will be delivered via a callback.
|
pure virtual |
Gets the underlying user handler ID.
Internally assigned on successful CreateUser() invocation and invalidated on RemoveUser().