|
| 1 | +///<reference path="../../.d.ts"/> |
| 2 | + |
| 3 | +declare module Mobile { |
| 4 | + |
| 5 | + interface ISyncOptions { |
| 6 | + skipRefresh?: boolean; |
| 7 | + } |
| 8 | + |
| 9 | + interface IDevice { |
| 10 | + getIdentifier(): string; |
| 11 | + getInstalledApplications(): IFuture<string[]>; |
| 12 | + getDisplayName(): string; |
| 13 | + getModel(): string; |
| 14 | + getVersion(): string; |
| 15 | + getVendor(): string; |
| 16 | + getPlatform(): string; |
| 17 | + deploy(packageFile: string, packageName: string): IFuture<void>; |
| 18 | + sync(localToDevicePaths: ILocalToDevicePathData[], appIdentifier: IAppIdentifier, projectType: number): IFuture<void>; |
| 19 | + sync(localToDevicePaths: ILocalToDevicePathData[], appIdentifier: IAppIdentifier, projectType: number, options: ISyncOptions): IFuture<void>; |
| 20 | + openDeviceLogStream(): void; |
| 21 | + } |
| 22 | + |
| 23 | + interface IAppIdentifier { |
| 24 | + appIdentifier: string; |
| 25 | + deviceProjectPath: string; |
| 26 | + liveSyncFormat: string; |
| 27 | + isLiveSyncSupported(device: any): IFuture<boolean>; |
| 28 | + getliveSyncNotSupportedError(device: any): string; |
| 29 | + } |
| 30 | + |
| 31 | + interface IIOSDevice extends IDevice { |
| 32 | + startService(serviceName: string): number; |
| 33 | + } |
| 34 | + |
| 35 | + interface IDeviceDiscovery { |
| 36 | + deviceFound: ISignal; |
| 37 | + deviceLost: ISignal; |
| 38 | + startLookingForDevices(): IFuture<void>; |
| 39 | + } |
| 40 | + |
| 41 | + interface IDevicesServicesInitializationOptions { |
| 42 | + skipInferPlatform?: boolean; |
| 43 | + } |
| 44 | + |
| 45 | + interface IDevicesServices { |
| 46 | + hasDevices: boolean; |
| 47 | + deviceCount: number; |
| 48 | + execute(action: (device: Mobile.IDevice) => IFuture<void>, canExecute?: (dev: Mobile.IDevice) => boolean, options?: {allowNoDevices?: boolean}): IFuture<void>; |
| 49 | + initialize(platform: string, deviceOption?: string, options?: IDevicesServicesInitializationOptions): IFuture<void>; |
| 50 | + platform: string; |
| 51 | + } |
| 52 | + |
| 53 | + interface IiOSCore { |
| 54 | + getCoreFoundationLibrary(): any; |
| 55 | + getMobileDeviceLibrary(): any; |
| 56 | + } |
| 57 | + |
| 58 | + interface ICoreFoundation { |
| 59 | + runLoopRun(): void; |
| 60 | + runLoopGetCurrent(): any; |
| 61 | + stringCreateWithCString(alloc: NodeBuffer, str: string, encoding: number): NodeBuffer; |
| 62 | + dictionaryGetValue(theDict: NodeBuffer, value: NodeBuffer): NodeBuffer; |
| 63 | + numberGetValue(number: NodeBuffer, theType: number, valuePtr: NodeBuffer): boolean; |
| 64 | + kCFRunLoopCommonModes(): NodeBuffer; |
| 65 | + kCFRunLoopDefaultMode(): NodeBuffer; |
| 66 | + kCFTypeDictionaryKeyCallBacks(): NodeBuffer; |
| 67 | + kCFTypeDictionaryValueCallBacks(): NodeBuffer; |
| 68 | + runLoopTimerCreate(allocator: NodeBuffer, fireDate: number, interval: number, flags: number, order: number, callout: NodeBuffer, context: any): NodeBuffer; |
| 69 | + absoluteTimeGetCurrent(): number; |
| 70 | + runLoopAddTimer(r1: NodeBuffer, timer: NodeBuffer, mode: NodeBuffer): void; |
| 71 | + runLoopRemoveTimer(r1: NodeBuffer, timer: NodeBuffer, mode: NodeBuffer): void; |
| 72 | + runLoopStop(r1: any): void; |
| 73 | + convertCFStringToCString(cfstr: NodeBuffer): string; |
| 74 | + dictionaryCreate(allocator: NodeBuffer, keys: NodeBuffer, values: NodeBuffer, count: number, dictionaryKeyCallbacks: NodeBuffer, dictionaryValueCallbacks: NodeBuffer): NodeBuffer; |
| 75 | + getTypeID(type: NodeBuffer): number; |
| 76 | + stringGetCString(theString: NodeBuffer, buffer: NodeBuffer, bufferSize: number, encoding: number): boolean; |
| 77 | + stringGetLength(theString: NodeBuffer): number; |
| 78 | + dictionaryGetCount(theDict: NodeBuffer): number; |
| 79 | + createCFString(str: string): NodeBuffer; |
| 80 | + dictToPlistEncoding(dict: {[key: string]: {}}, format: number): NodeBuffer; |
| 81 | + dictFromPlistEncoding(str: NodeBuffer): NodeBuffer; |
| 82 | + dictionaryGetTypeID(): number; |
| 83 | + stringGetTypeID(): number; |
| 84 | + dataGetTypeID(): number; |
| 85 | + numberGetTypeID(): number; |
| 86 | + booleanGetTypeID(): number; |
| 87 | + arrayGetTypeID(): number; |
| 88 | + dateGetTypeID(): number; |
| 89 | + setGetTypeID(): number; |
| 90 | + dictionaryGetKeysAndValues(dictionary: NodeBuffer, keys: NodeBuffer, values: NodeBuffer): void; |
| 91 | + } |
| 92 | + |
| 93 | + interface IMobileDevice { |
| 94 | + deviceNotificationSubscribe(notificationCallback: NodeBuffer, p1: number, p2: number, context: any, callbackSignature: NodeBuffer): number; |
| 95 | + deviceCopyDeviceIdentifier(devicePointer: NodeBuffer): NodeBuffer; |
| 96 | + deviceCopyValue(devicePointer: NodeBuffer, domain: NodeBuffer, name: NodeBuffer): NodeBuffer; |
| 97 | + deviceConnect(devicePointer: NodeBuffer): number; |
| 98 | + deviceIsPaired(devicePointer: NodeBuffer): number; |
| 99 | + devicePair(devicePointer: NodeBuffer): number; |
| 100 | + deviceValidatePairing(devicePointer: NodeBuffer): number; |
| 101 | + deviceStartSession(devicePointer: NodeBuffer): number; |
| 102 | + deviceStopSession(devicePointer: NodeBuffer): number; |
| 103 | + deviceDisconnect(devicePointer: NodeBuffer): number; |
| 104 | + deviceStartService(devicePointer: NodeBuffer, serviceName: NodeBuffer, socketNumber: NodeBuffer): number; |
| 105 | + deviceTransferApplication(service: number, packageFile: NodeBuffer, options: NodeBuffer, installationCallback: NodeBuffer): number; |
| 106 | + deviceInstallApplication(service: number, packageFile: NodeBuffer, options: NodeBuffer, installationCallback: NodeBuffer): number; |
| 107 | + afcConnectionOpen(service: number, timeout: number, afcConnection: NodeBuffer): number; |
| 108 | + afcConnectionClose(afcConnection: NodeBuffer): number; |
| 109 | + afcDirectoryCreate(afcConnection: NodeBuffer, path: string): number; |
| 110 | + afcFileRefOpen(afcConnection: NodeBuffer, path: string, mode: number, afcFileRef: NodeBuffer): number; |
| 111 | + afcFileRefClose(afcConnection: NodeBuffer, afcFileRef: number): number; |
| 112 | + afcFileRefWrite(afcConnection: NodeBuffer, afcFileRef: number, buffer: NodeBuffer, byteLength: number): number; |
| 113 | + afcFileRefRead(afcConnection: NodeBuffer, afcFileRef: number, buffer: NodeBuffer, byteLength: number): number; |
| 114 | + afcRemovePath(afcConnection: NodeBuffer, path: string): number; |
| 115 | + afcDirectoryOpen(afcConnection: NodeBuffer, path: string, afcDirectory: NodeBuffer): number; |
| 116 | + afcDirectoryRead(afcConnection: NodeBuffer, afcdirectory: NodeBuffer, name: NodeBuffer): number; |
| 117 | + afcDirectoryClose(afcConnection: NodeBuffer, afcdirectory: NodeBuffer): number; |
| 118 | + isDataReceivingCompleted(reply: string): boolean; |
| 119 | + } |
| 120 | + |
| 121 | + interface IHouseArrestClient { |
| 122 | + getAfcClientForAppDocuments(applicationIdentifier: string): Mobile.IAfcClient; |
| 123 | + getAfcClientForAppContainer(applicationIdentifier: string): Mobile.IAfcClient; |
| 124 | + closeSocket(): void; |
| 125 | + } |
| 126 | + |
| 127 | + interface IAfcClient { |
| 128 | + transferCollection(localToDevicePaths: Mobile.ILocalToDevicePathData[]): IFuture<void>; |
| 129 | + deleteFile(devicePath: string): void; |
| 130 | + } |
| 131 | + |
| 132 | + interface ILocalToDevicePathData { |
| 133 | + getLocalPath(): string; |
| 134 | + getDevicePath(): string; |
| 135 | + getRelativeToProjectBasePath(): string; |
| 136 | + } |
| 137 | + |
| 138 | + interface IiOSDeviceSocket { |
| 139 | + receiveMessage(): IFuture<void>; |
| 140 | + readSystemLog(action: (data: NodeBuffer) => void): void; |
| 141 | + sendMessage(message: {[key: string]: {}}, format?: number): void; |
| 142 | + close(): void; |
| 143 | + } |
| 144 | + |
| 145 | + interface IPlatformCapabilities { |
| 146 | + wirelessDeploy: boolean; |
| 147 | + cableDeploy: boolean; |
| 148 | + companion: boolean; |
| 149 | + publishTelerikAppManager: boolean; |
| 150 | + hostPlatformsForDeploy: string[]; |
| 151 | + } |
| 152 | +} |
0 commit comments