Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::Sdk Class Reference

GEM SDK global functions. More...

Static Public Member Functions

static int initialize (unsigned int appVariant, const String &internalPath, const String &externalPath, const TimerService &timer, const String &language, const String &languageTTS=String(), EDataSavePolicy savePolicy=UseExternalOnly, const ApiCallLogger &logger=ApiCallLogger(), bool useApiExceptions=false, const ProgressListener &listener=ProgressListener(), const std::function< void(int, gem::String)> &exceptionCallback={}, const String &activationToken=String(), const SdkTweaks &specsHW=SdkTweaks()) noexcept
 Initialize GEM SDK.
static int initialize (const SdkInitializationParameters &sdkInitializationParameters) noexcept
 Initialize GEM SDK.
static void release () noexcept
 Release GEM SDK. After this call all remained SDK objects cannot be used.
static int load (const String &pluginPath, const SdkInitializationParameters &sdkInitializationParameters) noexcept
 Load & initialize GEM SDK as plugin, see initialize for details.
static void unload () noexcept
 Release & unload GEM SDK plugin, see release for details.
static bool isInitialized () noexcept
 Check if the SDK is initialized.
static void notifySDCardEvent (EMmcEvent mmcEvent) noexcept
 Notifies GEM SDK about SD card insert / remove operations.
static void notifyBackgroundEvent (EBackgroundEvent backEvent) noexcept
 Notifies GEM SDK about the hosting app background / foreground state.
static SdkVersion getSdkVersion () noexcept
 Get GEM SDK version.
static EDataSavePolicy getDataSavePolicy () noexcept
 Get the SDK data save policy.
static void setDataSavePolicy (EDataSavePolicy policy) noexcept
 Update the SDK data save policy.
static ENativeConfiguration getNativeConfiguration () noexcept
 Get GEM SDK native code build configuration.
static unsigned int getAppVariant () noexcept
 Get GEM SDK app variant.
static const char16_t * getErrorDetails (int err, bool useLanguageTTS=false) noexcept
 Get error details as string.
static void dumpOSException (EOSExceptionType type, const String &info) noexcept
 Dump OS exception.
static TransferStatisticsRef getTransferStatistics () noexcept
 Get transfer statistics for the SDK manager.
static LargeInteger getCapabilities () noexcept
 Get SDK capabilities.
static StrongPointer< void > getInstanceShareData () noexcept
 Get SDK instance share data ( if available ).

Detailed Description

GEM SDK global functions.

Member Function Documentation

◆ dumpOSException()

void gem::Sdk::dumpOSException ( EOSExceptionType type,
const String & info )
inlinestaticnoexcept

Dump OS exception.

Parameters
[in]typeThe exception type
[in]infoThe exception info

◆ getAppVariant()

unsigned int gem::Sdk::getAppVariant ( )
inlinestaticnoexcept

Get GEM SDK app variant.

Returns
The app variant

◆ getCapabilities()

LargeInteger gem::Sdk::getCapabilities ( )
inlinestaticnoexcept

Get SDK capabilities.

Returns
A package of ESdkCapabilities flags

◆ getDataSavePolicy()

EDataSavePolicy gem::Sdk::getDataSavePolicy ( )
inlinestaticnoexcept

Get the SDK data save policy.

Returns
The data save policy

◆ getErrorDetails()

const char16_t * gem::Sdk::getErrorDetails ( int err,
bool useLanguageTTS = false )
inlinestaticnoexcept

Get error details as string.

Parameters
[in]errThe error code
[in]useLanguageTTSUse the language TTS for the error details
Returns
The error details string

◆ getInstanceShareData()

StrongPointer< void > gem::Sdk::getInstanceShareData ( )
inlinestaticnoexcept

Get SDK instance share data ( if available ).

Returns
SDK shared data between instances. Passed via SdkTweaks::shareData to a new Sdk initialization, it will optimize the memory consumption by sharing read-only data between instances

◆ getNativeConfiguration()

ENativeConfiguration gem::Sdk::getNativeConfiguration ( )
inlinestaticnoexcept

Get GEM SDK native code build configuration.

Returns
The native code build configuration

◆ getSdkVersion()

SdkVersion gem::Sdk::getSdkVersion ( )
inlinestaticnoexcept

Get GEM SDK version.

Returns
The SDK version

◆ getTransferStatistics()

TransferStatisticsRef gem::Sdk::getTransferStatistics ( )
inlinestaticnoexcept

Get transfer statistics for the SDK manager.

Returns
The transfer statistics

