Show lock notification for specified device object.
779306
def device_locked(self, device):
        """"""
        if not self._mounter.is_handleable(device):
            return
        self._show_notification(
            'device_locked',
            _('Device locked'),
            _('{0.device_presentation} locked', device),
            device.icon_name)
494429
function notifyRetroactively(object) {
  if (object && typeof object === 'object') {
    const type = 'add';
    var notifier = Object.getNotifier(object);
    keys(object).forEach(name => notifier.notify({type, name, object}));
  }
  return object;
}
648222
def is_notifying(cls, user_or_email, instance):
        """"""
        return super(InstanceEvent, cls).is_notifying(user_or_email,
                                                      object_id=instance.pk)
701686
def _notify_trace(self, device_uuid, event_name, trace):
        

        if device_uuid not in self._connections:
            self._logger.debug("Dropping trace data for device without an active connection, uuid=0x%X", device_uuid)
            return

        conn_data = self._connections[device_uuid]
        last_trace = conn_data['last_trace']
        now = monotonic()

        conn_data['trace_accum'] += bytes(trace)

        # If we're throttling tracing data, we need to see if we should accumulate this trace or
        # send it now.  We acculumate if we've last sent tracing data less than self.throttle_trace seconds ago
        if last_trace is not None and (now - last_trace) < self.throttle_trace:
            if not conn_data['trace_scheduled']:
                self._loop.call_later(self.throttle_trace - (now - last_trace), self._send_accum_trace, device_uuid)
                conn_data['trace_scheduled'] = True
                self._logger.debug("Deferring trace data due to throttling uuid=0x%X", device_uuid)
        else:
            self._send_accum_trace(device_uuid)
852206
def _notify(p, **data):
    """"""
    message = data.get("message")
    if not message and not sys.stdin.isatty():
        message = click.get_text_stream("stdin").read()
    data["message"] = message

    data = clean_data(data)

    ctx = click.get_current_context()
    if ctx.obj.get("env_prefix"):
        data["env_prefix"] = ctx.obj["env_prefix"]

    rsp = p.notify(**data)
    rsp.raise_on_errors()
    click.secho(f"Succesfully sent a notification to {p.name}!", fg="green")
1195068
def get_alarm(self, area='1', refresh=False):
        """"""
        if self._devices is None:
            self.get_devices()
            refresh = False

        return self.get_device(CONST.ALARM_DEVICE_ID + area, refresh)
133841
def notify(self, value):
        
        value = int(value)

        with self.lock:
            self.value += value
831461
def _on_scan(_loop, adapter, _adapter_id, info, expiration_time):
    """"""

    info['validity_period'] = expiration_time
    adapter.notify_event_nowait(info.get('connection_string'), 'device_seen', info)
326675
def get_notification(self, notification_id, **params):
        """"""
        response = self._get('v2', 'notifications', notification_id, params=params)
        return self._make_api_object(response, Notification)
1050322
def notify(self, n=1):
        
        if not is_locked(self._lock):
            raise RuntimeError('lock is not locked')
        notified = [0]  # Work around lack of "nonlocal" in py27
        def walker(switcher, predicate):
            if not switcher.active:
                return False  # not not keep switcher that timed out
            if predicate and not predicate():
                return True
            if n >= 0 and notified[0] >= n:
                return True
            switcher.switch()
            notified[0] += 1
            return False  # only notify once
        walk_callbacks(self, walker)
1304316
def notify(self, num=1):
        
        if not self._is_owned():
            raise RuntimeError("cannot wait on un-acquired lock")
        for i in xrange(min(num, len(self._waiters))):
            scheduler.state.awoken_from_events.add(self._waiters.popleft()[0])
846193
def openNotification(self):
        '''
        
        '''

        # the tablet has a different Notification/Quick Settings bar depending on x
        w13 = self.device.display['width'] / 3
        s = (w13, 0)
        e = (w13, self.device.display['height']/2)
        self.device.drag(s, e, 500, 20, -1)
        self.vc.sleep(1)
        self.vc.dump(-1)
898226
def notificationResponse():
    """"""
    a = TpPd(pd=0x6)
    b = MessageType(mesType=0x26)  # 00100110
    c = MobileStationClassmark2()
    d = MobileId()
    e = DescriptiveGroupOrBroadcastCallReference()
    packet = a / b / c / d / e
    return packet
1312269
def notificationNch():
    """"""
    a = L2PseudoLength(l2pLength=0x01)
    b = TpPd(pd=0x6)
    c = MessageType(mesType=0x20)  # 00100000
    d = NtNRestOctets()
    packet = a / b / c / d
    return packet
757343
def _unlock(self):
        """"""
        if self.locked:
            self.device.cu.unlock()
            self.locked = False
440448
def wrap_notification(self, data):
        """"""
        if "method" in data:
            method = data["method"]
            params = data["params"]
            change = params[0]
            if method == "notifyPowerStatus":
                return PowerChange.make(**change)
            elif method == "notifyVolumeInformation":
                return VolumeChange.make(**change)
            elif method == "notifyPlayingContentInfo":
                return ContentChange.make(**change)
            elif method == "notifySettingsUpdate":
                return SettingChange.make(**change)
            elif method == "notifySWUpdateInfo":
                return SoftwareUpdateChange.make(**change)
            else:
                _LOGGER.warning("Got unknown notification type: %s", method)
        elif "result" in data:
            result = data["result"][0]
            if "enabled" in result and "enabled" in result:
                return NotificationChange(**result)
        else:
            _LOGGER.warning("Unknown notification, returning raw: %s", data)
            return data
1249513
def _unlock(self):
        """"""
        if self.locked:
            try:
                self.device.cu.unlock()
                self.locked = False
            except JnrpUnlockError as jue:
                raise UnlockError(jue.messsage)