Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/CarPlay/CPEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,18 @@ public enum CPPlaybackAction : long {
Pause,
Replay,
}

[NoTV, NoMac, NoMacCatalyst, iOS (27, 0)]
[Native]
public enum CPChargingStationConnectionConnector : long {
Ccs1,
Ccs2,
J1772,
ChaDeMo,
Mennekes,
Gbtdc,
Gbtac,
NacsDC,
NacsAC,
}
}
36 changes: 36 additions & 0 deletions src/CarPlay/CPNavigationWaypoint.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#nullable enable

using System;
using System.Runtime.Versioning;
using Foundation;
using MapKit;

namespace CarPlay {

public partial class CPNavigationWaypoint {

[SupportedOSPlatform ("ios26.4")]
[UnsupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("maccatalyst")]
[ObsoletedOSPlatform ("ios27.0", "Use 'CreateWithVariants' instead.")]
public static unsafe CPNavigationWaypoint Create (CPLocationCoordinate3D centerPoint, NSMeasurement<NSUnitLength>? locationThreshold, string? name, string? address, CPLocationCoordinate3D []? entryPoints, NSTimeZone? timeZone)
{
fixed (CPLocationCoordinate3D* first = entryPoints) {
Expand All @@ -17,6 +23,32 @@ public static unsafe CPNavigationWaypoint Create (CPLocationCoordinate3D centerP
}
}

/// <summary>Creates a waypoint with display name and address variants.</summary>
/// <param name="centerPoint">The center point of the waypoint.</param>
/// <param name="locationThreshold">The optional distance threshold for reaching the waypoint.</param>
/// <param name="nameVariants">The waypoint display names, ordered from most to least preferred.</param>
/// <param name="addressVariants">The waypoint addresses, ordered from most to least preferred.</param>
/// <param name="entryPoints">The optional entry points for the waypoint.</param>
/// <param name="timeZone">The optional time zone for the waypoint.</param>
/// <returns>A new waypoint.</returns>
[SupportedOSPlatform ("ios27.0")]
[UnsupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("maccatalyst")]
public static unsafe CPNavigationWaypoint CreateWithVariants (CPLocationCoordinate3D centerPoint, NSMeasurement<NSUnitLength>? locationThreshold, string [] nameVariants, string [] addressVariants, CPLocationCoordinate3D []? entryPoints, NSTimeZone? timeZone)
{
ArgumentNullException.ThrowIfNull (nameVariants);
ArgumentNullException.ThrowIfNull (addressVariants);

fixed (CPLocationCoordinate3D* first = entryPoints) {
return new CPNavigationWaypoint (centerPoint, locationThreshold, nameVariants, addressVariants, (IntPtr) first, (nuint) (entryPoints?.Length ?? 0), timeZone);
}
}

[SupportedOSPlatform ("ios26.4")]
[UnsupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("maccatalyst")]
public static unsafe CPNavigationWaypoint Create (MKMapItem mapItem, NSMeasurement<NSUnitLength>? locationThreshold, CPLocationCoordinate3D []? entryPoints)
{
fixed (CPLocationCoordinate3D* first = entryPoints) {
Expand All @@ -26,6 +58,10 @@ public static unsafe CPNavigationWaypoint Create (MKMapItem mapItem, NSMeasureme
}
}

[SupportedOSPlatform ("ios26.4")]
[UnsupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("maccatalyst")]
public unsafe CPLocationCoordinate3D [] EntryPoints {
get {
var source = (CPLocationCoordinate3D*) _EntryPoints;
Expand Down
Loading
Loading