Defines Swift protocols for hardware and system services like camera, screen recording, and location. Use for iOS node daemons.
// Source: https://github.com/arkCyber/ClawMan | License: MIT | Copyright 2026 ClawMan
// Provided via justclaw.it.com; keep this notice with the code.
import CoreLocation
import Foundation
import OpenClawKit
import UIKit
typealias OpenClawCameraSnapResult = (format: String, base64: String, width: Int, height: Int)
typealias OpenClawCameraClipResult = (format: String, base64: String, durationMs: Int, hasAudio: Bool)
protocol CameraServicing: Sendable {
func listDevices() async -> [CameraController.CameraDeviceInfo]
func snap(params: OpenClawCameraSnapParams) async throws -> OpenClawCameraSnapResult
func clip(params: OpenClawCameraClipParams) async throws -> OpenClawCameraClipResult
}
protocol ScreenRecordingServicing: Sendable {
func record(
screenIndex: Int?,
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key