GoogleRidesharingConsumer Framework Reference

  • The GMTCJourneySharingSession class manages a journey sharing session, providing properties to access the session's delegate, current state, host map view, and associated trip model.

  • The session's delegate property allows for interaction with the session events and updates via the GMTCMapViewSessionDelegate protocol.

  • The state property reflects the current operational state of the sharing session, with possible states defined in GMTCMapViewSessionState.

  • The hostMapView property provides access to the map view used in the session.

  • The tripModel property links the session to a specific trip, represented by GMTCTripModel.

GMTCJourneySharingSession

@interface GMTCJourneySharingSession : NSObject <GMTCMapViewSession>

/** Delegate of the current journey sharing session. */
@property(nonatomic, nullable, weak) id<GMTCMapViewSessionDelegate> delegate;

/**
 * Returns the current session state. The possible state can be referenced from
 * `GMTCMapViewSessionState`.
 */
@property(nonatomic, readonly) GMTCMapViewSessionState state;

/** Returns the host map view of the current session. */
@property(nonatomic, nullable, weak, readonly) GMTCMapView *hostMapView;

/** Returns the associated trip session. */
@property(nonatomic, readonly) GMTCTripModel *tripModel;

/**
 * Initializes the session object.
 *
 * @param tripModel The target trip request.
 */
- (instancetype)initWithTripModel:(GMTCTripModel *)tripModel;

- (instancetype)init NS_UNAVAILABLE;

@end