private static async Task <bool> CheckCurrentFunction(CameraApiClient camera, string nextFunction)
        {
            var current = await camera.GetCameraFunctionAsync().ConfigureAwait(false);

            DebugUtil.Log(() => "Current state is : " + current);
            return(nextFunction == current);
        }
Beispiel #2
0
        public DeviceApiHolder(SonyCameraDeviceInfo info)
        {
            if (info.Endpoints.ContainsKey("camera"))
            {
                try
                {
                    Camera = new CameraApiClient(new Uri(info.Endpoints["camera"]));
                }
                catch { };
            }
            if (info.Endpoints.ContainsKey("system"))
            {
                try
                {
                    System = new SystemApiClient(new Uri(info.Endpoints["system"]));
                }
                catch { };
            }
            if (info.Endpoints.ContainsKey("avContent"))
            {
                try
                {
                    AvContent = new AvContentApiClient(new Uri(info.Endpoints["avContent"]));
                }
                catch { };
            }

            if (info.FriendlyName == "DSC-QX10")
            {
                ProductType = ProductType.DSC_QX10;
            }

            capability.PropertyChanged += api_PropertyChanged;
        }
Beispiel #3
0
 public void SonyDeviceFound(object sender, SonyCameraDeviceEventArgs e)
 {
     var endpoints = e.SonyCameraDevice.Endpoints; // Dictionary of each service name and endpoint.
     Uri uri       = new Uri(endpoints["camera"]);
     var camera    = new CameraApiClient(uri);
 }