<GMTCTripModelSubscriber> Protocol Reference

<GMTCTripModelSubscriber> Protocol Reference

Overview

A subscriber protocol for GMTCTripModel's event update.

Public Member Functions

(void) - tripModel:didUpdateModelState:
 Called when the trip session state has been updated.
(void) - tripModel:didUpdateTrip:updatedPropertyFields:
 Called when the current trip has been updated.
(void) - tripModel:didUpdateTripStatus:
 Called when the current trip status has been updated.
(void) - tripModel:didUpdateVehicleLocation:
 Called when the vehicle's location has been updated.
(void) - tripModel:didUpdatePickupLocation:
 Called when the pickup location has been updated.
(void) - tripModel:didUpdateDropoffLocation:
 Called when the dropoff location has been updated.
(void) - tripModel:didUpdateETAToNextWaypoint:
 Called when the ETA to the next waypoint is updated.
(void) - tripModel:didUpdatePickupETA:
 Called when the driver's ETA to the pickup point is updated.
(void) - tripModel:didUpdateDropoffETA:
 Called when the driver's ETA to the dropoff point is updated.
(void) - tripModel:didUpdateActiveRouteRemainingDistance:
 Called when the remaining distance of the trip's active route has been updated.
(void) - tripModel:didUpdateActiveRoute:
 Called when the active route segment of the trip has been updated.
(void) - tripModel:didUpdateRemainingRoute:
 Called when the remaining route segment of the trip has been updated.
(void) - tripModel:didUpdateRemainingRouteDistance:
 Called when the distance of the trip's remaining route has been updated.
(void) - tripModel:didUpdateRemainingWaypoints:
 Called when the trip's intermediate waypoints have been updated.
(void) - tripModel:didUpdateIntermediateDestinations:
 Called when the trip's waypoints have been updated.
(void) - tripModel:didUpdateActiveRouteTraffic:
 Called when traffic data has been updated for the active route segment of the trip.
(void) - tripModel:didUpdateRemainingRouteTraffic:
 Called when traffic data has been updated for the remaining route segment of the trip.
(void) - tripModel:didFailUpdateTripWithError:
 Called when the trip monitoring request error has been updated.

Member Function Documentation

- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateModelState: (enum GMTCTripModelState sessionState 
[optional]

Called when the trip session state has been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
sessionStateThe new session state.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateTrip: (nullable GMTSTrip *)  trip
updatedPropertyFields: (GMTSTripPropertyFields updatedPropertyFields 
[optional]

Called when the current trip has been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
tripThe trip that has changed.
updatedPropertyFieldsThe updated properties.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateTripStatus: (enum GMTSTripStatus tripStatus 
[optional]

Called when the current trip status has been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
tripStatusThe updated trip status.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateVehicleLocation: (nullable GMTSVehicleLocation *)  vehicleLocation 
[optional]

Called when the vehicle's location has been updated.

The new location may not be different from the previous one.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
vehicleLocationThe last known vehicle location of the current trip.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdatePickupLocation: (nullable GMTSTerminalLocation *)  pickupLocation 
[optional]

Called when the pickup location has been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
pickupLocationThe current pickup location. This could be nil if the trip was reset or cancelled.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateDropoffLocation: (nullable GMTSTerminalLocation *)  dropoffLocation 
[optional]

Called when the dropoff location has been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
dropoffLocationThe current dropoff location. This could be nil if the trip was reset or cancelled.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateETAToNextWaypoint: (NSTimeInterval)  nextWaypointETA 
[optional]

Called when the ETA to the next waypoint is updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
nextWaypointETAThe driver's current ETA to the pickup point. This could be 0 if the trip was reset or cancelled.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdatePickupETA: (NSTimeInterval)  pickupETA 
[optional]

Called when the driver's ETA to the pickup point is updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
pickupETAThe driver's current ETA to the pickup point. This could be 0 if the trip was either reset or cancelled.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateDropoffETA: (NSTimeInterval)  dropoffETA 
[optional]

Called when the driver's ETA to the dropoff point is updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
dropoffETAThe driver's current ETA to the drop-off point. This could be 0 if the trip was either reset or cancelled.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateActiveRouteRemainingDistance: (int32_t)  activeRouteRemainingDistance 
[optional]

Called when the remaining distance of the trip's active route has been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
activeRouteRemainingDistanceDistance in meters that remains on the active route between the current location of the vehicle and the next significant location. The next significant location depends on the status of the current trip. If the trip status is `GMTSTripStatusEnrouteToPickup`, this is the distance to the pickup location. If the trip status is `GMTSTripStatusEnrouteToDropoff`, this is the distance to the drop off location. Your app must provide any necessary measurement conversions.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateActiveRoute: (nullable NSArray< GMTSLatLng * > *)  activeRoute 
[optional]

Called when the active route segment of the trip has been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
activeRouteThe active route segment of the current trip. This segment includes the route from the current location of the vehicle to the next significant location. If the trip status is `GMTSTripStatusEnrouteToPickup`, the next significant location is the pickup location. If the trip status is `GMTSTripStatusEnrouteToDropoff`, the next significant location is the drop off location.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateRemainingRoute: (nullable NSArray< GMTSLatLng * > *)  remainingRoute 
[optional]

Called when the remaining route segment of the trip has been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
remainingRouteThe remaining route segment of the current trip. This segment includes the route from the current user's next destination to the user's final destination. If the trip status is `GMTSTripStatusEnrouteToPickup`, the remaining route segment will be the segment from the pickup location to the drop-off location.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateRemainingRouteDistance: (int32_t)  remainingRouteDistance 
[optional]

Called when the distance of the trip's remaining route has been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
remainingRouteDistanceDistance in meters of the remaining route between the current user's next destination to their final destination. The next destination depends on the status of the current trip. If the trip status is `GMTSTripStatusEnrouteToPickup`, the next destination is the drop-off location. Your app must provide any necessary measurement conversions.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateRemainingWaypoints: (nullable NSArray< GMTSTripWaypoint * > *)  remainingWaypoints 
[optional]

Called when the trip's intermediate waypoints have been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
remainingWaypointsThe current remaining waypoints.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateIntermediateDestinations: (nullable NSArray< GMTSTerminalLocation * > *)  intermediateDestinations 
[optional]

Called when the trip's waypoints have been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
intermediateDestinationsThe current remaining intermediate waypoints for this trip.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateActiveRouteTraffic: (nullable GMTSTrafficData *)  activeRouteTraffic 
[optional]

Called when traffic data has been updated for the active route segment of the trip.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
activeRouteTrafficThe active route traffic segment of the current trip. This segment includes the route from the current location of the vehicle to the next significant location. If the trip status is `GMTSTripStatusEnrouteToPickup`, the next significant location is the pickup location. If the trip status is `GMTSTripStatusEnrouteToDropoff`, the next significant location is the drop off location.
- (void) tripModel: (GMTCTripModel *)  tripModel
didUpdateRemainingRouteTraffic: (nullable GMTSTrafficData *)  remainingRouteTraffic 
[optional]

Called when traffic data has been updated for the remaining route segment of the trip.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
remainingRouteTrafficThe traffic data for the remaining route segment of the current trip.
- (void) tripModel: (GMTCTripModel *)  tripModel
didFailUpdateTripWithError: (nullable NSError *)  error 
[optional]

Called when the trip monitoring request error has been updated.

Parameters:
tripModelThe instance of GMTCTripModel that generated the event.
errorThe error of the current trip monitoring request. The value could be nil.