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

ContentStore object. More...

Inheritance diagram for gem::ContentStore:
Collaboration diagram for gem::ContentStore:

Public Member Functions

 ContentStore (const ContentStore &)=delete
 ContentStore (ContentStore &&)=default
 Default move constructor noexcept is deduced.
ContentStore & operator= (const ContentStore &)=delete
ContentStore & operator= (ContentStore &&cs)=default
 Default move assignment noexcept is deduced.
ContentStoreItemList getLocalContentList (int type) const noexcept
 Gets access to the installed content list.
std::pair< ContentStoreItemList, bool > getStoreContentList (int type) const noexcept
 Gets access to the store cached content list.
ContentStoreItemList getStoreFilteredList () const noexcept
 Gets access to the store cached filter list.
int asyncGetStoreContentList (int type, ProgressListener listener) noexcept
 Asynchronously gets an online store content list.
int asyncGetStoreFilteredList (int type, const StringList &countries, const GeographicArea &area, ProgressListener listener) noexcept
 Asynchronously search the online store content with given filters.
void cancel (ProgressListener listener) noexcept
 Cancels an asynchronous operation.
ContentStoreItemRef getItemById (LargeInteger contentId) const noexcept
 Gets the extras item having the specified ID.
std::pair< StrongPointer< ContentUpdater >, int > createContentUpdater (int type) noexcept
 Creates a content updater for the given content type.
int checkForUpdate (int type) const noexcept
 Check for update on the given content type.
void setParallelDownloadsLimit (int count) noexcept
 Set parallel downloads count.
TransferStatisticsRef getTransferStatistics () const noexcept
 Gets the transfer statistics.

Detailed Description

ContentStore object.

Implements share read/write Api object over IContentStore.

This behaves like a singleton, i.e. all instances are sharing behind the same API interface

Member Function Documentation

◆ asyncGetStoreContentList()

int gem::ContentStore::asyncGetStoreContentList ( int type,
ProgressListener listener )
inlinenoexcept

Asynchronously gets an online store content list.

Parameters
[in]typeContent list type ( see EContentType )
[in]listenerThe listener object that implements the notification events associated with this operation
Returns
KNoError when success.

If KNoConnection is returned, get more details about online restrictions with SdkSettings::getOnlineServiceRestriction

◆ asyncGetStoreFilteredList()

int gem::ContentStore::asyncGetStoreFilteredList ( int type,
const StringList & countries,
const GeographicArea & area,
ProgressListener listener )
inlinenoexcept

Asynchronously search the online store content with given filters.

Parameters
[in]typeThe item type to search in the content store ( see EContentType )
[in]countriesList (ISO 3166-3) to search in, nullptr for all countries.
[in]areaGeographic area to search in, nullptr for all world
[in]listenerThe listener object that implements the notification events associated with this operation
Returns
KNoError when success.

If KNoConnection is returned, get more details about online restrictions with SdkSettings::getOnlineServiceRestriction

◆ cancel()

void gem::ContentStore::cancel ( ProgressListener listener)
inlinenoexcept

Cancels an asynchronous operation.

Parameters
[in]listenerThe identifier of the operation requested to be canceled

◆ checkForUpdate()

int gem::ContentStore::checkForUpdate ( int type) const
inlinenoexcept

Check for update on the given content type.

Parameters
typeContent type ( see EContentType for possible values )

For CT_RoadMap type the user will be notified via IOffboardListener::onWorldwideRoadMapSupportStatus

For any other types the user will be notified via IOffboardListener::onAvailableContentUpdate

Returns
KNoError on success

◆ createContentUpdater()

std::pair< StrongPointer< ContentUpdater >, int > gem::ContentStore::createContentUpdater ( int type)
inlinenoexcept

Creates a content updater for the given content type.

Parameters
typeContent type ( see EContentType for possible values )
Returns
Pair of content update strong pointer and error code. If a content update already exists, it is returned and api error error is set to error::kExist

After creation, the content updater must be started by calling the ContentUpdater::update()

The content updater supports operation resume between SDK running sessions.

To check if there is a pending update operation started in a previous SDK session, user must do the following steps:

  1. create an updater with createContentUpdater( type )
  1. check if ContentUpdater::getStatus(), if status != EContentUpdaterStatus::Idle there is a pending update which can be resumed by calling ContentUpdater::update()

◆ getItemById()

ContentStoreItemRef gem::ContentStore::getItemById ( LargeInteger contentId) const
inlinenoexcept

Gets the extras item having the specified ID.

Parameters
[in]contentIdThe item id, see ContentStoreItem::getId
Returns
If found, return a valid item from store. Call bool(result) to check the result validity

◆ getLocalContentList()

ContentStoreItemList gem::ContentStore::getLocalContentList ( int type) const
inlinenoexcept

Gets access to the installed content list.

Parameters
[in]typeContent list type ( see EContentType )
Returns
Content list

◆ getStoreContentList()

std::pair< ContentStoreItemList, bool > gem::ContentStore::getStoreContentList ( int type) const
inlinenoexcept

Gets access to the store cached content list.

Parameters
[in]typeContent list type ( see EContentType )
Returns
pair of <Content list, locally cached flag>. If the list is not cached locally a call to asyncGetStoreContentList must be performed in order to request it from store

◆ getStoreFilteredList()

ContentStoreItemList gem::ContentStore::getStoreFilteredList ( ) const
inlinenoexcept

Gets access to the store cached filter list.

Filtered list should be requested via a call to asyncGetStoreFilteredList

Returns
Content list

◆ getTransferStatistics()

TransferStatisticsRef gem::ContentStore::getTransferStatistics ( ) const
inlinenoexcept

Gets the transfer statistics.

Returns
The transfer statistics

◆ operator=()

ContentStore & gem::ContentStore::operator= ( ContentStore && cs)
default

Default move assignment noexcept is deduced.

Returns
Reference to this object
Parameters
csThe object to move

◆ setParallelDownloadsLimit()

void gem::ContentStore::setParallelDownloadsLimit ( int count)
inlinenoexcept

Set parallel downloads count.

Note
Default is 3
Parameters
countThe number of parallel downloads