API Documentation Integration MsecSdk
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MsecUnitySdk.BaseMsecSdkClient Class Referenceabstract

Abstract base class for Msec SDK client implementations. More...

Inheritance diagram for MsecUnitySdk.BaseMsecSdkClient:
Inheritance graph
[legend]
Collaboration diagram for MsecUnitySdk.BaseMsecSdkClient:
Collaboration graph
[legend]

Public Member Functions

virtual void Init (IMsecSdkListener listener, MsecSdkConfig config)
 Initializes the Msec SDK client with a listener and configuration. More...
 
abstract DomainCertificateVerificationResult VerifyDomainCertificate (string domain, int port)
 Verifies the certificate of a specified domain and port. More...
 
abstract string GetOTPCode (double timestamp)
 Retrieves an OTP (One-Time Password) code based on a timestamp. More...
 
abstract void RegisterCallbacks ()
 Registers callbacks for the SDK. More...
 

Protected Member Functions

void LogDebug (object message)
 Logs a debug message if debug mode is enabled. More...
 
void LogError (object message)
 Logs an error message if debug mode is enabled. More...
 

Protected Attributes

IMsecSdkListener listener
 The listener for receiving SDK callbacks. More...
 
MsecSdkConfig config
 The configuration settings for the SDK. More...
 

Detailed Description

Abstract base class for Msec SDK client implementations.

This class provides a foundation for platform-specific Msec SDK clients (e.g., Android, iOS). It implements the IMsecSdkClient interface and defines common functionality such as initialization, logging, and abstract methods to be overridden by derived classes.

Member Function Documentation

◆ GetOTPCode()

abstract string MsecUnitySdk.BaseMsecSdkClient.GetOTPCode ( double  timestamp)
pure virtual

Retrieves an OTP (One-Time Password) code based on a timestamp.

Abstract method to be implemented by derived classes to generate a platform-specific OTP code.

Parameters
timestampThe timestamp used to generate the OTP code.
Returns
A string representing the OTP code.

Implements MsecUnitySdk.IMsecSdkClient.

Implemented in MsecUnitySdk.iOS.MsecSdkClient, MsecUnitySdk.DummyMsecSdkClient, and MsecUnitySdk.Android.MsecSdkClient.

◆ Init()

virtual void MsecUnitySdk.BaseMsecSdkClient.Init ( IMsecSdkListener  listener,
MsecSdkConfig  config 
)
inlinevirtual

Initializes the Msec SDK client with a listener and configuration.

Stores the provided listener and config for use in derived classes. This method can be overridden to add platform-specific initialization logic.

Parameters
listenerThe listener to receive SDK callbacks.
configThe configuration settings for the SDK.

Implements MsecUnitySdk.IMsecSdkClient.

Reimplemented in MsecUnitySdk.iOS.MsecSdkClient, and MsecUnitySdk.Android.MsecSdkClient.

◆ LogDebug()

void MsecUnitySdk.BaseMsecSdkClient.LogDebug ( object  message)
inlineprotected

Logs a debug message if debug mode is enabled.

Checks the config's Debug flag and logs the message to the Unity console if true.

Parameters
messageThe message to log.

◆ LogError()

void MsecUnitySdk.BaseMsecSdkClient.LogError ( object  message)
inlineprotected

Logs an error message if debug mode is enabled.

Checks the config's Debug flag and logs the error message to the Unity console if true.

Parameters
messageThe error message to log.

◆ RegisterCallbacks()

abstract void MsecUnitySdk.BaseMsecSdkClient.RegisterCallbacks ( )
pure virtual

Registers callbacks for the SDK.

Abstract method to be implemented by derived classes to set up platform-specific callback mechanisms.

Implemented in MsecUnitySdk.iOS.MsecSdkClient, MsecUnitySdk.DummyMsecSdkClient, and MsecUnitySdk.Android.MsecSdkClient.

◆ VerifyDomainCertificate()

abstract DomainCertificateVerificationResult MsecUnitySdk.BaseMsecSdkClient.VerifyDomainCertificate ( string  domain,
int  port 
)
pure virtual

Verifies the certificate of a specified domain and port.

Abstract method to be implemented by derived classes to perform platform-specific certificate verification.

Parameters
domainThe domain name to verify (e.g., "google.com").
portThe port number to check (e.g., 443 for HTTPS).
Returns
A DomainCertificateVerificationResult indicating the verification outcome.

Implements MsecUnitySdk.IMsecSdkClient.

Implemented in MsecUnitySdk.iOS.MsecSdkClient, MsecUnitySdk.DummyMsecSdkClient, and MsecUnitySdk.Android.MsecSdkClient.

Member Data Documentation

◆ config

MsecSdkConfig MsecUnitySdk.BaseMsecSdkClient.config
protected

The configuration settings for the SDK.

Stores the MsecSdkConfig instance passed during initialization, controlling options like debug mode.

◆ listener

IMsecSdkListener MsecUnitySdk.BaseMsecSdkClient.listener
protected

The listener for receiving SDK callbacks.

Stores the IMsecSdkListener instance passed during initialization to handle events like violations or performance data.


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