MBNNRoadObjectsStore.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. @class MBNNRoadObject;
  4. @class MBNNRoadObjectEdgeLocation;
  5. @protocol MBNNRoadObjectsStoreObserver;
  6. /** NN users shouldn't create instances of `RoadObjectsStore`, use `Navigator.roadObjectsStore` method instead */
  7. NS_SWIFT_NAME(RoadObjectsStore)
  8. __attribute__((visibility ("default")))
  9. @interface MBNNRoadObjectsStore : NSObject
  10. // This class provides custom init which should be called
  11. - (nonnull instancetype)init NS_UNAVAILABLE;
  12. // This class provides custom init which should be called
  13. + (nonnull instancetype)new NS_UNAVAILABLE;
  14. /**
  15. * Returns mapping `road object id -> RoadObjectEdgeLocation` for all road objects
  16. * which are lying on the edge with given id.
  17. * @param edgeId
  18. */
  19. - (nonnull NSDictionary<NSString *, MBNNRoadObjectEdgeLocation *> *)getForEdgeId:(uint64_t)edgeId __attribute((ns_returns_retained));
  20. /**
  21. * Returns road object by `id`
  22. * @param road object id
  23. */
  24. - (nullable MBNNRoadObject *)getRoadObjectForId:(nonnull NSString *)id __attribute((ns_returns_retained));
  25. /**
  26. * Adds road object to be tracked in electronic horizon. In case if object with such id already exists updates it.
  27. * @param id unique id of object
  28. * @param roadObject road object
  29. * NB: road objects obtained from route alerts cannot be added via this API
  30. */
  31. - (void)addCustomRoadObjectForRoadObject:(nonnull MBNNRoadObject *)roadObject;
  32. /**
  33. * Removes road object(i.e. stops tracking it in electronic horizon).
  34. * Does nothing if object with such id is not found. Observer is notified only if the object existed in the store.
  35. * @param id of road object
  36. */
  37. - (void)removeCustomRoadObjectForId:(nonnull NSString *)id;
  38. /**
  39. * Removes a bunch of custom road objects(i.e. stops tracking them in electronic horizon).
  40. * Calls `onRoadObjectRemoved` callback only for the ids that have existed in the store.
  41. * Does nothing for the ids that haven't existed there.
  42. */
  43. - (void)removeCustomRoadObjectsForIds:(nonnull NSArray<NSString *> *)ids;
  44. /**
  45. * Removes all road object(i.e. stops tracking them in electronic horizon)
  46. * @param id of road object
  47. */
  48. - (void)removeAllCustomRoadObjects;
  49. /**
  50. * Returns list of road object ids which are (partially) belong to `edgeIds`.
  51. * @param edgeIds list of edge ids
  52. */
  53. - (nonnull NSArray<NSString *> *)getRoadObjectIdsByEdgeIdsForEdgeIds:(nonnull NSArray<NSNumber *> *)edgeIds __attribute((ns_returns_retained));
  54. /** Checks whether observers are added. */
  55. - (BOOL)hasObservers;
  56. /** Adds observer for objects changes. */
  57. - (void)addObserverForObserver:(nonnull id<MBNNRoadObjectsStoreObserver>)observer;
  58. /** Removes observer for objects changes. */
  59. - (void)removeObserverForObserver:(nonnull id<MBNNRoadObjectsStoreObserver>)observer;
  60. @end