|
22 | 22 | /** Generated class from Pigeon. */
|
23 | 23 | @SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression"})
|
24 | 24 | public class GeneratedCameraXLibrary {
|
25 |
| - |
26 |
| - public interface Result<T> { |
27 |
| - void success(T result); |
28 |
| - |
29 |
| - void error(Throwable error); |
30 |
| - } |
31 |
| - |
32 | 25 | private static class JavaObjectHostApiCodec extends StandardMessageCodec {
|
33 | 26 | public static final JavaObjectHostApiCodec INSTANCE = new JavaObjectHostApiCodec();
|
34 | 27 |
|
@@ -318,133 +311,6 @@ public void create(
|
318 | 311 | }
|
319 | 312 | }
|
320 | 313 |
|
321 |
| - private static class ProcessCameraProviderHostApiCodec extends StandardMessageCodec { |
322 |
| - public static final ProcessCameraProviderHostApiCodec INSTANCE = |
323 |
| - new ProcessCameraProviderHostApiCodec(); |
324 |
| - |
325 |
| - private ProcessCameraProviderHostApiCodec() {} |
326 |
| - } |
327 |
| - |
328 |
| - /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ |
329 |
| - public interface ProcessCameraProviderHostApi { |
330 |
| - void getInstance(Result<Long> result); |
331 |
| - |
332 |
| - @NonNull |
333 |
| - List<Long> getAvailableCameraInfos(@NonNull Long identifier); |
334 |
| - |
335 |
| - /** The codec used by ProcessCameraProviderHostApi. */ |
336 |
| - static MessageCodec<Object> getCodec() { |
337 |
| - return ProcessCameraProviderHostApiCodec.INSTANCE; |
338 |
| - } |
339 |
| - |
340 |
| - /** |
341 |
| - * Sets up an instance of `ProcessCameraProviderHostApi` to handle messages through the |
342 |
| - * `binaryMessenger`. |
343 |
| - */ |
344 |
| - static void setup(BinaryMessenger binaryMessenger, ProcessCameraProviderHostApi api) { |
345 |
| - { |
346 |
| - BasicMessageChannel<Object> channel = |
347 |
| - new BasicMessageChannel<>( |
348 |
| - binaryMessenger, |
349 |
| - "dev.flutter.pigeon.ProcessCameraProviderHostApi.getInstance", |
350 |
| - getCodec()); |
351 |
| - if (api != null) { |
352 |
| - channel.setMessageHandler( |
353 |
| - (message, reply) -> { |
354 |
| - Map<String, Object> wrapped = new HashMap<>(); |
355 |
| - try { |
356 |
| - Result<Long> resultCallback = |
357 |
| - new Result<Long>() { |
358 |
| - public void success(Long result) { |
359 |
| - wrapped.put("result", result); |
360 |
| - reply.reply(wrapped); |
361 |
| - } |
362 |
| - |
363 |
| - public void error(Throwable error) { |
364 |
| - wrapped.put("error", wrapError(error)); |
365 |
| - reply.reply(wrapped); |
366 |
| - } |
367 |
| - }; |
368 |
| - |
369 |
| - api.getInstance(resultCallback); |
370 |
| - } catch (Error | RuntimeException exception) { |
371 |
| - wrapped.put("error", wrapError(exception)); |
372 |
| - reply.reply(wrapped); |
373 |
| - } |
374 |
| - }); |
375 |
| - } else { |
376 |
| - channel.setMessageHandler(null); |
377 |
| - } |
378 |
| - } |
379 |
| - { |
380 |
| - BasicMessageChannel<Object> channel = |
381 |
| - new BasicMessageChannel<>( |
382 |
| - binaryMessenger, |
383 |
| - "dev.flutter.pigeon.ProcessCameraProviderHostApi.getAvailableCameraInfos", |
384 |
| - getCodec()); |
385 |
| - if (api != null) { |
386 |
| - channel.setMessageHandler( |
387 |
| - (message, reply) -> { |
388 |
| - Map<String, Object> wrapped = new HashMap<>(); |
389 |
| - try { |
390 |
| - ArrayList<Object> args = (ArrayList<Object>) message; |
391 |
| - Number identifierArg = (Number) args.get(0); |
392 |
| - if (identifierArg == null) { |
393 |
| - throw new NullPointerException("identifierArg unexpectedly null."); |
394 |
| - } |
395 |
| - List<Long> output = |
396 |
| - api.getAvailableCameraInfos( |
397 |
| - (identifierArg == null) ? null : identifierArg.longValue()); |
398 |
| - wrapped.put("result", output); |
399 |
| - } catch (Error | RuntimeException exception) { |
400 |
| - wrapped.put("error", wrapError(exception)); |
401 |
| - } |
402 |
| - reply.reply(wrapped); |
403 |
| - }); |
404 |
| - } else { |
405 |
| - channel.setMessageHandler(null); |
406 |
| - } |
407 |
| - } |
408 |
| - } |
409 |
| - } |
410 |
| - |
411 |
| - private static class ProcessCameraProviderFlutterApiCodec extends StandardMessageCodec { |
412 |
| - public static final ProcessCameraProviderFlutterApiCodec INSTANCE = |
413 |
| - new ProcessCameraProviderFlutterApiCodec(); |
414 |
| - |
415 |
| - private ProcessCameraProviderFlutterApiCodec() {} |
416 |
| - } |
417 |
| - |
418 |
| - /** Generated class from Pigeon that represents Flutter messages that can be called from Java. */ |
419 |
| - public static class ProcessCameraProviderFlutterApi { |
420 |
| - private final BinaryMessenger binaryMessenger; |
421 |
| - |
422 |
| - public ProcessCameraProviderFlutterApi(BinaryMessenger argBinaryMessenger) { |
423 |
| - this.binaryMessenger = argBinaryMessenger; |
424 |
| - } |
425 |
| - |
426 |
| - public interface Reply<T> { |
427 |
| - void reply(T reply); |
428 |
| - } |
429 |
| - |
430 |
| - static MessageCodec<Object> getCodec() { |
431 |
| - return ProcessCameraProviderFlutterApiCodec.INSTANCE; |
432 |
| - } |
433 |
| - |
434 |
| - public void create(@NonNull Long identifierArg, Reply<Void> callback) { |
435 |
| - BasicMessageChannel<Object> channel = |
436 |
| - new BasicMessageChannel<>( |
437 |
| - binaryMessenger, |
438 |
| - "dev.flutter.pigeon.ProcessCameraProviderFlutterApi.create", |
439 |
| - getCodec()); |
440 |
| - channel.send( |
441 |
| - new ArrayList<Object>(Arrays.asList(identifierArg)), |
442 |
| - channelReply -> { |
443 |
| - callback.reply(null); |
444 |
| - }); |
445 |
| - } |
446 |
| - } |
447 |
| - |
448 | 314 | private static Map<String, Object> wrapError(Throwable exception) {
|
449 | 315 | Map<String, Object> errorMap = new HashMap<>();
|
450 | 316 | errorMap.put("message", exception.toString());
|
|
0 commit comments