Fix rename

This commit is contained in:
Franz Heinzmann (Frando)
2022-07-15 15:49:42 +02:00
parent 361b7f5b69
commit 343bb34589
3 changed files with 5 additions and 5 deletions

View File

@@ -4442,12 +4442,12 @@ pub unsafe extern "C" fn dc_accounts_get_next_event(
#[cfg(feature = "jsonrpc")] #[cfg(feature = "jsonrpc")]
mod jsonrpc { mod jsonrpc {
use super::*; use super::*;
use deltachat_jsonrpc::api::CommandApi; use deltachat_jsonrpc::api::DeltaChatApiV0;
use deltachat_jsonrpc::yerpc::{OutReceiver, RpcClient, RpcSession}; use deltachat_jsonrpc::yerpc::{OutReceiver, RpcClient, RpcSession};
pub struct dc_jsonrpc_instance_t { pub struct dc_jsonrpc_instance_t {
receiver: OutReceiver, receiver: OutReceiver,
handle: RpcSession<CommandApi>, handle: RpcSession<DeltaChatApiV0>,
} }
#[no_mangle] #[no_mangle]

View File

@@ -15,7 +15,7 @@ mod tests {
async fn basic_json_rpc_functionality() -> anyhow::Result<()> { async fn basic_json_rpc_functionality() -> anyhow::Result<()> {
let tmp_dir = TempDir::new().unwrap().path().into(); let tmp_dir = TempDir::new().unwrap().path().into();
let accounts = Accounts::new(tmp_dir).await?; let accounts = Accounts::new(tmp_dir).await?;
let api = CommandApi::new(accounts); let api = DeltaChatApiV0::new(accounts);
let (sender, mut receiver) = unbounded::<String>(); let (sender, mut receiver) = unbounded::<String>();
@@ -56,7 +56,7 @@ mod tests {
async fn test_batch_set_config() -> anyhow::Result<()> { async fn test_batch_set_config() -> anyhow::Result<()> {
let tmp_dir = TempDir::new().unwrap().path().into(); let tmp_dir = TempDir::new().unwrap().path().into();
let accounts = Accounts::new(tmp_dir).await?; let accounts = Accounts::new(tmp_dir).await?;
let api = CommandApi::new(accounts); let api = DeltaChatApiV0::new(accounts);
let (sender, mut receiver) = unbounded::<String>(); let (sender, mut receiver) = unbounded::<String>();

View File

@@ -40,7 +40,7 @@ async fn main() -> Result<(), std::io::Error> {
Ok(()) Ok(())
} }
async fn handler(ws: WebSocketUpgrade, Extension(api): Extension<CommandApi>) -> Response { async fn handler(ws: WebSocketUpgrade, Extension(api): Extension<DeltaChatApiV0>) -> Response {
let (client, out_receiver) = RpcClient::new(); let (client, out_receiver) = RpcClient::new();
let session = RpcSession::new(client.clone(), api.clone()); let session = RpcSession::new(client.clone(), api.clone());
tokio::spawn(async move { tokio::spawn(async move {