Exemple #1
0
        public KeepPublishedCameraAliveResponse KeepPublishedCameraAlive(KeepPublishedCameraAliveRequest request)
        {
            try
            {
                if (request == null)
                {
                    throw new ArgumentNullException("request");
                }

                KeepPublishedCameraAliveResponse response = new KeepPublishedCameraAliveResponse();

                Locator.Get <IStreamingManager>().KeepAlive(request.CameraId, PublishedCameraTranslator.Translate(request.Destination));

                return(response);
            }
            catch (Exception ex)
            {
                throw new FaultException <DeviceConnectorServiceFault>(new DeviceConnectorServiceFault(ex.Message, ex), ex.Message);
            }
        }
Exemple #2
0
        public GetPublishedCamerasResponse GetPublishedCameras(GetPublishedCamerasRequest request)
        {
            try
            {
                if (request == null)
                {
                    throw new ArgumentNullException("request");
                }

                GetPublishedCamerasResponse response = new GetPublishedCamerasResponse();
                response.PublishedCameras = new PublishedCameraDataCollection();

                IList <PublishedCamera> list = Locator.Get <IStreamingManager>().GetPublishedCameras();
                response.PublishedCameras.AddRange((from c in list select PublishedCameraTranslator.Translate(c)).ToList());

                return(response);
            }
            catch (Exception ex)
            {
                throw new FaultException <DeviceConnectorServiceFault>(new DeviceConnectorServiceFault(ex.Message, ex), ex.Message);
            }
        }