[homekit] Update for Xcode 9 beta 5 (#2492)
This commit is contained in:
Родитель
75ac29f8e5
Коммит
bded5b7b02
|
@ -1271,24 +1271,21 @@ namespace XamCore.HomeKit {
|
|||
}
|
||||
|
||||
[Watch (4,0), TV (11,0), iOS (11,0)]
|
||||
public enum HMPresenceType {
|
||||
[Native]
|
||||
public enum HMPresenceEventType : nuint {
|
||||
EveryEntry = 1,
|
||||
EveryExit = 2,
|
||||
FirstEntry = 3,
|
||||
LastExit = 4,
|
||||
AtHome = FirstEntry,
|
||||
NotAtHome = LastExit,
|
||||
}
|
||||
|
||||
[Field ("HMPresenceTypeCurrentUserAtHome")]
|
||||
CurrentUserAtHome,
|
||||
|
||||
[Field ("HMPresenceTypeCurrentUserNotAtHome")]
|
||||
CurrentUserNotAtHome,
|
||||
|
||||
[Field ("HMPresenceTypeAnyUserAtHome")]
|
||||
AnyUserAtHome,
|
||||
|
||||
[Field ("HMPresenceTypeNoUserAtHome")]
|
||||
NoUserAtHome,
|
||||
|
||||
[Field ("HMPresenceTypeUsersAtHome")]
|
||||
UsersAtHome,
|
||||
|
||||
[Field ("HMPresenceTypeUsersNotAtHome")]
|
||||
UsersNotAtHome,
|
||||
[Watch (4,0), TV (11,0), iOS (11,0)]
|
||||
[Native]
|
||||
public enum HMPresenceEventUserType : nuint {
|
||||
CurrentUser = 1,
|
||||
HomeUsers = 2,
|
||||
CustomUsers = 3,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
using System;
|
||||
using XamCore.ObjCRuntime;
|
||||
|
||||
namespace XamCore.HomeKit {
|
||||
|
||||
partial class HMMutablePresenceEvent {
|
||||
|
||||
public virtual HMPresenceType PresenceType {
|
||||
get {
|
||||
return (HMPresenceType) (HMPresenceTypeExtensions.GetValue (_PresenceType));
|
||||
}
|
||||
set {
|
||||
_PresenceType = HMPresenceTypeExtensions.GetConstant (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
using System;
|
||||
using XamCore.ObjCRuntime;
|
||||
|
||||
namespace XamCore.HomeKit {
|
||||
|
||||
partial class HMPresenceEvent {
|
||||
|
||||
public virtual HMPresenceType PresenceType {
|
||||
get {
|
||||
return (HMPresenceType) (HMPresenceTypeExtensions.GetValue (_PresenceType));
|
||||
}
|
||||
set {
|
||||
_PresenceType = HMPresenceTypeExtensions.GetConstant (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -816,9 +816,7 @@ HOMEKIT_SOURCES = \
|
|||
HomeKit/HMCharacteristicProperties.cs \
|
||||
HomeKit/HMEventTrigger.cs \
|
||||
HomeKit/HMHome.cs \
|
||||
HomeKit/HMPresenceEvent.cs \
|
||||
HomeKit/HMSignificantTimeEvent.cs \
|
||||
HomeKit/HMMutablePresenceEvent.cs \
|
||||
HomeKit/HMMutableSignificantTimeEvent.cs \
|
||||
HomeKit/HMService.cs \
|
||||
|
||||
|
|
|
@ -1207,7 +1207,6 @@ namespace XamCore.HomeKit {
|
|||
[NoWatch]
|
||||
[iOS (11,0)]
|
||||
[Export ("initWithName:events:endEvents:recurrences:predicate:")]
|
||||
[DesignatedInitializer]
|
||||
IntPtr Constructor (string name, HMEvent[] events, [NullAllowed] HMEvent[] endEvents, [NullAllowed] NSDateComponents[] recurrences, [NullAllowed] NSPredicate predicate);
|
||||
|
||||
[Export ("events", ArgumentSemantic.Copy)]
|
||||
|
@ -1675,20 +1674,14 @@ namespace XamCore.HomeKit {
|
|||
[DisableDefaultCtor]
|
||||
interface HMPresenceEvent : NSMutableCopying {
|
||||
|
||||
[Internal]
|
||||
[Export ("initWithPresenceType:")]
|
||||
IntPtr Constructor (NSString presenceType);
|
||||
[Export ("initWithPresenceEventType:presenceUserType:")]
|
||||
IntPtr Constructor (HMPresenceEventType presenceEventType, HMPresenceEventUserType presenceUserType);
|
||||
|
||||
[Wrap ("this (HMPresenceTypeExtensions.GetConstant (presenceType))")]
|
||||
IntPtr Constructor (HMPresenceType presenceType);
|
||||
[Export ("presenceEventType")]
|
||||
HMPresenceEventType PresenceEventType { get; [NotImplemented] set; }
|
||||
|
||||
[Internal]
|
||||
[Export ("presenceType")]
|
||||
NSString _PresenceType { get; [NotImplemented] set; }
|
||||
|
||||
// FIXME: Bug https://bugzilla.xamarin.com/show_bug.cgi?id=57870
|
||||
// [Wrap ("HMPresenceTypeExtensions.GetValue (_PresenceType)")]
|
||||
// HMPresenceType PresenceType { get; [NotImplemented] set; }
|
||||
[Export ("presenceUserType")]
|
||||
HMPresenceEventUserType PresenceUserType { get; [NotImplemented] set; }
|
||||
|
||||
[Field ("HMPresenceKeyPath")]
|
||||
NSString KeyPath { get; }
|
||||
|
@ -1699,22 +1692,11 @@ namespace XamCore.HomeKit {
|
|||
[DisableDefaultCtor]
|
||||
interface HMMutablePresenceEvent {
|
||||
|
||||
[Internal]
|
||||
[Export ("initWithPresenceType:")]
|
||||
IntPtr Constructor (NSString presenceType);
|
||||
[Export ("presenceEventType", ArgumentSemantic.Assign)]
|
||||
HMPresenceEventType PresenceEventType { get; /* Radar 33883958: https://trello.com/c/TIlzWzrL*/ [NotImplemented] set; }
|
||||
|
||||
[Wrap ("this (HMPresenceTypeExtensions.GetConstant (presenceType))")]
|
||||
IntPtr Constructor (HMPresenceType presenceType);
|
||||
|
||||
[Internal]
|
||||
[Override]
|
||||
[Export ("presenceType")]
|
||||
NSString _PresenceType { get; set; }
|
||||
|
||||
// FIXME: Bug https://bugzilla.xamarin.com/show_bug.cgi?id=57870
|
||||
// [Override]
|
||||
// [Wrap ("HMPresenceTypeExtensions.GetValue (_PresenceType)")]
|
||||
// HMPresenceType PresenceType { get; set; }
|
||||
[Export ("presenceUserType", ArgumentSemantic.Assign)]
|
||||
HMPresenceEventUserType PresenceUserType { get; /* Radar 33883958: https://trello.com/c/TIlzWzrL*/ [NotImplemented] set; }
|
||||
}
|
||||
|
||||
[Watch (4,0), TV (11,0), iOS (11,0)]
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
//
|
||||
// Unit tests for HMMutablePresenceEventTest
|
||||
//
|
||||
// Authors:
|
||||
// Vincent Dondain <vidondai@microsoft.com>
|
||||
//
|
||||
//
|
||||
// Copyright 2017 Microsoft. All rights reserved.
|
||||
//
|
||||
|
||||
#if !MONOMAC
|
||||
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
using Foundation;
|
||||
using HomeKit;
|
||||
|
||||
namespace MonoTouchFixtures.HomeKit
|
||||
{
|
||||
[TestFixture]
|
||||
[Preserve (AllMembers = true)]
|
||||
public class HMMutablePresenceEventTest
|
||||
{
|
||||
[SetUp]
|
||||
public void Setup ()
|
||||
{
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PresenceTypePropertyTest ()
|
||||
{
|
||||
using (var obj = new HMMutablePresenceEvent (HMPresenceType.AnyUserAtHome)) {
|
||||
Assert.AreEqual (HMPresenceType.AnyUserAtHome, obj.PresenceType, "1 PresenceType Getter");
|
||||
obj.PresenceType = HMPresenceType.CurrentUserAtHome;
|
||||
Assert.AreEqual (HMPresenceType.CurrentUserAtHome, obj.PresenceType, "2 PresenceType Setter");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,41 +0,0 @@
|
|||
//
|
||||
// Unit tests for HMPresenceEventTest
|
||||
//
|
||||
// Authors:
|
||||
// Vincent Dondain <vidondai@microsoft.com>
|
||||
//
|
||||
//
|
||||
// Copyright 2017 Microsoft. All rights reserved.
|
||||
//
|
||||
|
||||
#if !MONOMAC
|
||||
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
using Foundation;
|
||||
using HomeKit;
|
||||
|
||||
namespace MonoTouchFixtures.HomeKit
|
||||
{
|
||||
[TestFixture]
|
||||
[Preserve (AllMembers = true)]
|
||||
public class HMPresenceEventTest
|
||||
{
|
||||
[SetUp]
|
||||
public void Setup ()
|
||||
{
|
||||
TestRuntime.AssertXcodeVersion (9, 0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PresenceTypePropertyTest ()
|
||||
{
|
||||
using (var obj = new HMPresenceEvent (HMPresenceType.AnyUserAtHome)) {
|
||||
Assert.AreEqual (HMPresenceType.AnyUserAtHome, obj.PresenceType, "1 PresenceType Getter");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -652,9 +652,7 @@
|
|||
<Compile Include="CoreText\CTParagraphStyleTests.cs" />
|
||||
<Compile Include="CoreData\NSQueryGenerationTokenTest.cs" />
|
||||
<Compile Include="EventKit\EKUIBundleTest.cs" />
|
||||
<Compile Include="HomeKit\HMMutablePresenceEventTest.cs" />
|
||||
<Compile Include="HomeKit\HMMutableSignificantTimeEventTest.cs" />
|
||||
<Compile Include="HomeKit\HMPresenceEventTest.cs" />
|
||||
<Compile Include="HomeKit\HMSignificantTimeEventTest.cs" />
|
||||
<Compile Include="UIKit\UIDragDropSessionExtensionsTest.cs" />
|
||||
<Compile Include="SpriteKit\SKTransformNodeTest.cs" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче