From 06c09ecbdf83cc5cc33971ffb75ba81e85b6eb33 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 29 十一月 2021 15:31:26 +0800 Subject: [PATCH] 2021-11-29 1.更新 --- Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/ApiDefinition.cs | 119 ++++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 85 insertions(+), 34 deletions(-) diff --git a/Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/ApiDefinition.cs b/Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/ApiDefinition.cs index d098ab4..c334d7e 100644 --- a/Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/ApiDefinition.cs +++ b/Shared.IOS.HDLSceneSiri/Shared.IOS.HDLSceneSiri/ApiDefinition.cs @@ -6,18 +6,35 @@ namespace HDLSceneSiri { + // @interface HDLRunSceneIntent : INIntent - [Watch(5, 0), NoTV, Mac(11, 0), iOS(12, 0)] + //[Watch(5, 0), NoTV, Mac(11, 0), iOS(12, 0)] [BaseType(typeof(INIntent))] interface HDLRunSceneIntent { - // @property (readwrite, copy, nonatomic) NSString * _Nullable sceneName; - [NullAllowed, Export("sceneName")] - string SceneName { get; set; } + // @property (readwrite, copy, nonatomic) NSString * _Nullable controlName; + [NullAllowed, Export("controlName")] + string ControlName { get; set; } - // @property (readwrite, copy, nonatomic) NSString * _Nullable sceneId; - [NullAllowed, Export("sceneId")] - string SceneId { get; set; } + // @property (readwrite, copy, nonatomic) NSString * _Nullable controlId; + [NullAllowed, Export("controlId")] + string ControlId { get; set; } + + // @property (readwrite, copy, nonatomic) NSString * _Nullable homeId; + [NullAllowed, Export("homeId")] + string HomeId { get; set; } + + // @property (readwrite, copy, nonatomic) NSString * _Nullable controlType; + [NullAllowed, Export("controlType")] + string ControlType { get; set; } + + // @property (readwrite, copy, nonatomic) NSString * _Nullable controlJSONStr; + [NullAllowed, Export("controlJSONStr")] + string ControlJSONStr { get; set; } + + // @property (readwrite, copy, nonatomic) NSString * _Nullable actionName; + [NullAllowed, Export("actionName")] + string ActionName { get; set; } } // @protocol HDLRunSceneIntentHandling <NSObject> @@ -30,23 +47,24 @@ protocol, then [Model] is redundant and will generate code that will never be used. */ - [Watch(5, 0), NoTV, Mac(11, 0), iOS(12, 0)] - [Protocol] + //[Watch(5, 0), NoTV, Mac(11, 0), iOS(12, 0)] + //[Protocol] + [Protocol, Model] [BaseType(typeof(NSObject))] interface HDLRunSceneIntentHandling { - // @required -(void)handleRunScene:(HDLRunSceneIntent * _Nonnull)intent completion:(void (^ _Nonnull)(HDLRunSceneIntentResponse * _Nonnull))completion __attribute__((swift_name("handle(intent:completion:)"))); + // @required -(void)handleHDLRunScene:(HDLRunSceneIntent * _Nonnull)intent completion:(void (^ _Nonnull)(HDLRunSceneIntentResponse * _Nonnull))completion __attribute__((swift_name("handle(intent:completion:)"))); [Abstract] - [Export("handleRunScene:completion:")] - void HandleRunScene(HDLRunSceneIntent intent, Action<HDLRunSceneIntentResponse> completion); + [Export("handleHDLRunScene:completion:")] + void HandleHDLRunScene(HDLRunSceneIntent intent, Action<HDLRunSceneIntentResponse> completion); - // @optional -(void)confirmRunScene:(HDLRunSceneIntent * _Nonnull)intent completion:(void (^ _Nonnull)(HDLRunSceneIntentResponse * _Nonnull))completion __attribute__((swift_name("confirm(intent:completion:)"))); - [Export("confirmRunScene:completion:")] - void ConfirmRunScene(HDLRunSceneIntent intent, Action<HDLRunSceneIntentResponse> completion); + // @optional -(void)confirmHDLRunScene:(HDLRunSceneIntent * _Nonnull)intent completion:(void (^ _Nonnull)(HDLRunSceneIntentResponse * _Nonnull))completion __attribute__((swift_name("confirm(intent:completion:)"))); + [Export("confirmHDLRunScene:completion:")] + void ConfirmHDLRunScene(HDLRunSceneIntent intent, Action<HDLRunSceneIntentResponse> completion); } // @interface HDLRunSceneIntentResponse : INIntentResponse - [Watch(5, 0), NoTV, Mac(11, 0), iOS(12, 0)] + //[Watch(5, 0), NoTV, Mac(11, 0), iOS(12, 0)] [BaseType(typeof(INIntentResponse))] [DisableDefaultCtor] interface HDLRunSceneIntentResponse @@ -56,10 +74,10 @@ [DesignatedInitializer] IntPtr Constructor(HDLRunSceneIntentResponseCode code, [NullAllowed] NSUserActivity userActivity); - // +(instancetype _Nonnull)successIntentResponseWithSceneName:(NSString * _Nonnull)sceneName __attribute__((swift_name("success(sceneName:)"))); + // +(instancetype _Nonnull)successIntentResponseWithControlName:(NSString * _Nonnull)controlName __attribute__((swift_name("success(controlName:)"))); [Static] - [Export("successIntentResponseWithSceneName:")] - HDLRunSceneIntentResponse SuccessIntentResponseWithSceneName(string sceneName); + [Export("successIntentResponseWithControlName:")] + HDLRunSceneIntentResponse SuccessIntentResponseWithControlName(string controlName); // +(instancetype _Nonnull)failureIntentResponseWithErrorMessage:(NSString * _Nonnull)errorMessage __attribute__((swift_name("failure(errorMessage:)"))); [Static] @@ -74,13 +92,55 @@ [NullAllowed, Export("successMessage")] string SuccessMessage { get; set; } - // @property (readwrite, copy, nonatomic) NSString * _Nullable sceneName; - [NullAllowed, Export("sceneName")] - string SceneName { get; set; } + // @property (readwrite, copy, nonatomic) NSString * _Nullable controlName; + [NullAllowed, Export("controlName")] + string ControlName { get; set; } // @property (readonly, nonatomic) HDLRunSceneIntentResponseCode code; [Export("code")] HDLRunSceneIntentResponseCode Code { get; } + } + + // @interface HDLSiriShortcutModel : NSObject + [BaseType(typeof(NSObject))] + interface HDLSiriShortcutModel + { + // @property (copy, nonatomic) NSString * _Nonnull title; + [Export("title")] + string Title { get; set; } + + // @property (copy, nonatomic) NSString * _Nonnull content; + [Export("content")] + string Content { get; set; } + + // @property (copy, nonatomic) NSArray<HDLSiriControlModel *> * _Nonnull list; + [Export("list", ArgumentSemantic.Copy)] + HDLSiriControlModel[] List { get; set; } + } + + // @interface HDLSiriControlModel : NSObject + [BaseType(typeof(NSObject))] + interface HDLSiriControlModel + { + // @property (copy, nonatomic) NSString * _Nonnull controlName; + [Export("controlName")] + string ControlName { get; set; } + + // @property (copy, nonatomic) NSString * _Nonnull controlId; + [Export("controlId")] + string ControlId { get; set; } + + // @property (copy, nonatomic) NSString * _Nonnull controlType; + [Export("controlType")] + string ControlType { get; set; } + + // @property (copy, nonatomic) NSString * _Nonnull controlJSONStr; + [Export("controlJSONStr")] + string ControlJSONStr { get; set; } + + // @property (copy, nonatomic) NSString * _Nonnull actionName; + [Export("actionName")] + string ActionName { get; set; } } // @interface HDLSiriSceneListViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> @@ -105,18 +165,9 @@ // @property (nonatomic, strong) NSString * _Nonnull titleName; [Export("titleName", ArgumentSemantic.Strong)] string TitleName { get; set; } - } - // @interface HDLSiriSceneModel : NSObject - [BaseType(typeof(NSObject))] - interface HDLSiriSceneModel - { - // @property (copy, nonatomic) NSString * _Nonnull userSceneId; - [Export("userSceneId")] - string UserSceneId { get; set; } - - // @property (copy, nonatomic) NSString * _Nonnull name; - [Export("name")] - string Name { get; set; } + // @property (nonatomic, strong) NSString * _Nonnull homeId; + [Export("homeId", ArgumentSemantic.Strong)] + string HomeId { get; set; } } } -- Gitblit v1.8.0