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

Manages push notification integration. More...

Inheritance diagram for gem::PushNotificationService:
Collaboration diagram for gem::PushNotificationService:

Public Member Functions

 PushNotificationService (const PushNotificationService &)=delete
 PushNotificationService (PushNotificationService &&)=default
 Default move constructor noexcept is deduced.
PushNotificationService & operator= (const PushNotificationService &)=delete
PushNotificationService & operator= (PushNotificationService &&notif)=default
 Default move assignment noexcept is deduced.
int asyncSetPushNotificationToken (const String &pushNotificationToken, const String &appVersion, ProgressListener listener) noexcept
 Try to send the push notification token to the server.
int asyncScheduleNotification (const String &uri, const Time &beginInterval, const Time &endInterval, ProgressListener listener) noexcept
 Schedule a notification.
int asyncGetNotifications (StringList &list, ProgressListener listener) noexcept
 Retrieve pending notification.
int asyncSendEmail (String const &subject, String const &message, StringList const &recipientList, ProgressListener listener) noexcept
 Send mail notification.
void cancel (ProgressListener listener) noexcept
 Cancel an asynchronous operation.
const StringRef getPushNotificationToken () const noexcept
 Get the push notification token.
TransferStatisticsRef getTransferStatistics () const noexcept
 Get transfer statistics.

Detailed Description

Manages push notification integration.

Implements share-read / write Api object over IPushNotificationService.

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

Registers, subscribes, and handles push notification topics and messages, allowing external events to reach the SDK or app.

Member Function Documentation

◆ asyncGetNotifications()

int gem::PushNotificationService::asyncGetNotifications ( StringList & list,
ProgressListener listener )
inlinenoexcept

Retrieve pending notification.

Parameters
[in]listThe resulting uri list
[in]listenerThe observer used to notify the caller of the progress of this operation
Returns
The operation error state

◆ asyncScheduleNotification()

int gem::PushNotificationService::asyncScheduleNotification ( const String & uri,
const Time & beginInterval,
const Time & endInterval,
ProgressListener listener )
inlinenoexcept

Schedule a notification.

Parameters
[in]uriThe push notification uri
[in]beginIntervalThe begin timestamp of the interval when notification can be scheduled
[in]endIntervalThe end timestamp of the interval when notification can be scheduled
[in]listenerThe observer used to notify the caller of the progress of this operation
Returns
The operation error state

◆ asyncSendEmail()

int gem::PushNotificationService::asyncSendEmail ( String const & subject,
String const & message,
StringList const & recipientList,
ProgressListener listener )
inlinenoexcept

Send mail notification.

Parameters
[in]subjectEmail subject
[in]messageEmail message
[in]recipientListEmail recipients
[in]listenerThe observer used to notify the caller of the progress of this operation
Returns
The operation error state

◆ asyncSetPushNotificationToken()

int gem::PushNotificationService::asyncSetPushNotificationToken ( const String & pushNotificationToken,
const String & appVersion,
ProgressListener listener )
inlinenoexcept

Try to send the push notification token to the server.

Parameters
[in]pushNotificationTokenThe push notification token to be sent to the server
[in]appVersionThe app version attached to the token
[in]listenerThe observer used to notify the caller of the progress of this operation
Returns
The operation error state

◆ cancel()

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

Cancel an asynchronous operation.

Parameters
[in]listenerThe observer used to start the operation

◆ getPushNotificationToken()

const StringRef gem::PushNotificationService::getPushNotificationToken ( ) const
inlinenoexcept

Get the push notification token.

Returns
The push notification token

◆ getTransferStatistics()

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

Get transfer statistics.

Returns
The transfer statistics

◆ operator=()

PushNotificationService & gem::PushNotificationService::operator= ( PushNotificationService && notif)
default

Default move assignment noexcept is deduced.

Returns
reference to this object
Parameters
notifThe object to move