namespace java nttr.rtk.thrift typedef i64 Timestamp typedef string DeviceId /** * Mobile OS Type. */ enum OsType { ANDROID = 1; IOS = 2; } /** * Summary information of Android and iOS device. */ struct Device { /** Device's id */ 1:DeviceId deviceId; /** Device product name */ 2:string productName; /** OS type */ 3:OsType osType; /** OS version */ 4:string osVersion; /** Device release date */ 5:Timestamp releaseDay; /** Display width (pixels) */ 6:i32 displayWidth; /** Display height (pixels) */ 7:i32 displayHeight; /** Telecommunications carrier */ 8:string carrier; /** Manufacturer */ 9:string manufacturer; /** Processor name */ 10:string processor; /** GPU name */ 11:string gpu; /** RAM size */ 12:string ram; /** ROM size */ 13:string rom; 14:i32 pointsPerUnit; 15:bool isSoundInputAvailable; 16:bool isSoundOutputAvailable; } /** * GPS information. */ struct GpsLocation { 1: double latitude; 2: double longitude; } /** * Detail information of Android and iOS Device. */ struct DeviceStatus { /** Device information */ 1: Device device; /** Runtime WiFi state */ 2: bool wifiEnabled; /** Runtime ADB state */ 3: bool adbEnabled; /** Support state of dummy GPS feature. */ 4: bool dummyGpsSupported; } /** * Type of screen capture size. */ enum CaptureSizeType { /** Set ratio of device screen size. */ RATIO = 1; /** Set length of screen shot's longer side with pixel. The screen shot will be reduced automatically keeping width/height ratio. */ MAX_LENGTH = 2; } /** * Image file type */ enum ImageFileType { JPEG = 1; } /** * Movie file type */ enum MovieFileType { MOTION_JPEG = 1; } /** * Sound file type */ enum SoundFileType { WAVE = 1; } /** * Capture screen shot's type. * Default capture size is a half of actual size. * ratioCaptureSize setting takes precedence over maxLengthCaptureSize. */ struct ScreenShotType { /** File name to save. Extension will be added automatically. */ 1: string fileBaseName; /** Screen shot will be saved to this directory. */ 2: string dirPath; /** Screen shot file type */ 3: optional ImageFileType fileType; /** Ratio of image size to actual size. Default value is 0.5. */ 4: optional double ratioCaptureSize /** Longer side's size of image (pixels). */ 5: optional i32 pixelCaptureSize /** Screen shot will include device window if true, or display will be captured if false. */ 6: optional bool includeDeviceWindow } /** * Captured screen shot's information */ struct ScreenShotResult { /** File name with extension. */ 1: string fileName; /** Absolute file path. */ 2: string filePath; /** Image file's width (pixels) */ 3: i32 width; /** Image file's height (pixels) */ 4: i32 height; } /** * Recording movie's type. */ struct RecordingType { /** File name to save. Extension will be added automatically. */ 1: string fileBaseName; /** Movie will be saved to this directory. */ 2: string dirPath; /** Movie file type */ 3: optional MovieFileType fileType; /** Ratio of movie size to actual size. Default value is 0.5. */ 4: optional double ratioCaptureSize /** Longer side's size of movie (pixels). */ 5: optional i32 pixelCaptureSize /** Movie will include device window if true, or display will be captured if false. */ 6: optional bool includeDeviceWindow /** Movie will include pointer if true, or exclude it if false. */ 7: optional bool includePointer } /** * Captured movie's information. */ struct RecordingResult { /** File name with extension. */ 1: string fileName; /** Absolute file path. */ 2: string filePath; /** Movie file's width (pixels) */ 3: i32 width; /** Movie file's heigth (pixels) */ 4: i32 height; } /** * Sound codec for transmission. */ enum SoundCodec { PCM = 0; SPEEX = 1; } /** * Sound format. */ struct SoundFormat { /** Sound codec. */ 1: SoundCodec soundCodec; /** Sample rate. */ 2: i32 sampleRate; } /** * Recording sound's type. */ struct SoundRecordingType { /** File name to save. Extension will be added automatically. */ 1: string fileBaseName; /** Sound will be saved to this directory. */ 2: string dirPath; /** Sound file type */ 3: optional SoundFileType fileType; } /** * Recorded sound's information. */ struct SoundRecordingResult { /** File name with extension. */ 1: string fileName; /** Absolute file path. */ 2: string filePath; } /** * Virtual adb shell information. */ struct AdbResult { /** Device's serial number */ 1: string deviceSerialNumber } /** * Locale information. * This is based upon java.util.Locale . */ struct LocaleInfo { /** ISO 639 alpha-2 or alpha-3 language code. */ 1: string language; /** ISO 3166 alpha-2 country code or UN M.49 numeric-3 region code. */ 2: optional string country; /** Same with java.util.Locale's variant */ 3: optional string variant; } /** * Virtual usbmuxd authentication type */ enum XcodeConnectorAuthType { PASSWORD = 1; SUDO = 2; } /** * Xcode connector information. */ struct XcodeConnectorOption { /** authentication type **/ 1: XcodeConnectorAuthType authType; /** optional osxPassword **/ 2: optional string osxPassword; /** download Symbol File For Xcode **/ 3: optional bool skipDownloadSymbolFile; } /** * Xcode connector information. */ struct XcodeConnectorResult { /** iOS Device's UDID */ 1: string udid } /** * Options for capturing web pages */ struct WebPagesOptions { /** prefer using chrome **/ 1:optional bool isChromePreferred; } /** * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
INTERNALNOT_IMPLEMENTEDIODEVICE_ILLEGAL_STATEDEVICE_NOT_FOUNDDEVICE_OPERATION_FAILEDILLEGAL_ARGUMENTAUTHENTICATION_FAILED
MainServiceloginYESYESYESYES
logoutYESYESYES
getDevicesYESYESYES
setMaxRentalMinutesYESYESYES
DeviceServiceopenYESYESYESYESYES
closeYESYESYESYES
getStatusYESYESYESYESYES
installAndLaunchYESYESYESYESYES
captureScreenShotYESYESYESYESYES
startRecordingYESYESYESYESYES
stopRecordingYESYESYESYESYES
setDummyGpsLocationYESYESYESYESYES
rotateToLandscapeYESYESYESYESYES
rotateToPortlaitYESYESYESYESYES
enableAdbYESYESYESYESYES
disableAdbYESYESYESYESYES
setLocaleYESYESYESYESYES
enableWifiYESYESYESYESYES
disableWifiYESYESYESYESYES
enableXcodeConnectorYESYESYESYESYES
disableXcodeConnectorYESYESYESYESYES
*/ enum ErrorCode { // Service level exception /** Internal exception */ INTERNAL = 101; /** API not inplemented exception */ NOT_IMPLEMENTED = 102; /** Network, Device IO */ IO = 103; // Device level exception /** Not rented, Device unavailable, so on */ DEVICE_ILLEGAL_STATE = 201; /** Device not found */ DEVICE_NOT_FOUND = 202; /** Device operatin failed */ DEVICE_OPERATION_FAILED = 203; // UserException ILLEGAL_ARGUMENT = 301; AUTHENTICATION_FAILED = 302; ILLEGAL_STATE = 303; } /** * Remote TestKit Service's exception. */ exception ServiceException { 1: required ErrorCode errorCode; 2: optional string message; } /** * Thrift API's port for each service. */ enum ServicePorts { /** MainService's port */ MAIN_SERVICE_PORT = 10048; /** DeviceService's port */ DEVICE_SERVICE_PORT = 10049; } /** * Main serice of thrift API. * This service provides account service, device list service and so on. * This service is provided with ServicePorts.MAIN_SERVICE_PORT. */ service MainService { /** * Login to RemoeteTestKit. * * @param userName login user name.
* @param password login password.
*/ void login(1:string userName, 2:string password) throws (1: ServiceException serviceException); /** * Logout from RemoteTestKit */ void logout() throws (1: ServiceException serviceException); /** * Get all deivces list. * This list includes rented devices and not rented also. * This list excludes devices which is rented by other users. * * @return All devices list exclude devices rented by other users.
*/ list getDevices() throws (1: ServiceException serviceException); /** * Set max rental time. * DeviceService will extend rental device automatically after open device until the device get closed. * This auto rental extension is limited to max rental minutes. * Default max rental minutes is 180 minutes. */ void setMaxRentalMinutes(1: i32 maxMinutes) throws (1: ServiceException serviceException); } /** * Adb capture mode. */ enum AdbCaptureMode { /** Extended size capture in medium wait time (default) */ EXTENDED_SIZE_CAPTURE_IN_MEDIUM_WAIT_TIME = 0; /** Small size capture in short wait time */ SMALL_SIZE_CAPTURE_IN_SHORT_WAIT_TIME = 1; /** Beatiful capture in long wait time */ BEATIFUL_CAPTURE_IN_LONG_WAIT_TIME = 2; } /** * Device serice of thrift API. * This service provides device controlling feature. * This service is provided with ServicePorts.DEVICE_SERVICE_PORT. */ service DeviceService { /** * Rent target device and launch. * Opened device is bind to DeviceService instance (connection). * To open multi devices, open multi DeviceService connection. * * @param deviceId target device's ID
*/ void open(1: DeviceId deviceId) throws (1: ServiceException serviceException); /** * Finish using device. * The device rental will not finish until rental time expired. */ void close() throws (1: ServiceException serviceException ); /** * Get device detail information. This information includes device summary and runtime setting information. * * @return Detail information of target device.
*/ DeviceStatus getStatus() throws (1: ServiceException serviceException); /** * Install application to target device and launch it. * * @param app The application file to install. This is apk file if Android, and ipa file if iOS.
*/ void installAndLaunch(1:binary app) throws (1: ServiceException serviceException); /** * Capture device's first view. * * @param screenShotType Screen shot's attributes to capture.
* @return Captured image file information.
*/ ScreenShotResult captureScreenShot(1:ScreenShotType screenShotType) throws (1: ServiceException serviceException); /** * Start recording movie of target device. * * @param recording type movie's attribute to record.
*/ void startRecording(1: RecordingType recordingType) throws (1: ServiceException serviceException); /** * Stop recording movie. * * @return Recorded movie file information.
*/ RecordingResult stopRecording() throws (1: ServiceException serviceException); /** * Set sound format. * * @param soundFormat sound format type.
*/ void setSoundFormat(1: SoundFormat soundFormat) throws (1: ServiceException serviceException); /** * Send sound to target device. * * @param wavFile wave format file to send.
*/ void sendSound(1: binary wavFile) throws (1: ServiceException serviceException); /** * Start recording sound of target device. * * @param soundRecordingType sound's attribute to record.
*/ void startSoundRecording(1: SoundRecordingType soundRecordingType) throws (1: ServiceException serviceException); /** * Stop recording sound. */ SoundRecordingResult stopSoundRecording() throws (1: ServiceException serviceException); /** * Set dummy gps location to target device. * * @param gpsLocation gps information to set.
*/ void setDummyGpsLocation(1: GpsLocation gpsLocation) throws (1: ServiceException serviceException); /** * Rotate device's screen to landscape style. */ void rotateToLandscape() throws (1: ServiceException serviceException); /** * Rotate device's screen to portlait style. */ void rotateToPortlait() throws (1: ServiceException serviceException); /** * Enable virtual adb shell. * * @param adbCommandFilePath File path to adb command file.
*/ AdbResult enableAdb(1:string adbCommandFilePath) throws (1: ServiceException serviceException); /** * Disable virtual adb shell. */ void disableAdb() throws (1: ServiceException serviceException); /** * Set adb capture mode. */ void setAdbCaptureMode(1:AdbCaptureMode adbCaptureMode) throws (1: ServiceException serviceException); /** * Set locale of RemoteTestKit. * * @param localeInfo locale information to set.
*/ void setLocale(1: LocaleInfo localeInfo) throws (1: ServiceException serviceException); /** * Enable device's WiFi. */ void enableWifi() throws (1: ServiceException serviceException); /** * Disable device's WiFi. */ void disableWifi() throws (1: ServiceException serviceException); /** * Capture web pages. */ void captureWebPages(1:list urls, 2:string outputDirectory) throws (1: ServiceException serviceException); /** * Return device forcibly */ void returnDeviceForcibly() throws (1: ServiceException serviceException); /** * Enable xcode connector * * @param Option
*/ XcodeConnectorResult enableXcodeConnector(1:XcodeConnectorOption xcodeConnectorOption) throws (1: ServiceException serviceException); /** * Disable xcode connector. */ void disableXcodeConnector() throws (1: ServiceException serviceException); /** * Open url by default Browser. */ void openUrl(1:string url) throws (1: ServiceException serviceException); /** * Open url by chrome Browser if possible. */ void openUrlInChromeIfPossible(1:string url) throws (1: ServiceException serviceException); /** * Capture web pages with Options */ void captureWebPagesWithOptions(1:list urls, 2:string outputDirectory, 3:WebPagesOptions options) throws (1: ServiceException serviceException); } service AllVersionMainService extends MainService { } service AllVersionDeviceService extends DeviceService { }