1 package net.osdn.gokigen.pkremote.camera;
3 import android.content.SharedPreferences;
5 import net.osdn.gokigen.pkremote.IInformationReceiver;
6 import net.osdn.gokigen.pkremote.camera.interfaces.control.ICameraButtonControl;
7 import net.osdn.gokigen.pkremote.camera.interfaces.control.ICameraConnection;
8 import net.osdn.gokigen.pkremote.camera.interfaces.liveview.ILiveViewListener;
9 import net.osdn.gokigen.pkremote.camera.interfaces.playback.ICameraContentsRecognizer;
10 import net.osdn.gokigen.pkremote.camera.interfaces.status.ICameraHardwareStatus;
11 import net.osdn.gokigen.pkremote.camera.interfaces.status.ICameraInformation;
12 import net.osdn.gokigen.pkremote.camera.interfaces.control.ICameraRunMode;
13 import net.osdn.gokigen.pkremote.camera.interfaces.status.ICameraStatus;
14 import net.osdn.gokigen.pkremote.camera.interfaces.status.ICameraStatusReceiver;
15 import net.osdn.gokigen.pkremote.camera.interfaces.status.ICameraStatusWatcher;
16 import net.osdn.gokigen.pkremote.camera.interfaces.control.ICaptureControl;
17 import net.osdn.gokigen.pkremote.camera.interfaces.liveview.IDisplayInjector;
18 import net.osdn.gokigen.pkremote.camera.interfaces.control.IFocusingControl;
19 import net.osdn.gokigen.pkremote.camera.interfaces.IInterfaceProvider;
20 import net.osdn.gokigen.pkremote.camera.interfaces.liveview.ILiveViewControl;
21 import net.osdn.gokigen.pkremote.camera.interfaces.playback.IPlaybackControl;
22 import net.osdn.gokigen.pkremote.camera.interfaces.control.IZoomLensControl;
23 import net.osdn.gokigen.pkremote.camera.playback.CameraContentsRecognizer;
24 import net.osdn.gokigen.pkremote.camera.utils.CameraStatusListener;
25 import net.osdn.gokigen.pkremote.camera.vendor.fujix.wrapper.FujiXInterfaceProvider;
26 import net.osdn.gokigen.pkremote.camera.vendor.nikon.INikonInterfaceProvider;
27 import net.osdn.gokigen.pkremote.camera.vendor.nikon.wrapper.NikonInterfaceProvider;
28 import net.osdn.gokigen.pkremote.camera.vendor.olympus.IOlympusInterfaceProvider;
29 import net.osdn.gokigen.pkremote.camera.vendor.olympus.wrapper.OlympusInterfaceProvider;
30 import net.osdn.gokigen.pkremote.camera.vendor.olympuspen.wrapper.OlympusPenInterfaceProvider;
31 import net.osdn.gokigen.pkremote.camera.vendor.panasonic.wrapper.PanasonicCameraWrapper;
32 import net.osdn.gokigen.pkremote.camera.vendor.ptpip.IPtpIpInterfaceProvider;
33 import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.PtpIpInterfaceProvider;
34 import net.osdn.gokigen.pkremote.camera.vendor.ricoh.wrapper.RicohGr2InterfaceProvider;
35 import net.osdn.gokigen.pkremote.camera.vendor.sony.ISonyInterfaceProvider;
36 import net.osdn.gokigen.pkremote.camera.vendor.sony.wrapper.SonyCameraWrapper;
37 import net.osdn.gokigen.pkremote.preference.IPreferencePropertyAccessor;
39 import androidx.annotation.NonNull;
40 import androidx.appcompat.app.AppCompatActivity;
41 import androidx.preference.PreferenceManager;
47 public class CameraInterfaceProvider implements IInterfaceProvider
49 private final SonyCameraWrapper sony;
50 private final OlympusInterfaceProvider olympus;
51 private final RicohGr2InterfaceProvider ricohGr2;
52 private final FujiXInterfaceProvider fujiX;
53 private final PanasonicCameraWrapper panasonic;
54 private final PtpIpInterfaceProvider ptpip;
55 private final NikonInterfaceProvider nikon;
56 private final OlympusPenInterfaceProvider olympuspen;
57 private final IInformationReceiver informationReceiver;
58 private final CameraContentsRecognizer cameraContentsRecognizer;
59 private final AppCompatActivity context;
60 //private final CameraStatusListener statusListener;
61 private ICameraConnection.CameraConnectionMethod connectionMethod = ICameraConnection.CameraConnectionMethod.UNKNOWN;
63 public static IInterfaceProvider newInstance(@NonNull AppCompatActivity context, @NonNull ICameraStatusReceiver provider, @NonNull IInformationReceiver informationReceiver)
65 return (new CameraInterfaceProvider(context, provider, informationReceiver));
72 private CameraInterfaceProvider(@NonNull AppCompatActivity context, @NonNull ICameraStatusReceiver provider, @NonNull IInformationReceiver informationReceiver)
74 this.context = context;
75 CameraStatusListener statusListener = new CameraStatusListener();
76 olympus = new OlympusInterfaceProvider(context, provider);
77 ricohGr2 = new RicohGr2InterfaceProvider(context, provider);
78 fujiX = new FujiXInterfaceProvider(context, provider, statusListener, informationReceiver);
79 sony = new SonyCameraWrapper(context, provider, statusListener, informationReceiver);
80 ptpip = new PtpIpInterfaceProvider(context, provider, statusListener, informationReceiver);
81 nikon = new NikonInterfaceProvider(context, provider, statusListener, informationReceiver);
82 panasonic = new PanasonicCameraWrapper(context, provider, statusListener, informationReceiver);
83 olympuspen = new OlympusPenInterfaceProvider(context, provider);
84 this.informationReceiver = informationReceiver;
85 this.cameraContentsRecognizer = new CameraContentsRecognizer(context, this);
89 public IOlympusInterfaceProvider getOlympusInterfaceProvider()
95 public ISonyInterfaceProvider getSonyInterface()
101 public IPtpIpInterfaceProvider getPtpIpInterface()
107 public INikonInterfaceProvider getNikonInterface()
118 public ICameraConnection getCameraConnection()
122 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
123 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
125 return (olympus.getOlyCameraConnection());
127 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
129 return (fujiX.getFujiXCameraConnection());
131 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
133 return (panasonic.getPanasonicCameraConnection());
135 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
137 return (sony.getSonyCameraConnection());
139 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
141 return (ptpip.getPtpIpCameraConnection());
143 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
145 return (nikon.getPtpIpCameraConnection());
147 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
149 return (olympuspen.getOlyCameraConnection());
151 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
153 return (ricohGr2.getRicohGr2CameraConnection());
164 public ICameraButtonControl getButtonControl()
168 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
169 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
171 return (olympus.getButtonControl());
173 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
175 return (fujiX.getButtonControl());
177 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
179 return (panasonic.getButtonControl());
181 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
183 return (sony.getButtonControl());
185 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
187 return (ptpip.getButtonControl());
189 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
191 return (nikon.getButtonControl());
193 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
195 return (olympuspen.getButtonControl());
197 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
199 return (ricohGr2.getButtonControl());
210 public IDisplayInjector getDisplayInjector()
214 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
215 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
217 return (olympus.getDisplayInjector());
219 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
221 return (fujiX.getDisplayInjector());
223 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
225 return (panasonic.getDisplayInjector());
227 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
229 return (sony.getDisplayInjector());
231 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
233 return (ptpip.getDisplayInjector());
235 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
237 return (nikon.getDisplayInjector());
239 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
241 return (olympuspen.getDisplayInjector());
243 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
245 return (ricohGr2.getDisplayInjector());
256 public ILiveViewControl getLiveViewControl()
260 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
261 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
263 return (olympus.getLiveViewControl());
265 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
267 return (fujiX.getLiveViewControl());
269 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
271 return (panasonic.getPanasonicLiveViewControl());
273 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
275 return (sony.getLiveViewControl());
277 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
279 return (ptpip.getLiveViewControl());
281 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
283 return (nikon.getLiveViewControl());
285 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
287 return (olympuspen.getLiveViewControl());
289 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
291 return (ricohGr2.getLiveViewControl());
302 public ILiveViewListener getLiveViewListener()
306 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
307 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
309 return (olympus.getLiveViewListener());
311 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
313 return (fujiX.getLiveViewListener());
315 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
317 return (panasonic.getLiveViewListener());
319 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
321 return (sony.getLiveViewListener());
323 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
325 return (ptpip.getLiveViewListener());
327 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
329 return (nikon.getLiveViewListener());
331 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
333 return (olympuspen.getLiveViewListener());
335 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
337 return (ricohGr2.getLiveViewListener());
348 public IFocusingControl getFocusingControl()
352 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
353 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
355 return (olympus.getFocusingControl());
357 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
359 return (fujiX.getFocusingControl());
361 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
363 return (panasonic.getFocusingControl());
365 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
367 return (sony.getFocusingControl());
369 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
371 return (ptpip.getFocusingControl());
373 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
375 return (nikon.getFocusingControl());
377 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
379 return (olympuspen.getFocusingControl());
381 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
383 return (ricohGr2.getFocusingControl());
394 public ICameraInformation getCameraInformation()
398 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
399 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
401 return (olympus.getCameraInformation());
403 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
405 return (fujiX.getCameraInformation());
407 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
409 return (panasonic.getCameraInformation());
411 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
413 return (sony.getCameraInformation());
415 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
417 return (ptpip.getCameraInformation());
419 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
421 return (nikon.getCameraInformation());
423 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
425 return (olympuspen.getCameraInformation());
427 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
429 return (ricohGr2.getCameraInformation());
440 public IZoomLensControl getZoomLensControl()
444 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
445 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
447 return (olympus.getZoomLensControl());
449 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
451 return (fujiX.getZoomLensControl());
453 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
455 return (panasonic.getZoomLensControl());
457 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
459 return (sony.getZoomLensControl());
461 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
463 return (ptpip.getZoomLensControl());
465 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
467 return (nikon.getZoomLensControl());
469 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
471 return (olympuspen.getZoomLensControl());
473 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
475 return (ricohGr2.getZoomLensControl());
486 public ICaptureControl getCaptureControl()
490 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
491 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
493 return (olympus.getCaptureControl());
495 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
497 return (fujiX.getCaptureControl());
499 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
501 return (panasonic.getCaptureControl());
503 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
505 return (sony.getCaptureControl());
507 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
509 return (ptpip.getCaptureControl());
511 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
513 return (nikon.getCaptureControl());
515 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
517 return (olympuspen.getCaptureControl());
519 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
521 return (ricohGr2.getCaptureControl());
532 public ICameraStatus getCameraStatusListHolder()
536 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
537 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
539 return (olympus.getCameraStatusListHolder());
541 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
543 return (fujiX.getCameraStatusListHolder());
545 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
547 return (panasonic.getCameraStatusListHolder());
549 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
551 return (sony.getCameraStatusListHolder());
553 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
555 return (ptpip.getCameraStatusListHolder());
557 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
559 return (nikon.getCameraStatusListHolder());
561 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
563 return (olympuspen.getCameraStatusListHolder());
565 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
567 return (ricohGr2.getCameraStatusListHolder());
578 public ICameraStatusWatcher getCameraStatusWatcher()
582 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
583 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
585 return (olympus.getCameraStatusWatcher());
587 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
589 return (fujiX.getCameraStatusWatcher());
591 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
593 return (panasonic.getCameraStatusWatcher());
595 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
597 return (sony.getCameraStatusWatcher());
599 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
601 return (ptpip.getCameraStatusWatcher());
603 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
605 return (nikon.getCameraStatusWatcher());
607 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
609 return (olympuspen.getCameraStatusWatcher());
611 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
613 return (ricohGr2.getCameraStatusWatcher());
624 public IPlaybackControl getPlaybackControl()
628 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
629 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
631 return (olympus.getPlaybackControl());
633 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
635 return (fujiX.getPlaybackControl());
637 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
639 return (panasonic.getPlaybackControl());
641 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
643 return (sony.getPlaybackControl());
645 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
647 return (ptpip.getPlaybackControl());
649 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
651 return (nikon.getPlaybackControl());
653 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
655 return (olympuspen.getPlaybackControl());
657 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
659 return (ricohGr2.getPlaybackControl());
670 public ICameraHardwareStatus getHardwareStatus()
674 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
675 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
677 return (olympus.getHardwareStatus());
679 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
681 return (fujiX.getHardwareStatus());
683 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
685 return (panasonic.getHardwareStatus());
687 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
689 return (sony.getHardwareStatus());
691 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
693 return (ptpip.getHardwareStatus());
695 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
697 return (nikon.getHardwareStatus());
699 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
701 return (olympuspen.getHardwareStatus());
703 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
705 return (ricohGr2.getHardwareStatus());
716 public ICameraRunMode getCameraRunMode()
720 ICameraConnection.CameraConnectionMethod connectionMethod = getCammeraConnectionMethodImpl();
721 if (connectionMethod == ICameraConnection.CameraConnectionMethod.OPC)
723 return (olympus.getCameraRunMode());
725 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.FUJI_X)
727 return (fujiX.getCameraRunMode());
729 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.PANASONIC)
731 return (panasonic.getCameraRunMode());
733 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.SONY)
735 return (sony.getCameraRunMode());
737 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.CANON)
739 return (ptpip.getCameraRunMode());
741 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.NIKON)
743 return (nikon.getCameraRunMode());
745 else if (connectionMethod == ICameraConnection.CameraConnectionMethod.OLYMPUS)
747 return (olympuspen.getCameraRunMode());
749 else // if (connectionMethod == ICameraConnection.CameraConnectionMethod.RICOH)
751 return (ricohGr2.getCameraRunMode());
762 * OPC/GR2/SONY カメラを使用するかどうか
764 * @return OPC / SONY / RICOH (ICameraConnection.CameraConnectionMethod)
766 public ICameraConnection.CameraConnectionMethod getCammeraConnectionMethod()
768 return (getCammeraConnectionMethodImpl());
776 public void resetCameraConnectionMethod()
778 connectionMethod = ICameraConnection.CameraConnectionMethod.UNKNOWN;
786 public IInformationReceiver getInformationReceiver()
788 return (informationReceiver);
792 public ICameraContentsRecognizer getCameraContentsRecognizer()
794 return (cameraContentsRecognizer);
801 private ICameraConnection.CameraConnectionMethod getCammeraConnectionMethodImpl()
803 if (connectionMethod != ICameraConnection.CameraConnectionMethod.UNKNOWN)
805 return (connectionMethod);
807 ICameraConnection.CameraConnectionMethod ret;
810 SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
811 String connectionMethod = preferences.getString(IPreferencePropertyAccessor.CONNECTION_METHOD, "RICOH");
812 if (connectionMethod.contains("RICOH"))
814 ret = ICameraConnection.CameraConnectionMethod.RICOH;
816 else if (connectionMethod.contains("FUJI_X"))
818 ret = ICameraConnection.CameraConnectionMethod.FUJI_X;
820 else if (connectionMethod.contains("PANASONIC"))
822 ret = ICameraConnection.CameraConnectionMethod.PANASONIC;
824 else if (connectionMethod.contains("SONY"))
826 ret = ICameraConnection.CameraConnectionMethod.SONY;
828 else if (connectionMethod.contains("CANON"))
830 ret = ICameraConnection.CameraConnectionMethod.CANON;
832 else if (connectionMethod.contains("NIKON"))
834 ret = ICameraConnection.CameraConnectionMethod.NIKON;
836 else if (connectionMethod.contains("OLYMPUS"))
838 ret = ICameraConnection.CameraConnectionMethod.OLYMPUS;
840 else // if (connectionMethod.contains("OPC"))
842 ret = ICameraConnection.CameraConnectionMethod.OPC;
845 else if (connectionMethod.contains("SONY"))
847 ret = ICameraConnection.CameraConnectionMethod.SONY;
854 ret = ICameraConnection.CameraConnectionMethod.UNKNOWN;
856 connectionMethod = ret;
857 return (connectionMethod);