remove veilid-wasm project, too out of date
refactor state updates and formalize a VeilidState object work on veilid-flutter api
This commit is contained in:
		@@ -8,10 +8,10 @@ static LOREM_IPSUM:&[u8] = b"Lorem ipsum dolor sit amet, consectetur adipiscing
 | 
			
		||||
 | 
			
		||||
fn setup_veilid_core() -> VeilidCoreSetup {
 | 
			
		||||
    VeilidCoreSetup {
 | 
			
		||||
        state_change_callback: Arc::new(
 | 
			
		||||
            move |change: VeilidStateChange| -> SystemPinBoxFuture<()> {
 | 
			
		||||
        update_callback: Arc::new(
 | 
			
		||||
            move |veilid_update: VeilidUpdate| -> SystemPinBoxFuture<()> {
 | 
			
		||||
                Box::pin(async move {
 | 
			
		||||
                    trace!("state_change_callback: {:?}", change);
 | 
			
		||||
                    trace!("update_callback: {:?}", veilid_update);
 | 
			
		||||
                })
 | 
			
		||||
            },
 | 
			
		||||
        ),
 | 
			
		||||
 
 | 
			
		||||
@@ -5,10 +5,10 @@ use crate::*;
 | 
			
		||||
 | 
			
		||||
fn setup_veilid_core() -> VeilidCoreSetup {
 | 
			
		||||
    VeilidCoreSetup {
 | 
			
		||||
        state_change_callback: Arc::new(
 | 
			
		||||
            move |change: VeilidStateChange| -> SystemPinBoxFuture<()> {
 | 
			
		||||
        update_callback: Arc::new(
 | 
			
		||||
            move |veilid_update: VeilidUpdate| -> SystemPinBoxFuture<()> {
 | 
			
		||||
                Box::pin(async move {
 | 
			
		||||
                    trace!("state_change_callback: {:?}", change);
 | 
			
		||||
                    trace!("update_callback: {:?}", veilid_update);
 | 
			
		||||
                })
 | 
			
		||||
            },
 | 
			
		||||
        ),
 | 
			
		||||
 
 | 
			
		||||
@@ -6,10 +6,10 @@ use crate::*;
 | 
			
		||||
 | 
			
		||||
fn setup_veilid_core() -> VeilidCoreSetup {
 | 
			
		||||
    VeilidCoreSetup {
 | 
			
		||||
        state_change_callback: Arc::new(
 | 
			
		||||
            move |change: VeilidStateChange| -> SystemPinBoxFuture<()> {
 | 
			
		||||
        update_callback: Arc::new(
 | 
			
		||||
            move |veilid_update: VeilidUpdate| -> SystemPinBoxFuture<()> {
 | 
			
		||||
                Box::pin(async move {
 | 
			
		||||
                    trace!("state_change_callback: {:?}", change);
 | 
			
		||||
                    trace!("update_callback: {:?}", veilid_update);
 | 
			
		||||
                })
 | 
			
		||||
            },
 | 
			
		||||
        ),
 | 
			
		||||
 
 | 
			
		||||
@@ -145,10 +145,10 @@ cfg_if! {
 | 
			
		||||
 | 
			
		||||
pub fn setup_veilid_core() -> VeilidCoreSetup {
 | 
			
		||||
    VeilidCoreSetup {
 | 
			
		||||
        state_change_callback: Arc::new(
 | 
			
		||||
            move |change: VeilidStateChange| -> SystemPinBoxFuture<()> {
 | 
			
		||||
        update_callback: Arc::new(
 | 
			
		||||
            move |veilid_update: VeilidUpdate| -> SystemPinBoxFuture<()> {
 | 
			
		||||
                Box::pin(async move {
 | 
			
		||||
                    trace!("state_change_callback: {:?}", change);
 | 
			
		||||
                    trace!("update_callback: {:?}", veilid_update);
 | 
			
		||||
                })
 | 
			
		||||
            },
 | 
			
		||||
        ),
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ pub async fn test_attach_detach() {
 | 
			
		||||
    api.attach().await.unwrap();
 | 
			
		||||
    intf::sleep(5000).await;
 | 
			
		||||
    api.detach().await.unwrap();
 | 
			
		||||
    api.wait_for_state(VeilidState::Attachment(AttachmentState::Detached))
 | 
			
		||||
    api.wait_for_update(VeilidUpdate::Attachment(AttachmentState::Detached), None)
 | 
			
		||||
        .await
 | 
			
		||||
        .unwrap();
 | 
			
		||||
    api.shutdown().await;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user