Esempio n. 1
0
 public override void initConnectionListener(ConnectionListenerPrx listener, Current current__)
 {
     print("receive client callback listener");
     if (clientProxyList.ContainsKey(currentRtspId))
     {
         clientProxyList[currentRtspId].proxy = listener;
     }
 }
Esempio n. 2
0
        private void btndynamicDetect_Click(object sender, RoutedEventArgs e)
        {
            var sb = new StringBuilder();

            sb.Append("threshold".ElementText("0.5"));
            sb.Append("rtspId".ElementText("1"));
            sb.Append("rtspPath".ElementText("rtsp://*****:*****@192.0.0.64:554/h264/ch1/main/av_stream"));
            sb.Append("responseType".ElementBegin());
            if (ckbCallback.IsChecked.Value)
            {
                sb.Append("type".ElementText("callback"));
            }
            else
            {
                sb.Append("type".ElementText("messageQueue"));
            }

            sb.Append("size".ElementText("10"));
            sb.Append("responseType".ElementEnd());
            sb.Append("maxImageCount".ElementText("3"));
            sb.Append("frames".ElementText("5"));
            var data = sb.ToString();
            var xml  = GetXml("dynamicDetect", data);

            var content = facePxy.send(xml);

            XmlDocument doc = new XmlDocument();

            doc.LoadXml(content);

            var code = doc.GetNodeText("code");

            Item("code->" + code);

            if (ckbCallback.IsChecked.Value)
            {
                callbackAdapter = ic.createObjectAdapterWithEndpoints("callback-receiver", "default");
                Ice.Object callbackServant = new ConnectorDisp(Item);

                callbackAdapter.add(callbackServant, ic.stringToIdentity("callbackReceiver"));
                callbackAdapter.activate();

                ConnectionListenerPrx listenerPxy = null;

                var objectPxy = callbackAdapter.createProxy(ic.stringToIdentity("callbackReceiver"));
                listenerPxy = ConnectionListenerPrxHelper.checkedCast(objectPxy);

                facePxy.initConnectionListener(listenerPxy);

                Item("set callback ok");
            }
        }
Esempio n. 3
0
        public override void initConnectionListener(ConnectionListenerPrx listener, Current current__)
        {
            clientPxy     = listener;
            _stopCallback = false;
            print("receive client callback listener");

            Task.Factory.StartNew(() =>
            {
                while (!_stopCallback)
                {
                    listener.onRecv("终于等到你->" + DateTime.Now);
                    Thread.Sleep(1000);
                }
            });
        }
Esempio n. 4
0
        public static ConnectionListenerPrx uncheckedCast(Ice.ObjectPrx b)
        {
            if (b == null)
            {
                return(null);
            }
            ConnectionListenerPrx r = b as ConnectionListenerPrx;

            if (r == null)
            {
                ConnectionListenerPrxHelper h = new ConnectionListenerPrxHelper();
                h.copyFrom__(b);
                r = h;
            }
            return(r);
        }
Esempio n. 5
0
        public static ConnectionListenerPrx checkedCast(Ice.ObjectPrx b, _System.Collections.Generic.Dictionary <string, string> ctx)
        {
            if (b == null)
            {
                return(null);
            }
            ConnectionListenerPrx r = b as ConnectionListenerPrx;

            if ((r == null) && b.ice_isA(ice_staticId(), ctx))
            {
                ConnectionListenerPrxHelper h = new ConnectionListenerPrxHelper();
                h.copyFrom__(b);
                r = h;
            }
            return(r);
        }
Esempio n. 6
0
        private void Setcallback()
        {
            callbackAdapter = FaceServices.FaceProxy.Ic.createObjectAdapterWithEndpoints("callback-receiver", "default");
            Ice.Object callbackServant = new ConnectorDisp(FaceBack);

            callbackAdapter.add(callbackServant, FaceServices.FaceProxy.Ic.stringToIdentity("callbackReceiver"));
            callbackAdapter.activate();

            ConnectionListenerPrx listenerPxy = null;

            var objectPxy = callbackAdapter.createProxy(FaceServices.FaceProxy.Ic.stringToIdentity("callbackReceiver"));

            listenerPxy = ConnectionListenerPrxHelper.checkedCast(objectPxy);

            FaceServices.FaceProxy.initConnectionListener(listenerPxy);

            Item("set callback ok");
        }
Esempio n. 7
0
 public void initConnectionListener(ConnectionListenerPrx listener)
 {
     facePxy.initConnectionListener(listener);
 }
Esempio n. 8
0
 public static void write__(IceInternal.BasicStream os__, ConnectionListenerPrx v__)
 {
     os__.writeProxy(v__);
 }