OSDN Git Service

VisionKids への対応準備。
[gokigen/PKRemote.git] / app / src / main / java / net / osdn / gokigen / pkremote / camera / CameraInterfaceProvider.java
index da03f1a..4fe5d77 100644 (file)
@@ -37,6 +37,7 @@ import net.osdn.gokigen.pkremote.camera.vendor.ricoh.wrapper.RicohGr2InterfacePr
 import net.osdn.gokigen.pkremote.camera.vendor.sony.ISonyInterfaceProvider;
 import net.osdn.gokigen.pkremote.camera.vendor.sony.wrapper.SonyCameraWrapper;
 import net.osdn.gokigen.pkremote.camera.vendor.theta.wrapper.ThetaInterfaceProvider;
+import net.osdn.gokigen.pkremote.camera.vendor.visionkids.wrapper.VisionKidsInterfaceProvider;
 import net.osdn.gokigen.pkremote.preference.IPreferencePropertyAccessor;
 
 import androidx.annotation.NonNull;
@@ -59,6 +60,8 @@ public class CameraInterfaceProvider implements IInterfaceProvider
     private final OlympusPenInterfaceProvider olympuspen;
     private final ThetaInterfaceProvider theta;
     private final PixproInterfaceProvider pixpro;
+    private final VisionKidsInterfaceProvider visionKids;
+
     private final IInformationReceiver informationReceiver;
     private final CameraContentsRecognizer cameraContentsRecognizer;
     private final AppCompatActivity context;
@@ -88,6 +91,7 @@ public class CameraInterfaceProvider implements IInterfaceProvider
         olympuspen = new OlympusPenInterfaceProvider(context, provider);
         theta = new ThetaInterfaceProvider(context, provider);
         pixpro = new PixproInterfaceProvider(context, provider, informationReceiver);
+        visionKids = new VisionKidsInterfaceProvider(context, provider, informationReceiver);
         this.informationReceiver = informationReceiver;
         this.cameraContentsRecognizer = new CameraContentsRecognizer(context, this);
     }
@@ -163,6 +167,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getPixproCameraConnection());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getVisionKidsCameraConnection());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getRicohGr2CameraConnection());
@@ -217,6 +225,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getButtonControl());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getButtonControl());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getButtonControl());
@@ -271,6 +283,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getDisplayInjector());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getDisplayInjector());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getDisplayInjector());
@@ -325,6 +341,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getLiveViewControl());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getLiveViewControl());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getLiveViewControl());
@@ -379,6 +399,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getLiveViewListener());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getLiveViewListener());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getLiveViewListener());
@@ -433,6 +457,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getFocusingControl());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getFocusingControl());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getFocusingControl());
@@ -487,6 +515,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getCameraInformation());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getCameraInformation());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getCameraInformation());
@@ -541,6 +573,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getZoomLensControl());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getZoomLensControl());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getZoomLensControl());
@@ -595,6 +631,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getCaptureControl());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getCaptureControl());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getCaptureControl());
@@ -649,6 +689,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getCameraStatusListHolder());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getCameraStatusListHolder());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getCameraStatusListHolder());
@@ -703,6 +747,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getCameraStatusWatcher());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getCameraStatusWatcher());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getCameraStatusWatcher());
@@ -757,6 +805,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getPlaybackControl());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getPlaybackControl());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getPlaybackControl());
@@ -811,6 +863,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getHardwareStatus());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getHardwareStatus());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getHardwareStatus());
@@ -865,6 +921,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 return (pixpro.getCameraRunMode());
             }
+            else if (connectionMethod == ICameraConnection.CameraConnectionMethod.VISIONKIDS)
+            {
+                return (visionKids.getCameraRunMode());
+            }
             else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
             {
                 return (ricohGr2.getCameraRunMode());
@@ -964,6 +1024,10 @@ public class CameraInterfaceProvider implements IInterfaceProvider
             {
                 ret = ICameraConnection.CameraConnectionMethod.PIXPRO;
             }
+            else if (connectionMethod.contains("VISIONKIDS"))
+            {
+                ret = ICameraConnection.CameraConnectionMethod.VISIONKIDS;
+            }
             else // if (connectionMethod.contains("OPC"))
             {
                 ret = ICameraConnection.CameraConnectionMethod.OPC;