@@ -6,49 +6,88 @@ declare module Mobile {
6
6
skipRefresh ?: boolean ;
7
7
}
8
8
9
+ interface IDeviceInfo {
10
+ identifier : string ;
11
+ displayName : string ;
12
+ model : string ;
13
+ version : string ;
14
+ vendor : string ;
15
+ platform : string ;
16
+ }
17
+
9
18
interface IDevice {
10
- getIdentifier ( ) : string ;
11
- getInstalledApplications ( ) : IFuture < string [ ] > ;
12
- getDisplayName ( ) : string ;
13
- getModel ( ) : string ;
14
- getVersion ( ) : string ;
15
- getVendor ( ) : string ;
16
- getPlatform ( ) : string ;
19
+ deviceInfo : Mobile . IDeviceInfo ;
20
+ applicationManager : Mobile . IDeviceApplicationManager ;
21
+ fileSystem : Mobile . IDeviceFileSystem ;
17
22
deploy ( packageFile : string , packageName : string ) : IFuture < void > ;
18
- sync ( localToDevicePaths : ILocalToDevicePathData [ ] , appIdentifier : IAppIdentifier , liveSyncUrl : string ) : IFuture < void > ;
19
- sync ( localToDevicePaths : ILocalToDevicePathData [ ] , appIdentifier : IAppIdentifier , liveSyncUrl : string , options : ISyncOptions ) : IFuture < void > ;
20
23
openDeviceLogStream ( ) : void ;
21
- runApplication ( applicationId : string ) : IFuture < void > ;
22
- uninstallApplication ( applicationId : string ) : IFuture < void > ;
23
- listFiles ( devicePath : string ) : IFuture < void > ;
24
- getFile ( deviceFilePath : string ) : IFuture < void > ;
25
- putFile ( localFilePath : string , deviceFilePath : string ) : IFuture < void > ;
26
24
}
27
-
28
- interface IAppIdentifier {
29
- appIdentifier : string ;
30
- deviceProjectPath : string ;
31
- liveSyncFormat : string ;
32
- encodeLiveSyncHostUri ( hostUri : string ) : string ;
33
- isLiveSyncSupported ( device : any ) : IFuture < boolean > ;
34
- getLiveSyncNotSupportedError ( device : any ) : string ;
35
- }
36
-
25
+
37
26
interface IAndroidDevice extends IDevice {
38
- debug ( packageFile : string , packageName : string , debuggerSetup ?: any ) : IFuture < void > ;
27
+ adb : Mobile . IAndroidDebugBridge ;
39
28
}
40
29
41
- interface IIOSDevice extends IDevice {
30
+ interface IiOSDevice extends IDevice {
42
31
startService ( serviceName : string ) : number ;
32
+ mountImage ( ) : IFuture < void > ;
33
+ tryExecuteFunction < TResult > ( func : ( ) => TResult ) : TResult ;
34
+ }
35
+
36
+ interface IDeviceAppData {
37
+ appIdentifier : string ;
38
+ deviceProjectRootPath : string ;
39
+ isLiveSyncSupported ( device : Mobile . IDevice ) : IFuture < boolean > ;
40
+ }
41
+
42
+ interface IDeviceAppDataFactory {
43
+ create ( appIdentifier : string , platform : string ) : Mobile . IDeviceAppData ;
44
+ }
45
+
46
+ interface IDeviceAppDataFactoryRule {
47
+ vanilla : any ;
48
+ companion ?: any ;
49
+ }
50
+
51
+ interface IDeviceAppDataProvider {
52
+ createFactoryRules ( ) : IDictionary < Mobile . IDeviceAppDataFactoryRule > ;
53
+ }
54
+
55
+ interface IAndroidLiveSyncService {
56
+ liveSyncCommands : any ;
57
+ livesync ( appIdentifier : string , liveSyncRoot : string , commands : string [ ] ) : IFuture < void > ;
58
+ createCommandsFileOnDevice ( commandsFileDevicePath : string , commands : string [ ] ) : IFuture < void > ;
43
59
}
44
60
45
61
interface ILogcatHelper {
46
- start ( deviceIdentifier : string , adbPath : string ) : any ;
62
+ start ( deviceIdentifier : string ) : any ;
47
63
}
48
64
49
65
interface ILogcatPrinter {
50
66
print ( line : string ) : void ;
51
67
}
68
+
69
+ interface IDeviceApplicationManager {
70
+ getInstalledApplications ( ) : IFuture < string [ ] > ;
71
+ installApplication ( packageFilePath : string ) : IFuture < void > ;
72
+ uninstallApplication ( appIdentifier : string ) : IFuture < void > ;
73
+ startApplication ( appIdentifier : string ) : IFuture < void > ;
74
+ stopApplication ( appIdentifier : string ) : IFuture < void > ;
75
+ restartApplication ( applicationId : string ) : IFuture < void > ;
76
+ }
77
+
78
+ interface IDeviceFileSystem {
79
+ listFiles ( devicePath : string ) : IFuture < void > ;
80
+ getFile ( deviceFilePath : string ) : IFuture < void > ;
81
+ putFile ( localFilePath : string , deviceFilePath : string ) : IFuture < void > ;
82
+ transferFiles ( appIdentifier : string , localToDevicePaths : Mobile . ILocalToDevicePathData [ ] ) : IFuture < void > ;
83
+ transferFile ?( localFilePath : string , deviceFilePath : string ) : IFuture < void > ;
84
+ }
85
+
86
+ interface IAndroidDebugBridge {
87
+ executeCommand ( ...args : string [ ] ) : IFuture < any > ;
88
+ executeShellCommand ( ...args : string [ ] ) : IFuture < any > ;
89
+ sendBroadcastToDevice ( action : string , extras ?: IStringDictionary ) : IFuture < number > ;
90
+ }
52
91
53
92
interface IDebugOnDeviceSetup {
54
93
frontEndPath ?: string ;
@@ -144,6 +183,7 @@ declare module Mobile {
144
183
afcConnectionOpen ( service : number , timeout : number , afcConnection : NodeBuffer ) : number ;
145
184
afcConnectionClose ( afcConnection : NodeBuffer ) : number ;
146
185
afcDirectoryCreate ( afcConnection : NodeBuffer , path : string ) : number ;
186
+ afcFileInfoOpen ( afcConnection : NodeBuffer , path : string , afcDirectory : NodeBuffer ) : number ;
147
187
afcFileRefOpen ( afcConnection : NodeBuffer , path : string , mode : number , afcFileRef : NodeBuffer ) : number ;
148
188
afcFileRefClose ( afcConnection : NodeBuffer , afcFileRef : number ) : number ;
149
189
afcFileRefWrite ( afcConnection : NodeBuffer , afcFileRef : number , buffer : NodeBuffer , byteLength : number ) : number ;
@@ -172,7 +212,6 @@ declare module Mobile {
172
212
interface IAfcClient {
173
213
open ( path : string , mode : string ) : Mobile . IAfcFile ;
174
214
transfer ( localFilePath : string , devicePath : string ) : IFuture < void > ;
175
- transferCollection ( localToDevicePaths : Mobile . ILocalToDevicePathData [ ] ) : IFuture < void > ;
176
215
deleteFile ( devicePath : string ) : void ;
177
216
mkdir ( path : string ) : void ;
178
217
listDir ( path : string ) : string [ ] ;
@@ -189,6 +228,10 @@ declare module Mobile {
189
228
getDevicePath ( ) : string ;
190
229
getRelativeToProjectBasePath ( ) : string ;
191
230
}
231
+
232
+ interface ILocalToDevicePathDataFactory {
233
+ create ( fileName : string , localProjectRootPath : string , onDeviceFileName : string , deviceProjectRootPath : string ) : Mobile . ILocalToDevicePathData ;
234
+ }
192
235
193
236
interface IiOSSocketResponseData {
194
237
Status ?: string ;
@@ -209,7 +252,8 @@ declare module Mobile {
209
252
}
210
253
211
254
interface IGDBServer {
212
- run ( argv : string [ ] ) : void ;
255
+ run ( argv : string [ ] ) : IFuture < void > ;
256
+ kill ( bundleExecutableName : string ) : IFuture < void > ;
213
257
}
214
258
215
259
interface INotificationProxyClient {
@@ -271,12 +315,18 @@ declare module Mobile {
271
315
isPlatformSupported ( platform : string ) : boolean ;
272
316
validatePlatformName ( platform : string ) : string ;
273
317
getPlatformCapabilities ( platform : string ) : Mobile . IPlatformCapabilities ;
274
- generateLocalToDevicePathData ( localPath : string , devicePath : string , relativeToProjectBasePath : string ) : Mobile . ILocalToDevicePathData ;
318
+ buildDevicePath ( ...args : string [ ] ) : string ;
319
+ correctDevicePath ( filePath : string ) : string ;
275
320
}
276
321
277
322
interface IDevicePlatformsConstants {
278
323
iOS : string ;
279
324
Android : string ;
280
325
WP8 : string ;
281
326
}
327
+
328
+ interface IDeviceApplication {
329
+ CFBundleExecutable : string ;
330
+ Path : string ;
331
+ }
282
332
}
0 commit comments