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

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

#include <Activation.h>

Inheritance diagram for ZDK_NET::Activation:
ZDK_NET::ZHandle

Public Member Functions

 Activation (ZDK::Shared::Activation src)
 
ZDK_NET::ResultStart (System::String^ certCacheFile, System::String^ moduleName, int opFlags, System::String^ username, System::String^ password, System::String^ version, System::String^ certPem)
 Starts activation process. More...
 
ZDK_NET::ResultStartSDK (System::String^ certCacheFile, System::String^ username, System::String^ password)
 Starts activation for an SDK product. More...
 
bool CheckPermission (ZDK_NET::PermissionType value)
 Gets whether a given ZDK functionality is enabled and can be used. More...
 
bool CheckCodecPermission (ZDK_NET::AudioVideoCodecs value)
 Gets whether a given media (audio/video) codec is enabled and can be used. More...
 
bool CheckHostname (System::String^ value)
 Gets whether a given hostname (domain) is allowed to be used. More...
 
ZDK_NET::ResultCreateOfflineActivationFile (System::String^ activationFile, System::String^ username, System::String^ password, System::String^ hddSerial, System::String^ version, System::String^ pcUser, System::String^ pcName)
 Creates a file required for offline activation. More...
 
ZDK_NET::ResultCreateOfflineActivationFileSDK (System::String^ activationFile, System::String^ username, System::String^ password)
 Creates a file required for offline activation. More...
 
virtual long long Handle () override
 
virtual void Initialize () override
 
virtual void ReleaseReference () override
 

Public Attributes

ZDK::IActivation * cppRef = nullptr
 

Properties

bool Activated [get]
 Gets the activation status. More...
 

Detailed Description

Handles the Activation process of the ZDK.

Member Function Documentation

◆ CheckCodecPermission()

bool ZDK_NET::Activation::CheckCodecPermission ( ZDK_NET::AudioVideoCodecs  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 ZDK_NET::Activation::CheckHostname ( System::String^  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 ZDK_NET::Activation::CheckPermission ( ZDK_NET::PermissionType  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()

ZDK_NET::Result ^ ZDK_NET::Activation::CreateOfflineActivationFile ( System::String^  activationFile,
System::String^  username,
System::String^  password,
System::String^  hddSerial,
System::String^  version,
System::String^  pcUser,
System::String^  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
Result, Start()

◆ CreateOfflineActivationFileSDK()

ZDK_NET::Result ^ ZDK_NET::Activation::CreateOfflineActivationFileSDK ( System::String^  activationFile,
System::String^  username,
System::String^  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
Result, StartSDK()

◆ Start()

ZDK_NET::Result ^ ZDK_NET::Activation::Start ( System::String^  certCacheFile,
System::String^  moduleName,
int  opFlags,
System::String^  username,
System::String^  password,
System::String^  version,
System::String^  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(), Result, ActivationFlags

◆ StartSDK()

ZDK_NET::Result ^ ZDK_NET::Activation::StartSDK ( System::String^  certCacheFile,
System::String^  username,
System::String^  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(), Result

Property Documentation

◆ Activated

bool ZDK_NET::Activation::Activated
get

Gets the activation status.

Returns
  • 0 - not activated
  • 1 - activated

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