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

ExternalInfo object. More...

Inheritance diagram for gem::ExternalInfo:
Collaboration diagram for gem::ExternalInfo:

Public Member Functions

 ExternalInfo (const ExternalInfo &)=delete
 ExternalInfo (ExternalInfo &&)=default
 Default move constructor noexcept is deduced.
ExternalInfo & operator= (const ExternalInfo &)=delete
ExternalInfo & operator= (ExternalInfo &&externalInfo)=default
 Default move assignment noexcept is deduced.
bool hasWikiInfo (const Landmark &landmark) const noexcept
 Requests all the wikipedia info at once (page title/url, page summary, and list of pictures - only urls of the pictures) - returns true if request successfully made, false if something went wrong pProgressListener will NotifyComplete with KNoError once all the results are received from the Wikipedia API It will request the info in the language of the device, and will fallback to English if a page in the main language doesn't exist If neither the main language and the English version doesn't exist, pProgressListener will NotifyComplete with error::KGeneral, and the request will be canceled.
void requestWikiInfo (const Landmark &landmark, ProgressListener progressListener) noexcept
 This uses the Wikipedia string from the map objects.
const StringRef getWikiPageTitle () noexcept
 Retrieve the Wikipedia page title/url once the above request is completed and pProgressListener NotifiedComplete has been received.
const StringRef getWikiPageLanguage () noexcept
 Get the Wikipedia page language.
const StringRef getWikiPageDescription () noexcept
 Get the Wikipedia page summary (text).
const StringRef getWikiPageURL () noexcept
 Get the Wikipedia page URL.
int getWikiImagesCount () const noexcept
 Get the count of the images on the Wikipedia page.
ExternalInfo & requestWikiImage (ProgressListener progressListener, Image &image, int nImageIdx, EExternalImageQuality eImageQuality) noexcept
 Requests one Wikipedia image from the page.
ExternalInfo & requestWikiImageInfo (ProgressListener progressListener, int nImageIdx, String &strImageInfo) noexcept
 Get info on one Wikipedia image directly, without notifier.
String getWikiImageDescription (int nIndex) noexcept
 Get Wikipedia image description directly, without notifier.
String getWikiImageURL (int nIndex) noexcept
 Get Wikipedia image description directly, without notifier.
String getWikiImagePath (int nIndex, EExternalImageQuality eImageQuality) noexcept
 Get Wikipedia image path directly, without notifier.
String getWikiImageTitle (int nIndex) noexcept
 Get Wikipedia image title directly, without notifier.
void cancelWikiInfo () noexcept
 Cancel a Wikipedia request for any reason. This method is automatically called if a new request is initiated.
void cancelWikiImageContentRequest (ProgressListener progressListener) noexcept
 Cancel a specific Wikipedia image request without canceling the whole object request, use the method below // nImageIdx < nImagesCount from GetWikiInfo().
void cancelWikiImageInfoRequest (ProgressListener progressListener) noexcept
 Cancel a specific Wikipedia image info request.
bool hasYelpInfo (const Landmark &landmark) const noexcept
 Obtain the description and the picture list of a map object by providing the object's native name.
ExternalInfo & requestYelpInfo (const Landmark &landmark, ProgressListener progressListener) noexcept
 This uses the native name string from the map object.
const StringRef getYelpName () noexcept
 Retrieve all the Yelp info once the above request is completed and pProgressListener NotifiedComplete.
const StringRef getYelpAddress () noexcept
 Get the Yelp location address.
const StringRef getYelpURL () noexcept
 Get the Yelp page URL.
double getYelpRating () noexcept
 Get the Yelp rating for the location.
const StringRef getYelpPhoneNumber () noexcept
 Get the location phone number.
int getYelpImagesCount () const noexcept
 Get the count of the images from Yelp.
String getYelpImagePath (int nIndex) noexcept
 Get Yelp image path directly, without notifier.
ExternalInfo & requestYelpImage (ProgressListener progressListener, Image &image, int nImageIdx) noexcept
 Requests one Yelp image from the page - returns true if request successfully made, false if something went wrong while requesting !
void cancelYelpInfo () noexcept
 To cancel a request for any reason, simply use the method below. The method is automatically called if a new request is initiated.
void cancelYelpImageRequest (ProgressListener progressListener) noexcept
 To cancel a specific image request without canceling the whole object request, use the method below // nImageIdx < nImagesCount from GetWikiInfo().

Static Public Member Functions

static StrongPointer< ExternalInfo > produce ()
 Produces an ExternalInfo object.

Detailed Description

ExternalInfo object.

Implements share-read / write Api object over IExternalInfo.

Member Function Documentation

◆ cancelWikiImageContentRequest()

