![]() |
Alexa Auto SDK
2.0.0
|
Public Types | |
using | ContactUploaderStatus = aace::contactUploader::ContactUploaderEngineInterface::ContactUploaderStatus |
Public Member Functions | |
bool | addContactsBegin () |
bool | addContactsEnd () |
bool | addContactsCancel () |
bool | addContact (const std::string &contact) |
bool | removeUploadedContacts () |
virtual void | contactsUploaderStatusChanged (ContactUploaderStatus status, const std::string &info)=0 |
ContactUploader should be extended to upload the local (aka native) contacts to the Alexa Cloud. ContactUploader Engine uploads the contacts to the Alexa Cloud in batches. The Engine API blocks calls, so platform implementation should make sure ContactUploader is called on a separate process other then the user interface thread.
The platform implementation is notified about the status of the upload by contactsUploaderStatusChanged
.
using aace::contactUploader::ContactUploader::ContactUploaderStatus = aace::contactUploader::ContactUploaderEngineInterface::ContactUploaderStatus |
Describes the status of contact uploader.
aace::contactUploader::ContactUploaderEngineInterface::ContactUploadStatus
bool aace::contactUploader::ContactUploader::addContactsBegin | ( | ) |
Notifies the Engine to begin the contact upload.
After returning true
, the Engine will remove the previously uploaded contacts, if any, and the platform implementation may start calling addContact
to upload the contacts.
true
on successful start, false
if previous upload is in progress or due to any internal error. bool aace::contactUploader::ContactUploader::addContactsEnd | ( | ) |
Notifies the Engine about the completion of the contact upload.
The platform implementation to call this when all the contacts are uploaded via
true
, will not accept any contact and shall notify the platform implementation true
on successful, false
if no upload in progress or due to any internal error. bool aace::contactUploader::ContactUploader::addContactsCancel | ( | ) |
Notifies the Engine to cancel the upload which is in progress.
The platform implementation can call this anytime to cancel the contact upload when it is in progress. Engine on returning , will not accept any contact, and shall notify the platform implementation
true
on successful, false
if no upload in progress or due to any internal error. bool aace::contactUploader::ContactUploader::addContact | ( | const std::string & | contact | ) |
Notifies the Engine to upload the contact.
Engine on returning true
shall queue this contact for uploading in batches.
[in] | contact | Details of one contact to upload in structured JSON format. See the following payload structure and the description of each field: ) { "id" : "{{STRING}}", "firstName" : "{{STRING}}", "lastName" : "{{STRING}}", "nickName" : "{{STRING}}" "company" : "{{STRING}}", "addresses" : [ { "type" : "{{STRING}}", "value" : "{{STRING}}", "label" : "{{STRING}}" } ] }
|
true
if successfully queued, false
when contact format is not valid, upload not started or for any internal error. bool aace::contactUploader::ContactUploader::removeUploadedContacts | ( | ) |
Notifies the Engine to remove the uploaded local contacts from the Alexa Cloud. This API to be called when the local contacts become unavailable (Example use case, Phone is disconnected from the Head Unit) and contacts were already successfully uploaded to Alexa Cloud.
Engine on returning true
shall notify the platform implementation about the removal status of contacts via
true
on successful, false
if upload is in progress or due to any internal error.
|
pure virtual |
Notifies the platform implementation about status that occurred while uploading the batch of contacts or while removing the uploaded contacts.
[in] | status | The ContactUploaderStatus |
[in] | info | The string with additional information. |
Alexa Auto SDK 2.0.0 - Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0