@@ -419,6 +419,11 @@ interface IAndroidNativeScriptDeviceLiveSyncService extends INativeScriptDeviceL
419419 finalizeSync ( liveSyncInfo : ILiveSyncResultInfo , projectData : IProjectData ) : Promise < IAndroidLivesyncSyncOperationResult > ;
420420}
421421
422+ interface ILiveSyncSocket extends INetSocket {
423+ uid : string ,
424+ writeAsync ( data : Buffer ) : Promise < Boolean >
425+ }
426+
422427interface IAndroidLivesyncTool {
423428 /**
424429 * The protocol version the current app(adnroid runtime) is using.
@@ -454,21 +459,19 @@ interface IAndroidLivesyncTool {
454459 * @param filePath - The full path to the file.
455460 * @returns {Promise<boolean> }
456461 */
457- removeFile ( filePath : string ) : Promise < boolean > ;
462+ removeFile ( filePath : string ) : Promise < void > ;
458463 /**
459464 * Removes files
460465 * @param filePaths - Array of files that will be removed.
461466 * @returns {Promise<boolean[]> }
462467 */
463- removeFiles ( filePaths : string [ ] ) : Promise < boolean [ ] > ;
468+ removeFiles ( filePaths : string [ ] ) : Promise < void [ ] > ;
464469 /**
465470 * 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
469472 * @returns {Promise<void> }
470473 */
471- sendDoSyncOperation ( doRefresh : boolean , timeout ?: number , operationId ?: string ) : Promise < IAndroidLivesyncSyncOperationResult > ;
474+ sendDoSyncOperation ( options ?: IDoSyncOperationOptions ) : Promise < IAndroidLivesyncSyncOperationResult > ;
472475 /**
473476 * Generates new operation identifier.
474477 */
@@ -491,6 +494,17 @@ interface IAndroidLivesyncTool {
491494 hasConnection ( ) : boolean ;
492495}
493496
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+
494508interface IAndroidLivesyncToolConfiguration {
495509 /**
496510 * The application identifier.
@@ -512,6 +526,10 @@ interface IAndroidLivesyncToolConfiguration {
512526 * If provider will call it when an error occurs.
513527 */
514528 errorHandler ?: any ;
529+ /**
530+ * Time to wait for successful connection. Defaults to 30000 miliseconds.
531+ */
532+ connectTimeout ?: number ;
515533}
516534
517535interface IAndroidLivesyncSyncOperationResult {
0 commit comments