File tree 2 files changed +37
-0
lines changed
src/darwin/Framework/CHIP
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 17
17
#import " MTRDeviceController_XPC.h"
18
18
#import " MTRLogging_Internal.h"
19
19
20
+ @interface MTRDeviceController_XPC ()
21
+ @property (nonatomic , strong ) NSXPCConnection * xpcConnection;
22
+ @end
23
+
20
24
@implementation MTRDeviceController_XPC
21
25
22
26
- (nullable instancetype )initWithParameters : (MTRDeviceControllerAbstractParameters *)parameters
23
27
error : (NSError * __autoreleasing *)error
24
28
{
25
29
MTR_LOG_ERROR (" unimplemented method %s called" , __PRETTY_FUNCTION__);
30
+ // initiate XPC connection? kmo 14 aug 2024 12h35
26
31
return nil ;
27
32
}
28
33
34
+ - (BOOL )setupCommissioningSessionWithPayload : (MTRSetupPayload *)payload
35
+ newNodeID : (NSNumber *)newNodeID
36
+ error : (NSError * __autoreleasing *)error
37
+ {
38
+ // xpc things obviously! kmo 14 aug 2024 12h35
39
+ // transform async work to sync work
40
+
41
+ MTR_LOG_ERROR (" unimplemented method %s called" , __PRETTY_FUNCTION__);
42
+ return false ;
43
+ }
44
+
45
+ typedef void (^BoolReplyBlock)(bool );
46
+ - (void )_xpc_setupCommissioningSessionWithPayload : (MTRSetupPayload *)payload
47
+ newNodeID : (NSNumber *)newNodeID
48
+ error : (NSError * __autoreleasing *)error
49
+ reply : (BoolReplyBlock)reply
50
+ {
51
+ MTR_LOG_ERROR (" unimplemented XPC method %s called" , __PRETTY_FUNCTION__);
52
+ reply (false );
53
+ }
54
+
29
55
@end
Original file line number Diff line number Diff line change 16
16
17
17
#import < Foundation/Foundation.h>
18
18
19
+ @class MTRSetupPayload;
20
+
19
21
NS_ASSUME_NONNULL_BEGIN
20
22
21
23
typedef void (^MTRXPCServiceIntReplyBlock)(int );
24
+ typedef void (^MTRXPCServiceBoolReplyBlock)(BOOL );
22
25
23
26
@protocol MTRXPCServiceProtocol <NSObject >
24
27
- (void )ping ;
25
28
- (void )getMeaningOfLifeWithReplyBlock : (MTRXPCServiceIntReplyBlock)reply ;
29
+
30
+ // these real methods will be optional for now, but not when we are done building here.
31
+ @optional
32
+ - (void )setupCommissioningSessionWithPayload : (MTRSetupPayload *)payload
33
+ newNodeID : (NSNumber *)newNodeID
34
+ error : (NSError * __autoreleasing *)error
35
+ reply : (MTRXPCServiceBoolReplyBlock)reply ;
36
+
26
37
@end
27
38
28
39
NS_ASSUME_NONNULL_END
You can’t perform that action at this time.
0 commit comments