public void StartDiscovery(string serviceId, System.TimeSpan?advertisingTimeout, IDiscoveryListener listener)
 {
     OurUtils.Logger.d("StartDiscovery in dummy implementation called");
 }
 public void StartDiscovery(string serviceId, TimeSpan?advertisingTimeout, IDiscoveryListener listener)
 {
     Debug.LogError("StartDiscovery in dummy implementation called");
 }
 public void StartDiscovery(string serviceId, System.TimeSpan? advertisingTimeout, IDiscoveryListener listener)
 {
     Debug.LogError("StartDiscovery in dummy implementation called");
 }
 public OnGameThreadDiscoveryListener(IDiscoveryListener listener)
 {
     this.mListener = Misc.CheckNotNull <IDiscoveryListener>(listener);
 }
Example #5
0
 public EndpointDiscoveryCallback(IDiscoveryListener listener) : base(
         "com/google/games/bridge/EndpointDiscoveryCallbackProxy$Callback")
 {
     mListener = listener;
 }
Example #6
0
 public OnGameThreadDiscoveryListener(IDiscoveryListener listener)
 {
     mListener = listener;
 }
 public OnGameThreadDiscoveryListener(IDiscoveryListener listener)
 {
     this.mListener = Misc.CheckNotNull(listener);
 }
        private static NativeEndpointDiscoveryListenerHelper ToDiscoveryListener(
            IDiscoveryListener listener)
        {
            listener = new OnGameThreadDiscoveryListener(listener);
            var helper = new NativeEndpointDiscoveryListenerHelper();

            helper.SetOnEndpointFound((localClientId, endpoint) =>
            listener.OnEndpointFound(endpoint.ToDetails()));
            helper.SetOnEndpointLostCallback((localClientId, lostEndpointId) =>
            listener.OnEndpointLost(lostEndpointId));

            return helper;
        }
        public void StartDiscovery(string serviceId, TimeSpan? advertisingTimeout,
                                   IDiscoveryListener listener)
        {
            Misc.CheckNotNull(serviceId, "serviceId");
            Misc.CheckNotNull(listener, "listener");

            using (var nativeListener = ToDiscoveryListener(listener))
            {
                mManager.StartDiscovery(serviceId, ToTimeoutMillis(advertisingTimeout),
                    nativeListener);
            }
        }
Example #10
0
 public OnGameThreadDiscoveryListener(IDiscoveryListener listener)
 {
     mListener = Misc.CheckNotNull(listener);
 }
        /**
         * Adds the given discovery listener to the list of listeners to be notified
         * when the discovery process is running.
         *
         * <p>If the listener has already been included, this method does nothing.
         * </p>
         *
         * @param listener Listener to be notified when the discovery process is
         *                 running.
         *
         * @throws ArgumentNullException if {@code listener == null}.
         *
         * @see com.digi.xbee.api.listeners.IDiscoveryListener
         * @see #removeDiscoveryListener(IDiscoveryListener)
         */
        public void addDiscoveryListener(IDiscoveryListener listener)
        {
            if (listener == null)
                throw new ArgumentNullException("Listener cannot be null.");

            lock (discoveryListeners)
            {
                if (!discoveryListeners.Contains(listener))
                    discoveryListeners.Add(listener);
            }
        }