theta-client-react-native 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +282 -7
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +113 -85
- package/ios/ThetaClientReactNative.mm +552 -48
- package/ios/ThetaClientReactNative.xcodeproj/project.pbxproj +2 -2
- package/lib/commonjs/capture/time-shift-capture.js +44 -0
- package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
- package/lib/commonjs/theta-repository/options/index.js +96 -8
- package/lib/commonjs/theta-repository/options/index.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-ai-auto-thumbnail.js +17 -0
- package/lib/commonjs/theta-repository/options/option-ai-auto-thumbnail.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-bitrate.js +64 -0
- package/lib/commonjs/theta-repository/options/option-bitrate.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-burst-mode.js +23 -0
- package/lib/commonjs/theta-repository/options/option-burst-mode.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-burst-option.js +140 -0
- package/lib/commonjs/theta-repository/options/option-burst-option.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-capture-mode.js +30 -0
- package/lib/commonjs/theta-repository/options/option-capture-mode.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-continuous-number.js +71 -0
- package/lib/commonjs/theta-repository/options/option-continuous-number.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-filter.js +32 -0
- package/lib/commonjs/theta-repository/options/option-filter.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-preset.js +26 -0
- package/lib/commonjs/theta-repository/options/option-preset.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-preview-format.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-shooting-method.js +1 -1
- package/lib/commonjs/theta-repository/options/option-shooting-method.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-time-shift.js.map +1 -1
- package/lib/commonjs/theta-repository/options/options.js +22 -24
- package/lib/commonjs/theta-repository/options/options.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-files.js +21 -1
- package/lib/commonjs/theta-repository/theta-files.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-info.js +29 -0
- package/lib/commonjs/theta-repository/theta-info.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-repository.js +17 -0
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
- package/lib/module/capture/time-shift-capture.js +44 -0
- package/lib/module/capture/time-shift-capture.js.map +1 -1
- package/lib/module/theta-repository/options/index.js +9 -1
- package/lib/module/theta-repository/options/index.js.map +1 -1
- package/lib/module/theta-repository/options/option-ai-auto-thumbnail.js +10 -0
- package/lib/module/theta-repository/options/option-ai-auto-thumbnail.js.map +1 -0
- package/lib/module/theta-repository/options/option-bitrate.js +57 -0
- package/lib/module/theta-repository/options/option-bitrate.js.map +1 -0
- package/lib/module/theta-repository/options/option-burst-mode.js +16 -0
- package/lib/module/theta-repository/options/option-burst-mode.js.map +1 -0
- package/lib/module/theta-repository/options/option-burst-option.js +133 -0
- package/lib/module/theta-repository/options/option-burst-option.js.map +1 -0
- package/lib/module/theta-repository/options/option-capture-mode.js +23 -0
- package/lib/module/theta-repository/options/option-capture-mode.js.map +1 -0
- package/lib/module/theta-repository/options/option-continuous-number.js +64 -0
- package/lib/module/theta-repository/options/option-continuous-number.js.map +1 -0
- package/lib/module/theta-repository/options/option-filter.js +25 -0
- package/lib/module/theta-repository/options/option-filter.js.map +1 -0
- package/lib/module/theta-repository/options/option-preset.js +19 -0
- package/lib/module/theta-repository/options/option-preset.js.map +1 -0
- package/lib/module/theta-repository/options/option-preview-format.js.map +1 -1
- package/lib/module/theta-repository/options/option-shooting-method.js +1 -1
- package/lib/module/theta-repository/options/option-shooting-method.js.map +1 -1
- package/lib/module/theta-repository/options/option-time-shift.js.map +1 -1
- package/lib/module/theta-repository/options/options.js +20 -22
- package/lib/module/theta-repository/options/options.js.map +1 -1
- package/lib/module/theta-repository/theta-files.js +20 -0
- package/lib/module/theta-repository/theta-files.js.map +1 -1
- package/lib/module/theta-repository/theta-info.js +22 -0
- package/lib/module/theta-repository/theta-info.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +16 -0
- package/lib/module/theta-repository/theta-repository.js.map +1 -1
- package/lib/typescript/capture/capture.d.ts +1 -1
- package/lib/typescript/capture/capture.d.ts.map +1 -1
- package/lib/typescript/capture/time-shift-capture.d.ts +20 -0
- package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/index.d.ts +9 -1
- package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-ai-auto-thumbnail.d.ts +10 -0
- package/lib/typescript/theta-repository/options/option-ai-auto-thumbnail.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-bitrate.d.ts +57 -0
- package/lib/typescript/theta-repository/options/option-bitrate.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-burst-mode.d.ts +16 -0
- package/lib/typescript/theta-repository/options/option-burst-mode.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-burst-option.d.ts +153 -0
- package/lib/typescript/theta-repository/options/option-burst-option.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-capture-mode.d.ts +23 -0
- package/lib/typescript/theta-repository/options/option-capture-mode.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-continuous-number.d.ts +64 -0
- package/lib/typescript/theta-repository/options/option-continuous-number.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-filter.d.ts +25 -0
- package/lib/typescript/theta-repository/options/option-filter.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-power-saving.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-preset.d.ts +18 -0
- package/lib/typescript/theta-repository/options/option-preset.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-preview-format.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-shooting-method.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-time-shift.d.ts +1 -1
- package/lib/typescript/theta-repository/options/option-time-shift.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/options.d.ts +114 -35
- package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-files.d.ts +54 -2
- package/lib/typescript/theta-repository/theta-files.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-info.d.ts +21 -0
- package/lib/typescript/theta-repository/theta-info.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts +8 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-state.d.ts +5 -5
- package/lib/typescript/theta-repository/theta-state.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/capture/capture.ts +1 -1
- package/src/capture/time-shift-capture.ts +46 -0
- package/src/theta-repository/options/index.ts +9 -2
- package/src/theta-repository/options/option-ai-auto-thumbnail.ts +11 -0
- package/src/theta-repository/options/option-bitrate.ts +59 -0
- package/src/theta-repository/options/option-burst-mode.ts +16 -0
- package/src/theta-repository/options/option-burst-option.ts +175 -0
- package/src/theta-repository/options/option-capture-mode.ts +24 -0
- package/src/theta-repository/options/option-continuous-number.ts +65 -0
- package/src/theta-repository/options/option-filter.ts +25 -0
- package/src/theta-repository/options/option-power-saving.ts +1 -1
- package/src/theta-repository/options/option-preset.ts +19 -0
- package/src/theta-repository/options/option-preview-format.ts +22 -23
- package/src/theta-repository/options/option-shooting-method.ts +24 -25
- package/src/theta-repository/options/option-time-shift.ts +47 -47
- package/src/theta-repository/options/options.ts +115 -41
- package/src/theta-repository/theta-files.ts +60 -3
- package/src/theta-repository/theta-info.ts +23 -0
- package/src/theta-repository/theta-repository.ts +19 -1
- package/src/theta-repository/theta-state.ts +5 -5
- package/theta-client-react-native.podspec +1 -1
|
@@ -107,6 +107,20 @@ class ThetaClientReactNativeModule(
|
|
|
107
107
|
promise.resolve(theta != null)
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
/**
|
|
111
|
+
* getThetaModel - Returns the connected THETA model
|
|
112
|
+
* @param promise promise to set result
|
|
113
|
+
*/
|
|
114
|
+
@ReactMethod
|
|
115
|
+
fun getThetaModel(promise: Promise) {
|
|
116
|
+
val theta = theta
|
|
117
|
+
if (theta == null) {
|
|
118
|
+
promise.reject(Exception(messageNotInit))
|
|
119
|
+
return
|
|
120
|
+
}
|
|
121
|
+
promise.resolve(theta.cameraModel?.name)
|
|
122
|
+
}
|
|
123
|
+
|
|
110
124
|
/**
|
|
111
125
|
* getThetaInfo - retrieve ThetaInfo from THETA via repository
|
|
112
126
|
* @param promise promise to set result
|
|
@@ -142,6 +156,9 @@ class ThetaClientReactNativeModule(
|
|
|
142
156
|
ep.putInt("httpUpdatesPort", info.endpoints.httpUpdatesPort)
|
|
143
157
|
result.putMap("endpoints", ep)
|
|
144
158
|
result.putArray("apiLevel", Arguments.fromList(info.apiLevel))
|
|
159
|
+
theta.cameraModel?.let {
|
|
160
|
+
result.putString("thetaModel", it.name)
|
|
161
|
+
}
|
|
145
162
|
promise.resolve(result)
|
|
146
163
|
} catch (t: Throwable) {
|
|
147
164
|
promise.reject(t)
|
|
@@ -230,23 +247,14 @@ class ThetaClientReactNativeModule(
|
|
|
230
247
|
entryCount,
|
|
231
248
|
storage?.let { ThetaRepository.StorageEnum.valueOf(it) },
|
|
232
249
|
)
|
|
233
|
-
val
|
|
250
|
+
val resultList = Arguments.createArray()
|
|
234
251
|
fileList.forEach {
|
|
235
|
-
|
|
236
|
-
result.putString("name", it.name)
|
|
237
|
-
result.putDouble("size", it.size.toDouble())
|
|
238
|
-
result.putString("dateTime", it.dateTime)
|
|
239
|
-
result.putString("thumbnailUrl", it.thumbnailUrl)
|
|
240
|
-
result.putString("fileUrl", it.fileUrl)
|
|
241
|
-
it.storageID?.run {
|
|
242
|
-
result.putString("storageID", this)
|
|
243
|
-
}
|
|
244
|
-
resultlist.pushMap(result)
|
|
252
|
+
resultList.pushMap(fileInfoFromTheta(it))
|
|
245
253
|
}
|
|
246
|
-
val
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
promise.resolve(
|
|
254
|
+
val resultMap = Arguments.createMap()
|
|
255
|
+
resultMap.putArray("fileList", resultList)
|
|
256
|
+
resultMap.putInt("totalEntries", totalEntries)
|
|
257
|
+
promise.resolve(resultMap)
|
|
250
258
|
} catch (t: Throwable) {
|
|
251
259
|
promise.reject(t)
|
|
252
260
|
}
|
|
@@ -344,12 +352,21 @@ class ThetaClientReactNativeModule(
|
|
|
344
352
|
|
|
345
353
|
/** option converter */
|
|
346
354
|
private val converters = mapOf(
|
|
355
|
+
"aiAutoThumbnail" to AiAutoThumbnailConverter(),
|
|
347
356
|
"aperture" to ApertureConverter(),
|
|
357
|
+
"bitrate" to BitrateConverter(),
|
|
348
358
|
"bluetoothPower" to BluetoothPowerConverter(),
|
|
359
|
+
"burstMode" to BurstModeConverter(),
|
|
360
|
+
"burstOption" to BurstOptionConverter(),
|
|
349
361
|
"cameraControlSource" to CameraControlSourceConverter(),
|
|
350
362
|
"cameraMode" to CameraModeConverter(),
|
|
363
|
+
"captureInterval" to CaptureIntervalConverter(),
|
|
351
364
|
"captureMode" to CaptureModeConverter(),
|
|
365
|
+
"captureNumber" to CaptureNumberConverter(),
|
|
352
366
|
"colorTemperature" to ColorTemperatureConverter(),
|
|
367
|
+
"compositeShootingOutputInterval" to CompositeShootingOutputIntervalConverter(),
|
|
368
|
+
"compositeShootingTime" to CompositeShootingTimeConverter(),
|
|
369
|
+
"continuousNumber" to ContinuousNumberConverter(),
|
|
353
370
|
"dateTimeZone" to DateTimeZoneConverter(),
|
|
354
371
|
"exposureCompensation" to ExposureCompensationConverter(),
|
|
355
372
|
"exposureDelay" to ExposureDelayConverter(),
|
|
@@ -366,6 +383,7 @@ class ThetaClientReactNativeModule(
|
|
|
366
383
|
"offDelay" to OffDelayConverter(),
|
|
367
384
|
"password" to PasswordConverter(),
|
|
368
385
|
"powerSaving" to PowerSavingConverter(),
|
|
386
|
+
"preset" to PresetConverter(),
|
|
369
387
|
"previewFormat" to PreviewFormatConverter(),
|
|
370
388
|
"proxy" to ProxyConverter(),
|
|
371
389
|
"remainingPictures" to RemainingPicturesConverter(),
|
|
@@ -386,12 +404,21 @@ class ThetaClientReactNativeModule(
|
|
|
386
404
|
|
|
387
405
|
/** OptionNameEnum to option */
|
|
388
406
|
private val optionEnumToOption = mapOf(
|
|
407
|
+
"AiAutoThumbnail" to "aiAutoThumbnail",
|
|
389
408
|
"Aperture" to "aperture",
|
|
409
|
+
"Bitrate" to "bitrate",
|
|
390
410
|
"BluetoothPower" to "bluetoothPower",
|
|
411
|
+
"BurstMode" to "burstMode",
|
|
412
|
+
"BurstOption" to "burstOption",
|
|
391
413
|
"CameraControlSource" to "cameraControlSource",
|
|
392
414
|
"CameraMode" to "cameraMode",
|
|
415
|
+
"CaptureInterval" to "captureInterval",
|
|
393
416
|
"CaptureMode" to "captureMode",
|
|
417
|
+
"CaptureNumber" to "captureNumber",
|
|
394
418
|
"ColorTemperature" to "colorTemperature",
|
|
419
|
+
"CompositeShootingOutputInterval" to "compositeShootingOutputInterval",
|
|
420
|
+
"CompositeShootingTime" to "compositeShootingTime",
|
|
421
|
+
"ContinuousNumber" to "continuousNumber",
|
|
395
422
|
"DateTimeZone" to "dateTimeZone",
|
|
396
423
|
"ExposureCompensation" to "exposureCompensation",
|
|
397
424
|
"ExposureDelay" to "exposureDelay",
|
|
@@ -408,6 +435,7 @@ class ThetaClientReactNativeModule(
|
|
|
408
435
|
"OffDelay" to "offDelay",
|
|
409
436
|
"Password" to "password",
|
|
410
437
|
"PowerSaving" to "powerSaving",
|
|
438
|
+
"Preset" to "preset",
|
|
411
439
|
"PreviewFormat" to "previewFormat",
|
|
412
440
|
"Proxy" to "proxy",
|
|
413
441
|
"RemainingPictures" to "remainingPictures",
|
|
@@ -630,7 +658,7 @@ class ThetaClientReactNativeModule(
|
|
|
630
658
|
promise.reject(Exception(messageNotInit))
|
|
631
659
|
return
|
|
632
660
|
}
|
|
633
|
-
|
|
661
|
+
|
|
634
662
|
timeShiftCaptureBuilder?.let { builder ->
|
|
635
663
|
launch {
|
|
636
664
|
try {
|
|
@@ -1188,8 +1216,8 @@ class ThetaClientReactNativeModule(
|
|
|
1188
1216
|
* @param optionNames The target shooting mode
|
|
1189
1217
|
* @param promise promise to set result
|
|
1190
1218
|
*/
|
|
1191
|
-
|
|
1192
|
-
|
|
1219
|
+
@ReactMethod
|
|
1220
|
+
fun getMySettingFromOldModel(optionNames: ReadableArray, promise: Promise) {
|
|
1193
1221
|
val theta = theta
|
|
1194
1222
|
if (theta == null) {
|
|
1195
1223
|
promise.reject(Exception(messageNotInit))
|
|
@@ -1272,8 +1300,8 @@ class ThetaClientReactNativeModule(
|
|
|
1272
1300
|
* listPlugins - acquires a list of installed plugins
|
|
1273
1301
|
* @param promise promise to set result
|
|
1274
1302
|
*/
|
|
1275
|
-
|
|
1276
|
-
|
|
1303
|
+
@ReactMethod
|
|
1304
|
+
fun listPlugins(promise: Promise) {
|
|
1277
1305
|
val theta = theta
|
|
1278
1306
|
if (theta == null) {
|
|
1279
1307
|
promise.reject(Exception(messageNotInit))
|
|
@@ -1301,133 +1329,133 @@ class ThetaClientReactNativeModule(
|
|
|
1301
1329
|
promise.reject(t)
|
|
1302
1330
|
}
|
|
1303
1331
|
}
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* setPlugin - sets the installed plugin for boot. Supported just by Theta V.
|
|
1336
|
+
* @param packageName Package name of the target plugin.
|
|
1337
|
+
* @param promise promise to set result
|
|
1338
|
+
*/
|
|
1339
|
+
@ReactMethod
|
|
1340
|
+
fun setPlugin(packageName: String, promise: Promise) {
|
|
1341
|
+
val theta = theta
|
|
1342
|
+
if (theta == null) {
|
|
1343
|
+
promise.reject(Exception(messageNotInit))
|
|
1344
|
+
return
|
|
1345
|
+
}
|
|
1346
|
+
launch {
|
|
1319
1347
|
try {
|
|
1320
1348
|
theta.setPlugin(packageName)
|
|
1321
1349
|
promise.resolve(true)
|
|
1322
1350
|
} catch (t: Throwable) {
|
|
1323
1351
|
promise.reject(t)
|
|
1324
1352
|
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* startPlugin - start the plugin specified by the [packageName].
|
|
1358
|
+
* @param packageName Package name of the target plugin.
|
|
1359
|
+
* @param promise promise to set result
|
|
1360
|
+
*/
|
|
1361
|
+
@ReactMethod
|
|
1362
|
+
fun startPlugin(packageName: String, promise: Promise) {
|
|
1363
|
+
val theta = theta
|
|
1364
|
+
if (theta == null) {
|
|
1365
|
+
promise.reject(Exception(messageNotInit))
|
|
1366
|
+
return
|
|
1367
|
+
}
|
|
1368
|
+
launch {
|
|
1341
1369
|
try {
|
|
1342
1370
|
theta.startPlugin(packageName)
|
|
1343
1371
|
promise.resolve(true)
|
|
1344
1372
|
} catch (t: Throwable) {
|
|
1345
1373
|
promise.reject(t)
|
|
1346
1374
|
}
|
|
1347
|
-
}
|
|
1348
1375
|
}
|
|
1376
|
+
}
|
|
1349
1377
|
|
|
1350
1378
|
/**
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1379
|
+
* stopPlugin - Stop the running plugin.
|
|
1380
|
+
* @param promise promise to set result
|
|
1381
|
+
*/
|
|
1382
|
+
@ReactMethod
|
|
1383
|
+
fun stopPlugin(promise: Promise) {
|
|
1356
1384
|
val theta = theta
|
|
1357
1385
|
if (theta == null) {
|
|
1358
1386
|
promise.reject(Exception(messageNotInit))
|
|
1359
1387
|
return
|
|
1360
1388
|
}
|
|
1361
|
-
|
|
1389
|
+
launch {
|
|
1362
1390
|
try {
|
|
1363
1391
|
theta.stopPlugin()
|
|
1364
1392
|
promise.resolve(true)
|
|
1365
1393
|
} catch (t: Throwable) {
|
|
1366
1394
|
promise.reject(t)
|
|
1367
1395
|
}
|
|
1368
|
-
}
|
|
1369
1396
|
}
|
|
1397
|
+
}
|
|
1370
1398
|
|
|
1371
1399
|
/**
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1400
|
+
* getPluginLicense - acquires the license for the installed plugin.
|
|
1401
|
+
* @param packageName Package name of the target plugin.
|
|
1402
|
+
* @param promise promise to set result
|
|
1403
|
+
*/
|
|
1404
|
+
@ReactMethod
|
|
1405
|
+
fun getPluginLicense(packageName: String, promise: Promise) {
|
|
1378
1406
|
val theta = theta
|
|
1379
1407
|
if (theta == null) {
|
|
1380
1408
|
promise.reject(Exception(messageNotInit))
|
|
1381
1409
|
return
|
|
1382
1410
|
}
|
|
1383
|
-
|
|
1411
|
+
launch {
|
|
1384
1412
|
try {
|
|
1385
1413
|
val result = theta.getPluginLicense(packageName)
|
|
1386
1414
|
promise.resolve(result)
|
|
1387
1415
|
} catch (t: Throwable) {
|
|
1388
1416
|
promise.reject(t)
|
|
1389
1417
|
}
|
|
1390
|
-
}
|
|
1391
1418
|
}
|
|
1419
|
+
}
|
|
1392
1420
|
|
|
1393
1421
|
/**
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1422
|
+
* getPluginOrders - Return the plugin orders. Supported just by Theta X and Z1..
|
|
1423
|
+
* @param promise promise to set result, list of package names of plugins.
|
|
1424
|
+
*/
|
|
1425
|
+
@ReactMethod
|
|
1426
|
+
fun getPluginOrders(promise: Promise) {
|
|
1399
1427
|
val theta = theta
|
|
1400
1428
|
if (theta == null) {
|
|
1401
1429
|
promise.reject(Exception(messageNotInit))
|
|
1402
1430
|
return
|
|
1403
1431
|
}
|
|
1404
|
-
|
|
1432
|
+
launch {
|
|
1405
1433
|
try {
|
|
1406
1434
|
val result = theta.getPluginOrders()
|
|
1407
1435
|
promise.resolve(Arguments.fromList(result))
|
|
1408
1436
|
} catch (t: Throwable) {
|
|
1409
1437
|
promise.reject(t)
|
|
1410
1438
|
}
|
|
1411
|
-
}
|
|
1412
1439
|
}
|
|
1440
|
+
}
|
|
1413
1441
|
|
|
1414
1442
|
/**
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1443
|
+
* setPluginOrders - Return the plugin orders. Supported just by Theta X and Z1.
|
|
1444
|
+
* @param plugins list of package names of plugins
|
|
1445
|
+
* For Z1, list size must be three. No restrictions for the size for X.
|
|
1446
|
+
* When not specifying, set an empty string.
|
|
1447
|
+
* If an empty string is placed mid-way, it will be moved to the front.
|
|
1448
|
+
* Specifying zero package name will result in an error.
|
|
1449
|
+
* @param promise promise to set result
|
|
1450
|
+
*/
|
|
1451
|
+
@ReactMethod
|
|
1452
|
+
fun setPluginOrders(plugins: ReadableArray, promise: Promise) {
|
|
1425
1453
|
val theta = theta
|
|
1426
1454
|
if (theta == null) {
|
|
1427
1455
|
promise.reject(Exception(messageNotInit))
|
|
1428
1456
|
return
|
|
1429
1457
|
}
|
|
1430
|
-
|
|
1458
|
+
launch {
|
|
1431
1459
|
try {
|
|
1432
1460
|
val pluginList = mutableListOf<String>()
|
|
1433
1461
|
for (index in 0..(plugins.size() - 1)) {
|