mirror of
https://github.com/netbirdio/IronRDP.git
synced 2026-05-22 18:43:12 -07:00
fix!: rename callExtension to invokeExtension (#803)
This commit is contained in:
@@ -188,12 +188,12 @@ macro_rules! make_bridge {
|
||||
$crate::Session::supports_unicode_keyboard_shortcuts(&self.0)
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = extensionCall)]
|
||||
pub fn extension_call(
|
||||
#[wasm_bindgen(js_name = invokeExtension)]
|
||||
pub fn invoke_extension(
|
||||
&self,
|
||||
ext: $crate::Extension,
|
||||
) -> Result<$crate::internal::wasm_bindgen::JsValue, IronError> {
|
||||
<<$api as $crate::RemoteDesktopApi>::Session as $crate::Session>::extension_call(&self.0, ext)
|
||||
<<$api as $crate::RemoteDesktopApi>::Session as $crate::Session>::invoke_extension(&self.0, ext)
|
||||
.map_err(IronError)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ pub trait Session {
|
||||
|
||||
fn supports_unicode_keyboard_shortcuts(&self) -> bool;
|
||||
|
||||
fn extension_call(&self, ext: Extension) -> Result<JsValue, Self::Error>;
|
||||
fn invoke_extension(&self, ext: Extension) -> Result<JsValue, Self::Error>;
|
||||
}
|
||||
|
||||
pub trait SessionTerminationInfo {
|
||||
|
||||
@@ -805,7 +805,7 @@ impl iron_remote_desktop::Session for Session {
|
||||
false
|
||||
}
|
||||
|
||||
fn extension_call(&self, ext: Extension) -> Result<JsValue, Self::Error> {
|
||||
fn invoke_extension(&self, ext: Extension) -> Result<JsValue, Self::Error> {
|
||||
Err(
|
||||
IronError::from(anyhow::Error::msg(format!("unknown extension: {}", ext.ident())))
|
||||
.with_kind(IronErrorKind::General),
|
||||
|
||||
@@ -9,7 +9,7 @@ export interface Session {
|
||||
applyInputs(transaction: InputTransaction): void;
|
||||
releaseAllInputs(): void;
|
||||
synchronizeLockKeys(scrollLock: boolean, numLock: boolean, capsLock: boolean, kanaLock: boolean): void;
|
||||
extensionCall(value: unknown): unknown;
|
||||
invokeExtension(value: unknown): unknown;
|
||||
shutdown(): void;
|
||||
onClipboardPaste(data: ClipboardData): Promise<void>;
|
||||
resize(
|
||||
|
||||
@@ -63,8 +63,8 @@ export class PublicAPI {
|
||||
this.remoteDesktopService.setEnableClipboard(enable);
|
||||
}
|
||||
|
||||
private callExtension(ext: Extension) {
|
||||
this.remoteDesktopService.callExtension(ext);
|
||||
private invokeExtension(ext: Extension) {
|
||||
this.remoteDesktopService.invokeExtension(ext);
|
||||
}
|
||||
|
||||
getExposedFunctions(): UserInteraction {
|
||||
@@ -83,7 +83,7 @@ export class PublicAPI {
|
||||
setCursorStyleOverride: this.setCursorStyleOverride.bind(this),
|
||||
resize: this.resize.bind(this),
|
||||
setEnableClipboard: this.setEnableClipboard.bind(this),
|
||||
callExtension: this.callExtension.bind(this),
|
||||
callExtension: this.invokeExtension.bind(this),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,8 +281,8 @@ export class RemoteDesktopService {
|
||||
}
|
||||
}
|
||||
|
||||
callExtension(ext: Extension) {
|
||||
this.session?.extensionCall(ext);
|
||||
invokeExtension(ext: Extension) {
|
||||
this.session?.invokeExtension(ext);
|
||||
}
|
||||
|
||||
private releaseAllInputs() {
|
||||
|
||||
Reference in New Issue
Block a user