// Copyright 2019-2023 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT use tauri::{command, AppHandle, Runtime, State, Window}; use crate::{DeepLink, Result}; #[command] pub(crate) async fn get_current( _app: AppHandle, _window: Window, deep_link: State<'_, DeepLink>, ) -> Result>> { deep_link.get_current() } #[command] pub(crate) async fn register( _app: AppHandle, _window: Window, deep_link: State<'_, DeepLink>, protocol: String, ) -> Result<()> { deep_link.register(protocol) } #[command] pub(crate) async fn unregister( _app: AppHandle, _window: Window, deep_link: State<'_, DeepLink>, protocol: String, ) -> Result<()> { deep_link.unregister(protocol) } #[command] pub(crate) async fn is_registered( _app: AppHandle, _window: Window, deep_link: State<'_, DeepLink>, protocol: String, ) -> Result { deep_link.is_registered(protocol) }