diff --git a/Frameworks/Bindings.txt b/Frameworks/Bindings.txt index cec1da4111fcd335b53d1e363114a94685800fa8..9fba83df0bda30fec264e321e1a66f76665e3d7c 100644 --- a/Frameworks/Bindings.txt +++ b/Frameworks/Bindings.txt @@ -1,4 +1,4 @@ -https://git.xx.network/elixxir/client/-/commit/12eb14f16d4a786b073364333d5fb7add6aa6fb7 +https://git.xx.network/elixxir/client/-/commit/7aac8e09168fc8fb33ace2263e8ee576724cf70f go version go1.17.13 darwin/arm64 Xcode 14.0 Build version 14A309 gomobile bind target: ios,iossimulator,macos diff --git a/Frameworks/Bindings.xcframework/Info.plist b/Frameworks/Bindings.xcframework/Info.plist index e66824e5243985b4ac053ef62aeaaf571fe03970..3d81013ba0ba606da4b42b6f3119f688c6d9b97d 100644 --- a/Frameworks/Bindings.xcframework/Info.plist +++ b/Frameworks/Bindings.xcframework/Info.plist @@ -21,28 +21,28 @@ </dict> <dict> <key>LibraryIdentifier</key> - <string>ios-arm64</string> + <string>macos-arm64_x86_64</string> <key>LibraryPath</key> <string>Bindings.framework</string> <key>SupportedArchitectures</key> <array> <string>arm64</string> + <string>x86_64</string> </array> <key>SupportedPlatform</key> - <string>ios</string> + <string>macos</string> </dict> <dict> <key>LibraryIdentifier</key> - <string>macos-arm64_x86_64</string> + <string>ios-arm64</string> <key>LibraryPath</key> <string>Bindings.framework</string> <key>SupportedArchitectures</key> <array> <string>arm64</string> - <string>x86_64</string> </array> <key>SupportedPlatform</key> - <string>macos</string> + <string>ios</string> </dict> </array> <key>CFBundlePackageType</key> diff --git a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings index 3e4de76647083e287fb3285e065272666172135a..fa210455a0a975408dbd63e78456ac6f9a8a4b70 100644 Binary files a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings and b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Bindings differ diff --git a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h index 96ddf1d0c47ebdea5dffbb77e053fbdd5e841798..96523f8825cf04317f17fab6d169b33c1e82c90c 100644 --- a/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/ios-arm64/Bindings.framework/Versions/A/Headers/Bindings.objc.h @@ -483,6 +483,21 @@ Returns: the xx network. */ - (NSData* _Nullable)getReceptionRegistrationValidationSignature; +/** + * GetRunningProcesses returns the names of all running processes at the time +of this call. Note that this list may change and is subject to race +conditions if multiple threads are in the process of starting or stopping. + +Returns: + - []byte - A JSON marshalled list of all running processes. + +JSON Example: + { + "FileTransfer{BatchBuilderThread, FilePartSendingThread#0, FilePartSendingThread#1, FilePartSendingThread#2, FilePartSendingThread#3}", + "MessageReception Worker 0" + } + */ +- (NSData* _Nullable)getRunningProcesses:(NSError* _Nullable* _Nullable)error; /** * HasRunningProcessies checks if any background threads are running and returns true if one or more are. diff --git a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings index c03b3514dde5282a331b4eb6e4502dd88e118c73..5dd1a70d80a7f20c4ec801fa2c17eee9606724e1 100644 Binary files a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings and b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Bindings differ diff --git a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h index 96ddf1d0c47ebdea5dffbb77e053fbdd5e841798..96523f8825cf04317f17fab6d169b33c1e82c90c 100644 --- a/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/ios-arm64_x86_64-simulator/Bindings.framework/Versions/A/Headers/Bindings.objc.h @@ -483,6 +483,21 @@ Returns: the xx network. */ - (NSData* _Nullable)getReceptionRegistrationValidationSignature; +/** + * GetRunningProcesses returns the names of all running processes at the time +of this call. Note that this list may change and is subject to race +conditions if multiple threads are in the process of starting or stopping. + +Returns: + - []byte - A JSON marshalled list of all running processes. + +JSON Example: + { + "FileTransfer{BatchBuilderThread, FilePartSendingThread#0, FilePartSendingThread#1, FilePartSendingThread#2, FilePartSendingThread#3}", + "MessageReception Worker 0" + } + */ +- (NSData* _Nullable)getRunningProcesses:(NSError* _Nullable* _Nullable)error; /** * HasRunningProcessies checks if any background threads are running and returns true if one or more are. diff --git a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings index bcea7d00c7ba5265cc4daf72def814d7065df731..0f812dc51a542998d225b841fc3e6c7af42710e0 100644 Binary files a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings and b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Bindings differ diff --git a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h index 96ddf1d0c47ebdea5dffbb77e053fbdd5e841798..96523f8825cf04317f17fab6d169b33c1e82c90c 100644 --- a/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h +++ b/Frameworks/Bindings.xcframework/macos-arm64_x86_64/Bindings.framework/Versions/A/Headers/Bindings.objc.h @@ -483,6 +483,21 @@ Returns: the xx network. */ - (NSData* _Nullable)getReceptionRegistrationValidationSignature; +/** + * GetRunningProcesses returns the names of all running processes at the time +of this call. Note that this list may change and is subject to race +conditions if multiple threads are in the process of starting or stopping. + +Returns: + - []byte - A JSON marshalled list of all running processes. + +JSON Example: + { + "FileTransfer{BatchBuilderThread, FilePartSendingThread#0, FilePartSendingThread#1, FilePartSendingThread#2, FilePartSendingThread#3}", + "MessageReception Worker 0" + } + */ +- (NSData* _Nullable)getRunningProcesses:(NSError* _Nullable* _Nullable)error; /** * HasRunningProcessies checks if any background threads are running and returns true if one or more are. diff --git a/Sources/XXClient/CMix/CMix.swift b/Sources/XXClient/CMix/CMix.swift index ef17f9ec296f30fbc9ab8bdf9443ba200dbff4c9..d02f0a78d8408ac7bed99ced81b072608cd2cdb6 100644 --- a/Sources/XXClient/CMix/CMix.swift +++ b/Sources/XXClient/CMix/CMix.swift @@ -7,6 +7,7 @@ public struct CMix { public var isHealthy: CMixIsHealthy public var getNodeRegistrationStatus: CMixGetNodeRegistrationStatus public var hasRunningProcesses: CMixHasRunningProcesses + public var getRunningProcesses: CMixGetRunningProcesses public var networkFollowerStatus: CMixNetworkFollowerStatus public var startNetworkFollower: CMixStartNetworkFollower public var stopNetworkFollower: CMixStopNetworkFollower @@ -26,6 +27,7 @@ extension CMix { isHealthy: .live(bindingsCMix), getNodeRegistrationStatus: .live(bindingsCMix), hasRunningProcesses: .live(bindingsCMix), + getRunningProcesses: .live(bindingsCMix), networkFollowerStatus: .live(bindingsCMix), startNetworkFollower: .live(bindingsCMix), stopNetworkFollower: .live(bindingsCMix), @@ -46,6 +48,7 @@ extension CMix { isHealthy: .unimplemented, getNodeRegistrationStatus: .unimplemented, hasRunningProcesses: .unimplemented, + getRunningProcesses: .unimplemented, networkFollowerStatus: .unimplemented, startNetworkFollower: .unimplemented, stopNetworkFollower: .unimplemented, diff --git a/Sources/XXClient/CMix/Functions/CMIxGetRunningProcesses.swift b/Sources/XXClient/CMix/Functions/CMIxGetRunningProcesses.swift new file mode 100644 index 0000000000000000000000000000000000000000..b01a8d8993d9a9b6969362a4291c8e622e262c33 --- /dev/null +++ b/Sources/XXClient/CMix/Functions/CMIxGetRunningProcesses.swift @@ -0,0 +1,25 @@ +import Bindings +import XCTestDynamicOverlay + +public struct CMixGetRunningProcesses { + public var run: () throws -> [String] + + public func callAsFunction() throws -> [String] { + try run() + } +} + +extension CMixGetRunningProcesses { + public static func live(_ bindingsCMix: BindingsCmix) -> CMixGetRunningProcesses { + CMixGetRunningProcesses { + let data = try bindingsCMix.getRunningProcesses() + return try JSONDecoder().decode([String].self, from: data) + } + } +} + +extension CMixGetRunningProcesses { + public static let unimplemented = CMixGetRunningProcesses( + run: XCTUnimplemented("\(Self.self)") + ) +}