◆ initialize() [1/2]

int gem::Sdk::initialize ( const SdkInitializationParameters & sdkInitializationParameters)
inlinestaticnoexcept

Initialize GEM SDK.

All GEM SDK objects must be used only after a successful call to this function.

Parameters
[in]sdkInitializationParametersThe SDK initialization parameters, see SdkInitializationParameters for details.
Returns
0 on success, otherwise an error code.

◆ initialize() [2/2]

int gem::Sdk::initialize ( unsigned int appVariant,
const String & internalPath,
const String & externalPath,
const TimerService & timer,
const String & language,
const String & languageTTS = String(),
EDataSavePolicy savePolicy = UseExternalOnly,
const ApiCallLogger & logger = ApiCallLogger(),
bool useApiExceptions = false,
const ProgressListener & listener = ProgressListener(),
const std::function< void(int, gem::String)> & exceptionCallback = {},
const String & activationToken = String(),
const SdkTweaks & specsHW = SdkTweaks() )
inlinestaticnoexcept

Initialize GEM SDK.

All GEM SDK objects must be used only after a successful call to this function

Deprecated
This function is deprecated, please use the overload that accepts SdkInitializationParameters for better extensibility and backward compatibility with future SDK releases.
Parameters
[in]appVariantThe client provided SDK variant ( in case of a special SDK release ), otherwise 0 ( alias for VARIANT_GENERIC_SDK_CLIENT )
[in]internalPathThe SDK internal data path. Usually the internal path contains the SDK resources and other small size sensitive data that user may want to keep between instances
[in]externalPathThe SDK external data path. Usually the external path is considered to be removable and contains large size data ( e.g. SDK downloaded content, online cache, etc )
[in]timerThe SDK will use the timer service to register for periodically check the internal state of the currently running operations
[in]languageThe SDK language.

The language form might be : "ISO 639-3 language code - ISO 3166-1_3 region code ( optional )", e.g. "eng" for generic English, "eng-USA" for English American

The language form might be : "ISO 639-1 language code - ISO 3166-1_2 region code ( optional )", e.g. "en" for generic English, "en-US" for English American

Parameters
[in]languageTTSThe SDK TTS language. If empty is provided ( default ), the TTS will use the SDK language
[in]savePolicySpecify the SDK preferences for saving the content and other online data, see EDataSavePolicy
[in]loggerThe external SDK logger handler
[in]useApiExceptionsThis will enable the throwing exceptions mechanism for SDK fatal errors ( experimental )
[in]listenerProgress listener for the SDK initialization phase
[in]exceptionCallbackCallback that will be used by breakpad to notice if the dump was successfully saved or not. It will also be used when SDK Activation is mandatory.
[in]activationTokenApplication activation token used to enable SDK functionalities. Provides access to online services. Required for evaluation SDKs. Used in auto-activation scenarios.
[in]specsHWThe SDK tweaks
Returns
0 on success, otherwise an error code

◆ isInitialized()

bool gem::Sdk::isInitialized ( )
inlinestaticnoexcept

Check if the SDK is initialized.

Returns
True if the SDK is initialized, otherwise false

◆ load()

int gem::Sdk::load ( const String & pluginPath,
const SdkInitializationParameters & sdkInitializationParameters )
inlinestaticnoexcept

Load & initialize GEM SDK as plugin, see initialize for details.

Parameters
[in]pluginPathThe path to the SDK plugin.
[in]sdkInitializationParametersThe SDK initialization parameters, see SdkInitializationParameters for details.
Returns
0 on success, otherwise an error code.

◆ notifyBackgroundEvent()

void gem::Sdk::notifyBackgroundEvent ( EBackgroundEvent backEvent)
inlinestaticnoexcept

Notifies GEM SDK about the hosting app background / foreground state.

Parameters
[in]backEventThe background state

SDK may suspend some operations when in background

◆ notifySDCardEvent()

void gem::Sdk::notifySDCardEvent ( EMmcEvent mmcEvent)
inlinestaticnoexcept

Notifies GEM SDK about SD card insert / remove operations.

This should be called when the SDK externalPath is located on a removable storage

Parameters
[in]mmcEventThe MMC event

◆ setDataSavePolicy()

void gem::Sdk::setDataSavePolicy ( EDataSavePolicy policy)
inlinestaticnoexcept

Update the SDK data save policy.

Parameters
[in]policyThe data save policy to be applied

Updating the policy during runtime will affect only the downloaded content location selection.

The online cache will keep the location selected based on the policy provided in the initialization phase