-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* empty xpc service files * XPC service needs to be C++ to use MTRLogging * add tests; stub method signature * start configuring test XPC listener * add first test method to XPC service protocol * tests: remove peformance test; add headers * make MTRXPCService testable * more working lines of XPC listener setup * add dummy XPC service for testing * add replying method to service protocol / implementation * remove log - reply contents can be asserted * make test interesting * linty formatty * remove personal development team from pbxproj * fix new file headers * less whitespace * Restyled by whitespace * Restyled by clang-format * add new XPC device controller * sketch out a first XPC method * store WIP for rebase * fix pbxproj merge mistake * make WIP slightly more sensible * WIP: remote proxy obj in `MTRDeviceController_XPC` * more experiments * WIP: return type issue run `MTRXPCServiceTests testMTRXPCServiceSetup` and see selection of proxy object method in `MTRDeviceController_XPC.m`/`initWithXPCListenerEndpointForTesting` around line 44 to see the problem. * add `MTRDevice_XPC` nothing exciting yet * add device controller over XPC parameters stub * add init split for XPC device controllers not yet implemented, but there * rename new XPC parameters class `OverXPC` is already taken / means something else * Restyled by whitespace * Restyled by clang-format * remove failing exploratory test * lintfix * Examples * quickly attempt to fix test unused variable -> warning -> error * Restyled by whitespace * Restyled by clang-format * inevitably the file will need to be obj-C++ * prepare to use mach service name to create XPC connection * allow for other XPC controller connection types for now once mach service is working, i don't expect to need others, but easier to collapse classes than raise. * constant for well-known matter plugin service name * note to self and re-ordering of this code now what `XPCParameters` is a subclass * XPC parameters should support secure coding * don't keep around object proxy; make a new one when needed. try calling the `checkIn` method when connecting. remove old test methods that served their purpose. * that doesn't need to be there. * Restyled by whitespace * Restyled by clang-format * no longer fighting with compiler, have some `instancetype` * extremely normal object construction * somehow this header got thrown out * Restyled by whitespace * Restyled by clang-format * Updating XPC interfaces * hide `initWithMachServiceName:options:` constructor tvOS/iOS compilation issues need a look * make `MTRDeviceController_XPC` an XPC client via `MTRXPCClientProtocol_MTRDeviceController`, which for the moment is empty * remove initial tests they served their purpose well but are no longer relevant * call mach service constructor when appropriate also logging * remove some obsolete test methods * more obsoletes fixed * more obsolete removal and logging tweaks * buildability tweaks * Moving along * Fixing header * Fixing macros and codable * Adding invoke? * Restyled by whitespace * Restyled by clang-format * Actually hooking up to XPCConnection * Actually hooking up to XPCConnection * Adding XPC Parameters * Adding XPC Parameter hookup * Restyled by whitespace * Restyled by clang-format * true => YES --------- Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Justin Wood <woody@apple.com>
- Loading branch information
Showing
18 changed files
with
872 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/darwin/Framework/CHIP/MTRDeviceControllerXPCParameters.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* Copyright (c) 2024 Project CHIP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import <Matter/Matter.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface MTRDeviceControllerXPCParameters : MTRDeviceControllerParameters | ||
@end | ||
|
||
@interface MTRDeviceControllerMachServiceXPCParameters : MTRDeviceControllerXPCParameters | ||
|
||
@property (atomic, retain) NSString * machServiceName; | ||
@property (atomic, readwrite) NSXPCConnectionOptions connectionOptions; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
35 changes: 35 additions & 0 deletions
35
src/darwin/Framework/CHIP/MTRDeviceControllerXPCParameters.mm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (c) 2024 Project CHIP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import "MTRDeviceControllerXPCParameters.h" | ||
|
||
@implementation MTRDeviceControllerXPCParameters | ||
|
||
+ (BOOL)supportsSecureCoding | ||
{ | ||
return YES; | ||
} | ||
|
||
@end | ||
|
||
@implementation MTRDeviceControllerMachServiceXPCParameters | ||
|
||
+ (BOOL)supportsSecureCoding | ||
{ | ||
return YES; | ||
} | ||
|
||
@end |
Oops, something went wrong.