zdk.objc
Instance Methods | Properties | List of all members
<ZDKActivation> Protocol Reference

Handles the Activation process of the ZDK. More...

#import <ZDKActivation.h>

Inheritance diagram for <ZDKActivation>:
<ZDKZHandle>

Instance Methods

(id< ZDKResult >) - start:moduleName:opFlags:username:password:version:certPem:
 Starts activation process. More...
 
(id< ZDKResult >) - startSDK:username:password:
 starts activation for an SDK product More...
 
(id< ZDKResult >) - stop
 Stops the activation process. More...
 
(BOOL) - checkPermission:
 Gets whether a given ZDK functionality is enabled and can be used. More...
 
(BOOL) - checkCodecPermission:
 Gets whether a given media (audio/video) codec is enabled and can be used. More...
 
(BOOL) - checkHostname:
 Gets whether a given hostname (domain) is allowed to be used. More...
 
(id< ZDKResult >) - createOfflineActivationFile:username:password:hddSerial:version:pcUser:pcName:
 Creates a file required for offline activation. More...
 
(id< ZDKResult >) - createOfflineActivationFile:sdk:password:
 Creates a file required for offline activation. More...
 
(NSString *) - handlesDescription
 
- Instance Methods inherited from <ZDKZHandle>
(long int) - handle
 
(void) - initialize
 
(void) - releaseReference
 
(NSString *) - handlesDescription
 

Properties

BOOL activated
 Gets the activation status. More...
 

Detailed Description

Handles the Activation process of the ZDK.

Method Documentation

◆ checkCodecPermission:

- (BOOL) checkCodecPermission: (ZDKAudioVideoCodecs)  value

Gets whether a given media (audio/video) codec is enabled and can be used.

Parameters
[in]valueCodec to be checked
Returns
  • 0 - not available
  • 1 - available
See also
AudioVideoCodecs

◆ checkHostname:

- (BOOL) checkHostname: (NSString *)  value

Gets whether a given hostname (domain) is allowed to be used.

Parameters
[in]valueHostname (domain) to be checked
Returns
  • 0 - not allowed
  • 1 - allowed

◆ checkPermission:

- (BOOL) checkPermission: (ZDKPermissionType)  value

Gets whether a given ZDK functionality is enabled and can be used.

Parameters
[in]valueFunctionality to be checked
Returns
  • 0 - not available
  • 1 - available
See also
PermissionType

◆ createOfflineActivationFile:sdk:password:

- (id< ZDKResult >) createOfflineActivationFile: (NSString *)  activationFile
sdk: (NSString *)  username
password: (NSString *)  password 

Creates a file required for offline activation.

For SDK products only! For Zoiper internal use see createOfflineActivationFile()! Creates a file required for offline activation

  1. Create a file with the createOfflineActivationFileSDK().
  2. Send the file to "register5@shop.zoiper.com" attached in email.
  3. An email will be send to you with the new certificate file needed for offline activation.
  4. Use the received file (from the received email from the CERT server) as "certCacheFile" input parameter of startSDK().
Parameters
[in]activationFileFile name (including full path to it!)
[in]usernamethe Username for the account to be activated
[in]passwordthe Password for the activation of the account
Returns
Result of the creating of the file
See also
ZDKResult, startSDK()

◆ createOfflineActivationFile:username:password:hddSerial:version:pcUser:pcName:

- (id< ZDKResult >) createOfflineActivationFile: (NSString *)  activationFile
username: (NSString *)  username
password: (NSString *)  password
hddSerial: (NSString *)  hddSerial
version: (NSString *)  version
pcUser: (NSString *)  pcUser
pcName: (NSString *)  pcName 

Creates a file required for offline activation.

For Zoiper internal use only! For SDK builds see createOfflineActivationFileSDK()! Creates a file required for offline activation

  1. Create a file with the createOfflineActivationFile().
  2. Send the file to "register5@shop.zoiper.com" attached in email.
  3. An email will be send to you with the new certificate file needed for offline activation.
  4. Use the received file (from the received email from the CERT server) as "certCacheFile" input parameter of start().
Parameters
[in]activationFileFile name (including full path to it!)
[in]usernameThe username for the account to be activated
[in]passwordThe password for the activation of the account
[in]hddSerialThe HDD serial number
[in]versionThe build version as configured on the cert site. This is the "version" URL parameter
[in]pcUserThe user name
[in]pcNameThe device name
Returns
Result of the creating of the file
See also
ZDKResult, start()

