Skip to content

Favorite Events

Info

This document is a work in progress.

Currently, Favorite events contain below events, still working in progress:

  • Favorite Events
    • Favorite Event - When user adds/removes one favorite result, HMI/application should send "FAVORITE" event
    • Remove All Favorites Event - When user clicks the button to clear all favorite result list, HMI/application should send "REMOVE_ALL_FAVORITES" event.

Favorite Event

When user adds/deletes a favorite result, HMI/application should send a "FAVORITE" event.

TNFavoriteEventBuilder Methods Details
entityId(_ entityId: String) The EntityId address/POI, mandatory data field.
action(_ action: TNFavoriteEventActionType) ActionType as ADD/DELETE when user adds/removes this item, mandatory data field.
enum TNFavoriteEventActionType Details
add when user adds the item to favorites
delete when user deletes the item from favorites
1
2
3
4
5
let eventBuilder = TNFavoriteEvent.builder()
eventBuilder.entityId("EntityId").action(.delete)
if let event = eventBuilder.build() {
    dataCollectorClient.send(event: event)
}
1
2
3
4
5
6
7
TNFavoriteEventBuilder * eventBuilder = [TNFavoriteEvent builder];
[eventBuilder entityId: @"EntityId"];
[eventBuilder action: TNFavoriteEventActionTypeDelete];
TNFavoriteEvent * event = [eventBuilder build];
if (event != NULL) {
    [dataCollectorClient sendWithEvent:event];
}

Remove All Favorites Event

When user clicks the button to clear all favorite result list, HMI/application should send a "REMOVE_ALL_FAVORITES" event.

No mandatory data field need to be filled in.

1
2
3
if let event = TNRemoveAllFavoritesEvent.builder().build() {
    dataCollectorClient.send(event: event)
}
1
2
3
4
TNRemoveAllFavoritesEvent * event = [[TNRemoveAllFavoritesEvent builder] build];
if (event != NULL) {
    [dataCollectorClient sendWithEvent:event];
}