void gem::ExternalInfo::cancelWikiImageContentRequest ( ProgressListener progressListener)
inlinenoexcept

Cancel a specific Wikipedia image request without canceling the whole object request, use the method below // nImageIdx < nImagesCount from GetWikiInfo().

Parameters
progressListenerListener that gets notified of the request progress.

◆ cancelWikiImageInfoRequest()

void gem::ExternalInfo::cancelWikiImageInfoRequest ( ProgressListener progressListener)
inlinenoexcept

Cancel a specific Wikipedia image info request.

Parameters
progressListenerListener that gets notified of the request progress.

◆ cancelYelpImageRequest()

void gem::ExternalInfo::cancelYelpImageRequest ( ProgressListener progressListener)
inlinenoexcept

To cancel a specific image request without canceling the whole object request, use the method below // nImageIdx < nImagesCount from GetWikiInfo().

Parameters
progressListenerListener that gets notified of the request progress.

◆ getWikiImageDescription()

String gem::ExternalInfo::getWikiImageDescription ( int nIndex)
inlinenoexcept

Get Wikipedia image description directly, without notifier.

Parameters
nIndexIndex of the image to get the description of.
Returns
The image description

◆ getWikiImagePath()

String gem::ExternalInfo::getWikiImagePath ( int nIndex,
EExternalImageQuality eImageQuality )
inlinenoexcept

Get Wikipedia image path directly, without notifier.

Parameters
nIndexIndex of the image to get the path of.
eImageQualityQuality of the image to request.
Returns
The image path

◆ getWikiImagesCount()

int gem::ExternalInfo::getWikiImagesCount ( ) const
inlinenoexcept

Get the count of the images on the Wikipedia page.

Must be called only after ProgressListener::NotifyComplete notification

Returns
The count of the images on the Wikipedia page

◆ getWikiImageTitle()

String gem::ExternalInfo::getWikiImageTitle ( int nIndex)
inlinenoexcept

Get Wikipedia image title directly, without notifier.

Parameters
nIndexIndex of the image to get the title of.
Returns
The image title

◆ getWikiImageURL()

String gem::ExternalInfo::getWikiImageURL ( int nIndex)
inlinenoexcept

Get Wikipedia image description directly, without notifier.

Parameters
nIndexIndex of the image to get the URL of.
Returns
The image URL

◆ getWikiPageDescription()

const StringRef gem::ExternalInfo::getWikiPageDescription ( )
inlinenoexcept

Get the Wikipedia page summary (text).

Must be called only after ProgressListener::NotifyComplete notification

Returns
The Wikipedia page summary

◆ getWikiPageLanguage()

const StringRef gem::ExternalInfo::getWikiPageLanguage ( )
inlinenoexcept

Get the Wikipedia page language.

Must be called only after ProgressListener::NotifyComplete notification

Returns
The Wikipedia page language

◆ getWikiPageTitle()

const StringRef gem::ExternalInfo::getWikiPageTitle ( )
inlinenoexcept

Retrieve the Wikipedia page title/url once the above request is completed and pProgressListener NotifiedComplete has been received.

Get the Wikipedia page title in the requested language. Must be called only after ProgressListener::NotifyComplete notification

Returns
The Wikipedia page title

◆ getWikiPageURL()

const StringRef gem::ExternalInfo::getWikiPageURL ( )
inlinenoexcept

Get the Wikipedia page URL.

Must be called only after ProgressListener::NotifyComplete notification

Returns
The Wikipedia page URL

◆ getYelpAddress()

const StringRef gem::ExternalInfo::getYelpAddress ( )
inlinenoexcept

Get the Yelp location address.

Must be called only after ProgressListener::NotifyComplete notification

Returns
The Yelp location address

◆ getYelpImagePath()

String gem::ExternalInfo::getYelpImagePath ( int nIndex)
inlinenoexcept

Get Yelp image path directly, without notifier.

Parameters
nIndexIndex of the image to get the path of.
Returns
The image path

◆ getYelpImagesCount()

int gem::ExternalInfo::getYelpImagesCount ( ) const
inlinenoexcept

Get the count of the images from Yelp.

Must be called only after ProgressListener::NotifyComplete notification

Returns
The count of the images from Yelp

◆ getYelpName()

const StringRef gem::ExternalInfo::getYelpName ( )
inlinenoexcept

Retrieve all the Yelp info once the above request is completed and pProgressListener NotifiedComplete.

Get the map object Yelp name. Must be called only after ProgressListener::NotifyComplete notification

Returns
The Yelp name

◆ getYelpPhoneNumber()

const StringRef gem::ExternalInfo::getYelpPhoneNumber ( )
inlinenoexcept

