@@ -419,6 +419,11 @@ interface IAndroidNativeScriptDeviceLiveSyncService extends INativeScriptDeviceL
419
419
finalizeSync ( liveSyncInfo : ILiveSyncResultInfo , projectData : IProjectData ) : Promise < IAndroidLivesyncSyncOperationResult > ;
420
420
}
421
421
422
+ interface ILiveSyncSocket extends INetSocket {
423
+ uid : string ,
424
+ writeAsync ( data : Buffer ) : Promise < Boolean >
425
+ }
426
+
422
427
interface IAndroidLivesyncTool {
423
428
/**
424
429
* The protocol version the current app(adnroid runtime) is using.
@@ -454,21 +459,19 @@ interface IAndroidLivesyncTool {
454
459
* @param filePath - The full path to the file.
455
460
* @returns {Promise<boolean> }
456
461
*/
457
- removeFile ( filePath : string ) : Promise < boolean > ;
462
+ removeFile ( filePath : string ) : Promise < void > ;
458
463
/**
459
464
* Removes files
460
465
* @param filePaths - Array of files that will be removed.
461
466
* @returns {Promise<boolean[]> }
462
467
*/
463
- removeFiles ( filePaths : string [ ] ) : Promise < boolean [ ] > ;
468
+ removeFiles ( filePaths : string [ ] ) : Promise < void [ ] > ;
464
469
/**
465
470
* Sends doSyncOperation that will be handled by the runtime.
466
- * @param doRefresh - Indicates if the application should be restarted. Defaults to true.
467
- * @param operationId - The identifier of the operation
468
- * @param timeout - The timeout in milliseconds
471
+ * @param options
469
472
* @returns {Promise<void> }
470
473
*/
471
- sendDoSyncOperation ( doRefresh : boolean , timeout ?: number , operationId ?: string ) : Promise < IAndroidLivesyncSyncOperationResult > ;
474
+ sendDoSyncOperation ( options ?: IDoSyncOperationOptions ) : Promise < IAndroidLivesyncSyncOperationResult > ;
472
475
/**
473
476
* Generates new operation identifier.
474
477
*/
@@ -491,6 +494,17 @@ interface IAndroidLivesyncTool {
491
494
hasConnection ( ) : boolean ;
492
495
}
493
496
497
+ /**
498
+ * doRefresh - Indicates if the application should be refreshed. Defaults to true.
499
+ * operationId - The identifier of the operation
500
+ * timeout - The timeout in milliseconds
501
+ */
502
+ interface IDoSyncOperationOptions {
503
+ doRefresh ?: boolean ,
504
+ timeout ?: number ,
505
+ operationId ?: string
506
+ }
507
+
494
508
interface IAndroidLivesyncToolConfiguration {
495
509
/**
496
510
* The application identifier.
@@ -512,6 +526,10 @@ interface IAndroidLivesyncToolConfiguration {
512
526
* If provider will call it when an error occurs.
513
527
*/
514
528
errorHandler ?: any ;
529
+ /**
530
+ * Time to wait for successful connection. Defaults to 30000 miliseconds.
531
+ */
532
+ connectTimeout ?: number ;
515
533
}
516
534
517
535
interface IAndroidLivesyncSyncOperationResult {
0 commit comments