diff --git a/src/foundation.cs b/src/foundation.cs index e39d34d88830..4a2aa85c2d42 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -16594,4 +16594,50 @@ enum NSUrlErrorNetworkUnavailableReason : long { Expensive = 1, Constrained = 2, } + + [NoWatch, NoTV, NoiOS, Mac (10,10)] + [Native] + public enum NSBackgroundActivityResult : long + { + Finished = 1, + Deferred = 2, + } + + delegate void NSBackgroundActivityCompletionHandler (NSBackgroundActivityResult result); + + delegate void NSBackgroundActivityCompletionAction ([BlockCallback] NSBackgroundActivityCompletionHandler handler); + + [NoWatch, NoTV, NoiOS, Mac (10,10)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface NSBackgroundActivityScheduler + { + [Export ("initWithIdentifier:")] + [DesignatedInitializer] + IntPtr Constructor (string identifier); + + [Export ("identifier")] + string Identifier { get; } + + [Export ("qualityOfService", ArgumentSemantic.Assign)] + NSQualityOfService QualityOfService { get; set; } + + [Export ("repeats")] + bool Repeats { get; set; } + + [Export ("interval")] + double Interval { get; set; } + + [Export ("tolerance")] + double Tolerance { get; set; } + + [Export ("scheduleWithBlock:")] + void Schedule (NSBackgroundActivityCompletionAction action); + + [Export ("invalidate")] + void Invalidate (); + + [Export ("shouldDefer")] + bool ShouldDefer { get; } + } } diff --git a/tests/xtro-sharpie/macOS-Foundation.ignore b/tests/xtro-sharpie/macOS-Foundation.ignore index 82430ef40acf..1252a2230572 100644 --- a/tests/xtro-sharpie/macOS-Foundation.ignore +++ b/tests/xtro-sharpie/macOS-Foundation.ignore @@ -14,7 +14,6 @@ !extra-designated-initializer! NSScriptCommand::initWithCoder: is incorrectly decorated with an [DesignatedInitializer] attribute !extra-protocol-member! unexpected selector NSURLSessionDelegate::URLSessionDidFinishEventsForBackgroundURLSession: found -!missing-enum! NSBackgroundActivityResult not bound !missing-enum! NSDistributedNotificationOptions not bound !missing-enum! NSInsertionPosition not bound !missing-enum! NSRelativePosition not bound @@ -212,18 +211,6 @@ !missing-selector! NSArchiver::encodeRootObject: not bound !missing-selector! NSArchiver::initForWritingWithMutableData: not bound !missing-selector! NSArchiver::replaceObject:withObject: not bound -!missing-selector! NSBackgroundActivityScheduler::identifier not bound -!missing-selector! NSBackgroundActivityScheduler::initWithIdentifier: not bound -!missing-selector! NSBackgroundActivityScheduler::interval not bound -!missing-selector! NSBackgroundActivityScheduler::qualityOfService not bound -!missing-selector! NSBackgroundActivityScheduler::repeats not bound -!missing-selector! NSBackgroundActivityScheduler::scheduleWithBlock: not bound -!missing-selector! NSBackgroundActivityScheduler::setInterval: not bound -!missing-selector! NSBackgroundActivityScheduler::setQualityOfService: not bound -!missing-selector! NSBackgroundActivityScheduler::setRepeats: not bound -!missing-selector! NSBackgroundActivityScheduler::setTolerance: not bound -!missing-selector! NSBackgroundActivityScheduler::shouldDefer not bound -!missing-selector! NSBackgroundActivityScheduler::tolerance not bound !missing-selector! NSCalendarDate::years:months:days:hours:minutes:seconds:sinceDate: not bound !missing-selector! NSClassDescription::attributeKeys not bound !missing-selector! NSClassDescription::inverseForRelationshipKey: not bound @@ -660,7 +647,6 @@ !missing-selector! NSXMLNode::XMLStringWithOptions: not bound !missing-selector! NSXMLNode::XPath not bound !missing-type! NSArchiver not bound -!missing-type! NSBackgroundActivityScheduler not bound !missing-type! NSClassDescription not bound !missing-type! NSCloneCommand not bound !missing-type! NSCloseCommand not bound @@ -755,7 +741,6 @@ !missing-selector! +NSScriptSuiteRegistry::sharedScriptSuiteRegistry not bound !missing-selector! +NSSocketPortNameServer::sharedInstance not bound !missing-selector! +NSXMLNode::document not bound -!missing-selector! NSBackgroundActivityScheduler::invalidate not bound !missing-selector! NSCoder::decodePoint not bound !missing-selector! NSCoder::decodePropertyList not bound !missing-selector! NSCoder::decodeRect not bound