Get the location phone number.

Must be called only after ProgressListener::NotifyComplete notification

Returns
The location phone number

◆ getYelpRating()

double gem::ExternalInfo::getYelpRating ( )
inlinenoexcept

Get the Yelp rating for the location.

Must be called only after ProgressListener::NotifyComplete notification

Returns
The Yelp rating for the location

◆ getYelpURL()

const StringRef gem::ExternalInfo::getYelpURL ( )
inlinenoexcept

Get the Yelp page URL.

Must be called only after ProgressListener::NotifyComplete notification

Returns
The Yelp page URL

◆ hasWikiInfo()

bool gem::ExternalInfo::hasWikiInfo ( const Landmark & landmark) const
inlinenoexcept

Requests all the wikipedia info at once (page title/url, page summary, and list of pictures - only urls of the pictures) - returns true if request successfully made, false if something went wrong pProgressListener will NotifyComplete with KNoError once all the results are received from the Wikipedia API It will request the info in the language of the device, and will fallback to English if a page in the main language doesn't exist If neither the main language and the English version doesn't exist, pProgressListener will NotifyComplete with error::KGeneral, and the request will be canceled.

Checks if the landmark has Wikipedia info

Parameters
landmarkLandmark for which the check will be done.
Returns
true if the landmark has Wikipedia info, false otherwise

◆ hasYelpInfo()

bool gem::ExternalInfo::hasYelpInfo ( const Landmark & landmark) const
inlinenoexcept

Obtain the description and the picture list of a map object by providing the object's native name.

Requests all the details about the object - returns true if request successfully made, false if something went wrong pProgressListener will NotifyComplete with KNoError once all the results are received from the Yelp API It will request the info in the language of the device, and will fallback to English if a page in the main language doesn't exist If both the main language and the English version do not exist, pProgressListener will NotifyComplete with error::KGeneral, and the request will be canceled

Checks if the landmark has Yelp info

Parameters
landmarkLandmark for which the check will be done.
Returns
true if the landmark has Yelp info, false otherwise

◆ operator=()

ExternalInfo & gem::ExternalInfo::operator= ( ExternalInfo && externalInfo)
default

Default move assignment noexcept is deduced.

Returns
reference to this ExternalInfo object
Parameters
externalInfoExternalInfo object

◆ produce()

StrongPointer< ExternalInfo > gem::ExternalInfo::produce ( )
inlinestatic

Produces an ExternalInfo object.

Returns
ExternalInfo object

◆ requestWikiImage()

ExternalInfo & gem::ExternalInfo::requestWikiImage ( ProgressListener progressListener,
Image & image,
int nImageIdx,
EExternalImageQuality eImageQuality )
inlinenoexcept

Requests one Wikipedia image from the page.

Parameters
progressListenerListener that gets notified of the request progress.
imageImage object that will store the requested image.
nImageIdxIndex of the image to request.
eImageQualityQuality of the image to request.
Returns
Reference to this ExternalInfo object

◆ requestWikiImageInfo()

ExternalInfo & gem::ExternalInfo::requestWikiImageInfo ( ProgressListener progressListener,
int nImageIdx,
String & strImageInfo )
inlinenoexcept

Get info on one Wikipedia image directly, without notifier.

Parameters
nImageIdxIndex of the image to get info on.
strImageInfoString to store the image info.
progressListenerListener that gets notified of the request progress.
Returns
The image description

◆ requestWikiInfo()

void gem::ExternalInfo::requestWikiInfo ( const Landmark & landmark,
ProgressListener progressListener )
inlinenoexcept

This uses the Wikipedia string from the map objects.

Parameters
landmarkLandmark for which the request will be made.
progressListenerListener that gets notified of the request progress.

◆ requestYelpImage()

ExternalInfo & gem::ExternalInfo::requestYelpImage ( ProgressListener progressListener,
Image & image,
int nImageIdx )
inlinenoexcept

Requests one Yelp image from the page - returns true if request successfully made, false if something went wrong while requesting !

!USE ONLY AFTER pProgressListener from above NOTIFIED COMPLETE!! nImageIdx < GetImagesCount() from above

Parameters
progressListenerListener that gets notified of the request progress.
imageImage object that will store the requested image.
nImageIdxIndex of the image to request.
Returns
Reference to this ExternalInfo object

◆ requestYelpInfo()

ExternalInfo & gem::ExternalInfo::requestYelpInfo ( const Landmark & landmark,
ProgressListener progressListener )
inlinenoexcept

This uses the native name string from the map object.

Parameters
landmarkLandmark for which the request will be made.
progressListenerListener that gets notified of the request progress.
Returns
Reference to this ExternalInfo object