◆ handlesDescription

- (NSString *) handlesDescription

Reimplemented from <ZDKZHandle>.

◆ start:moduleName:opFlags:username:password:version:certPem:

- (id< ZDKResult >) start: (NSString *)  certCacheFile
moduleName: (NSString *_Nullable)  moduleName
opFlags: (int)  opFlags
username: (NSString *)  username
password: (NSString *)  password
version: (NSString *)  version
certPem: (NSString *)  certPem 

Starts activation process.

For Zoiper internal use only! For SDK builds see startSDK()!

Starts activation process of the product. Without activation, much of the functionality is not allowed. Activation first tries to use data from a certificate cache file, the path to which is supplied by the user. If the file is available and valid for the current device, it's contents will be used to set the allowed functionalities. If file is invalid OR not present, the SDK will make an HTTP request to a licensing server. On valid response the results from the server will be used to configure functionality availability and, if the location supplied by the user in certCacheFile is valid and writable, the results will be stored there so that the cache file can be used on next invocation.

The activation process is doing a GET request constructed from the arguments of the function. The base URL of the GET request can be changed if the baseUrl parameter is not NULL.

All of the parameter values will be properly URL escaped by the library and MUST NOT be already URL escaped when being passed to this function.

The password parameter will be scrambled using MD5 and the result will be converted to a hex string before passing it to the web server. It MUST NOT be pre-processed in any way before passing it to this function.

Parameters
[in]certCacheFileIf non-zero, it is a UTF-8 file name which is used to cache the certificate received from the server. If such file does not exist, the usual HTTP (online) activation is initiated, if possible. After a successful online activation, the resulting certificate will be stored in the file.
[in]moduleNameProvides support for DLL products using this ZDK as a static library. This is not for the case where ZDK is used as a DLL. In that case the moduleName is ignored. In the case where ZDK is a static library used to link a DLL project, and that DLL project is used by an external application, the checksum must be calculated from the DLL, not the main application. In this case moduleName is needed to hint the Activation object when it tries to discover the file from which we're loaded.
[in]opFlagsA bit field flag controlling the activation options - ActivationFlags enum
[in]usernameClient's username ("username" URL parameter)
[in]passwordClient's password ("password" URL parameter)
[in]versionThe phone build version as configured on the cert site. This is the "version" URL parameter
[in]certPemThe certificate issued by the cert server for this specific phone build. Must match the certificate on the server.
Returns
Result of the invocation
See also
startSDK(), - stop, onContextActivationCompleted(), ZDKResult, ActivationFlags

◆ startSDK:username:password:

- (id< ZDKResult >) startSDK: (NSString *)  certCacheFile
username: (NSString *)  username
password: (NSString *)  password 

starts activation for an SDK product

For SDK products only! For Zoiper internal use see start()!

starts activation process of the SDK product. Without activation, much of the functionality is not allowed. Activation first tries to use data from a certificate cache file, the path to which is supplied by the user. If the file is available and valid for the current device, it's contents will be used to set the allowed functionalities. If file is invalid OR not present, the SDK will make an HTTP request to a licensing server. On valid response the results from the server will be used to configure functionality availability and, if the location supplied by the user in certCacheFile is valid and writable, the results will be stored there so that the cache file can be used on next invocation.

The activation process is doing a GET request constructed from the arguments of the function. The base URL of the GET request can be changed if the baseUrl parameter is not NULL.

All of the parameter values will be properly URL escaped by the library and MUST NOT be already URL escaped when being passed to this function.

The password parameter will be scrambled using MD5 and the result will be converted to a hex string before passing it to the web server. It MUST NOT be pre-processed in any way before passing it to this function.

Parameters
[in]certCacheFileIf non-zero, it is a UTF-8 file name which is used to cache the certificate received from the server. If such file does not exist, the usual HTTP (online) activation is initiated, if possible. After a successful online activation, the resulting certificate will be stored in the file.
[in]usernameUsername to use for authentication to the cert server
[in]passwordPassword to use for authentication to the cert server
Returns
Result of the invocation
See also
start(), - stop, onContextActivationCompleted(), ZDKResult

◆ stop

- (id< ZDKResult >) stop

Stops the activation process.

Cancels any activation in progress.

Returns
Result of the invocation
See also
ZDKResult

Property Documentation

◆ activated

- (BOOL) activated
readnonatomicassign

Gets the activation status.

Returns
  • 0 - not activated
  • 1 - activated

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