namespace JustTrack { /// /// The result of reading an advertiser id can be one of three possibilities: /// /// The advertiser id was successfully read /// The user limited ad tracking and the OS enforces this /// (late 2021: Android 12, early 2022: all Android devices; iOS <14: The user opted out, iOS 14+: the user didn't opt in) /// Reading the advertiser id failed /// /// /// In the first case there will be an advertiser id available. In the second case, the id will be null /// and IsLimitedAdTracking will be true. In the last case the advertiser id will also be /// null, but ad tracking will not be reported as limited. /// public class AdvertiserIdInfo { /// /// Initializes a new instance of the class. /// /// The advertiser ID, or null if unavailable. /// Whether ad tracking is limited by the user. internal AdvertiserIdInfo(string? pAdvertiserId, bool pIsLimitedAdTracking) { this.AdvertiserId = pAdvertiserId; this.IsLimitedAdTracking = pIsLimitedAdTracking; } /// /// Gets contains the advertiser id of the user or null if it could not be read (user limited tracking /// and the OS enforces it or an error occurred). /// public string? AdvertiserId { get; private set; } /// /// Gets a value indicating whether did the user limit ad tracking? This can also be reported as true while the advertiser id is /// available. In that case the OS does not enforce the limit yet. /// public bool IsLimitedAdTracking { get; private set; } } }