mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-17 15:47:28 +00:00
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: f60cd10f6d
Co-authored-by: ngutman <1540134+ngutman@users.noreply.github.com>
Co-authored-by: ngutman <1540134+ngutman@users.noreply.github.com>
Reviewed-by: @ngutman
71 lines
2.7 KiB
Swift
71 lines
2.7 KiB
Swift
import CoreLocation
|
|
import Foundation
|
|
import OpenClawKit
|
|
import UIKit
|
|
|
|
protocol CameraServicing: Sendable {
|
|
func listDevices() async -> [CameraController.CameraDeviceInfo]
|
|
func snap(params: OpenClawCameraSnapParams) async throws -> (format: String, base64: String, width: Int, height: Int)
|
|
func clip(params: OpenClawCameraClipParams) async throws -> (format: String, base64: String, durationMs: Int, hasAudio: Bool)
|
|
}
|
|
|
|
protocol ScreenRecordingServicing: Sendable {
|
|
func record(
|
|
screenIndex: Int?,
|
|
durationMs: Int?,
|
|
fps: Double?,
|
|
includeAudio: Bool?,
|
|
outPath: String?) async throws -> String
|
|
}
|
|
|
|
@MainActor
|
|
protocol LocationServicing: Sendable {
|
|
func authorizationStatus() -> CLAuthorizationStatus
|
|
func accuracyAuthorization() -> CLAccuracyAuthorization
|
|
func ensureAuthorization(mode: OpenClawLocationMode) async -> CLAuthorizationStatus
|
|
func currentLocation(
|
|
params: OpenClawLocationGetParams,
|
|
desiredAccuracy: OpenClawLocationAccuracy,
|
|
maxAgeMs: Int?,
|
|
timeoutMs: Int?) async throws -> CLLocation
|
|
func startLocationUpdates(
|
|
desiredAccuracy: OpenClawLocationAccuracy,
|
|
significantChangesOnly: Bool) -> AsyncStream<CLLocation>
|
|
func stopLocationUpdates()
|
|
func startMonitoringSignificantLocationChanges(onUpdate: @escaping @Sendable (CLLocation) -> Void)
|
|
func stopMonitoringSignificantLocationChanges()
|
|
}
|
|
|
|
protocol DeviceStatusServicing: Sendable {
|
|
func status() async throws -> OpenClawDeviceStatusPayload
|
|
func info() -> OpenClawDeviceInfoPayload
|
|
}
|
|
|
|
protocol PhotosServicing: Sendable {
|
|
func latest(params: OpenClawPhotosLatestParams) async throws -> OpenClawPhotosLatestPayload
|
|
}
|
|
|
|
protocol ContactsServicing: Sendable {
|
|
func search(params: OpenClawContactsSearchParams) async throws -> OpenClawContactsSearchPayload
|
|
func add(params: OpenClawContactsAddParams) async throws -> OpenClawContactsAddPayload
|
|
}
|
|
|
|
protocol CalendarServicing: Sendable {
|
|
func events(params: OpenClawCalendarEventsParams) async throws -> OpenClawCalendarEventsPayload
|
|
func add(params: OpenClawCalendarAddParams) async throws -> OpenClawCalendarAddPayload
|
|
}
|
|
|
|
protocol RemindersServicing: Sendable {
|
|
func list(params: OpenClawRemindersListParams) async throws -> OpenClawRemindersListPayload
|
|
func add(params: OpenClawRemindersAddParams) async throws -> OpenClawRemindersAddPayload
|
|
}
|
|
|
|
protocol MotionServicing: Sendable {
|
|
func activities(params: OpenClawMotionActivityParams) async throws -> OpenClawMotionActivityPayload
|
|
func pedometer(params: OpenClawPedometerParams) async throws -> OpenClawPedometerPayload
|
|
}
|
|
|
|
extension CameraController: CameraServicing {}
|
|
extension ScreenRecordService: ScreenRecordingServicing {}
|
|
extension LocationService: LocationServicing {}
|