This repository has been archived by the owner on Jul 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathSiriObjectsRaw.h
73 lines (55 loc) · 2.34 KB
/
SiriObjectsRaw.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// SiriObjects.h
// AssistantExtensions
//
// Created by Kexik on 12/25/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#pragma once
#include <Foundation/Foundation.h>
/// Type representing one Siri class description as NSMutableDictionary
typedef NSMutableDictionary SOObject;
#ifdef SC_PRIVATE
# import "SiriObjects_private.h"
# define SC_SUPER(cls) cls
#else
# define SC_SUPER(cls) NSObject
#endif
/// Type representing a concrete SiriObject
@protocol SOAceObject <NSObject>
@required
/// Class name beginning with SA, e.g. SATest
- (id)encodedClassName;
/// Group identifier, e.g. com.company.ace
- (id)groupIdentifier;
@end
/// Any object (NSMutableDictionary)
typedef NSMutableDictionary SOObject;
/// Root object (NSMutableDictionary)
typedef SOObject SOAceObject;
@protocol SOSystem <NSObject>
@required
-(BOOL)registerAcronym:(NSString*)acronym group:(NSString*)group;
@end
/// Protocol specifying methods of context passed via handleSpeech
@protocol SOContext <NSObject>
@required
-(SOObject*)createObjectDict:(NSString*)className group:(NSString*)group properties:(NSDictionary*)props;
-(SOObject*)createAssistantUtteranceView:(NSString*)text;
-(SOObject*)createAssistantUtteranceView:(NSString*)text speakableText:(NSString*)speakableText;
-(SOObject*)createAssistantUtteranceView:(NSString*)text speakableText:(NSString*)speakableText dialogIdentifier:(NSString*)dialogIdentifier;
-(SOAceObject*)sendAceObject:(NSString*)className group:(NSString*)group properties:(NSDictionary*)props;
-(SOAceObject*)sendRequestCompleted;
-(SOAceObject*)sendAddViews:(NSArray*)views;
-(SOAceObject*)sendAddViews:(NSArray*)views dialogPhase:(NSString*)dialogPhase scrollToTop:(BOOL)scrollToTop temporary:(BOOL)temporary;
-(SOAceObject*)sendAddViewsUtteranceView:(NSString*)text;
-(SOAceObject*)sendAddViewsUtteranceView:(NSString*)text speakableText:(NSString*)speakableText;
-(SOAceObject*)sendAddViewsUtteranceView:(NSString*)text speakableText:(NSString*)speakableText dialogPhase:(NSString*)dialogPhase scrollToTop:(BOOL)scrollToTop temporary:(BOOL)temporary;
@end
/// Protocol specifying methods of the extension's principal class
@protocol SOExtension <NSObject>
@required
-(id)initWithSystem:(id<SOSystem>)system;
@optional
-(BOOL)handleSpeech:(NSString*)text tokens:(NSArray*)tokens tokenSet:(NSSet*)tokenset context:(id<SOContext>)ctx;
@end