Enable all exposed notifications.

        :param callback: Callback to call when a notification is received.
168070
async def listen_all_notifications(self, callback):
        
        everything = [noti.asdict() for noti in self.notifications]
        if len(everything) > 0:
            await self._methods["switchNotifications"](
                {"enabled": everything}, _consumer=callback
            )
        else:
            _LOGGER.debug("No notifications available for %s", self.name)
954126
def on(self, evt, func):
        ''''''
        if evt not in self._callbacks:
            raise NotImplementedError('callback "%s"' % evt)
        else:
            self._callbacks[evt] = func
1048313
public void enableEffect(boolean enable) {
        if (enable && !mEffectEnabled) {
            if (DBG) Log.d(TAG, "Notification effect is now enabled for handler=" + ID);
            mEffectEnabled = true;
        } else if (enable && !mEffectEnabled) {
            if (DBG) Log.d(TAG, "Notification effect is now disabled for handler=" + ID);
            mEffectEnabled = false;
            if (mEffect.isConsumer(ID)) {
                mEffect.cancel();
            }
        }
    }
99882
def on_recv(self, callback):
        '''
        
        '''
        if callback is None:
            self._on_recv = callback
        else:
            def wrap_recv(header, body):
                callback(body)
            self._on_recv = wrap_recv
1201459
public final void addCallback(StatusCallback callback) {
        synchronized (callbacks) {
            if (callback != null && !callbacks.contains(callback)) {
                callbacks.add(callback);
            }
        }
    }
259081
def send_notification(self, method, *args):
        
        message = self._version.create_request(method, args, notification=True)
        self.send_message(message)
163926
function (notifyText) {
			this.writeDebug('notify',notifyText);
			if (this.settings.callbackNotify) {
				this.settings.callbackNotify.call(this, notifyText);
			}
			else {
				alert(notifyText);
			}
		}
382101
def trigger(self, attr, old, new, hint=None, setter=None):
        ''' 

        '''
        def invoke():
            callbacks = self._callbacks.get(attr)
            if callbacks:
                for callback in callbacks:
                    callback(attr, old, new)
        if hasattr(self, '_document') and self._document is not None:
            self._document._notify_change(self, attr, old, new, hint, setter, invoke)
        else:
            invoke()
1311602
function (options) {
                var self = this;
                options = self.getOptions(options);
                var existing = $('.' + NOTIFICATIONS_CONTAINER_CLASS + ' > div');
                if (existing) {
                    var diff = existing.length - options.maxNotifications;
                    if (diff >= 0) {
                        for (var i = 0, _i = diff + 1; i < _i; i++) {
                            this.closeNotification(existing[i], -1);
                        }
                    }
                }

                this.buildNotification(options);
            }
640231
def emit(self, action, event):
        
        NotificationManager.instance().emit(action, event, project_id=self.id)
1348891
function (showSignal, callback) {
        var timer = setTimeout(function () { callback(false); }, 30 * 1000);

        //TODO: that.stopListeningFor("RaiseYourHandReturn", listenHandler);
        //TODO:  var listenHandler = this.listenFor("RaiseYourHandReturn",  ... );

        //logger.log("RaiseYourHand: asking core to signal? " + showSignal);
        var token = this.sendMessage("RaiseYourHand", { _writeCoapUri: messages.raiseYourHandUrlGenerator(showSignal) }, null);
        this.listenFor("RaiseYourHandReturn", null, token, function () {
            clearTimeout(timer);
            callback(true);
        }, true);

    }
599832
def emit(self, *args, **kwargs):
        
        for callback in self.callbacks:
            callback(*args, **kwargs)
759660
function enableLuxometerNotifications(deviceHandle, configCharacteristic, dataCharacteristic)
{
	// Turn Luxometer ON.
	evothings.ble.writeCharacteristic(
		deviceHandle,
		configCharacteristic.handle,
		new Uint8Array([1]),
		turnOnLuxometerSuccess,
		turnOnLuxometerError)

	// Enable notifications from the Luxometer.
	evothings.ble.enableNotification(
		deviceHandle,
		dataCharacteristic.handle,
		readLuxometerSuccess,
		readLuxometerError)

	function turnOnLuxometerSuccess()
	{
		showMessage('Luxometer is ON')

	}
	function turnOnLuxometerError(error)
	{
		showMessage('Write Luxometer error: ' + error)
	}

	// Called repeatedly until disableNotification is called.
	function readLuxometerSuccess(data)
	{
		var lux = calculateLux(data)
		showMessage('Luxometer value: ' + lux)
	}

	function readLuxometerError(error)
	{
		showMessage('Read Luxometer error: ' + error)
	}
}
69709
function notify() {
    var args = arguments
    handlers.forEach(function(f){ f.apply(null, args) }) }
165443
public void setEnabled(boolean enable) {
        if (enable && !mEnabled) {
            if (DBG) Log.d(TAG, "Notification handler=" + ID + " is now enabled.");
            mEnabled = true;
        } else if (!enable && mEnabled) {
            if (DBG) Log.d(TAG, "Notification handler=" + ID + " is now disabled.");
            mEnabled = false;
            cancelAll();
        }
    }
479130
public function notification($callback) {
    // If there's a notification
    if ($this->hasNotification()) {
      // Execute callback passing the notification
      $this->success = Utilities::executeCallback($callback, [$this->notification]);
    }
    // Return self
    return $this;
  }
1113581
def add_callback(self, callback=None, errorback=None):
        
        self._callback = callback
        self._errorback = errorback