Lines Matching refs:Which
73 * @param {GnubbyDeviceId} which The device to remove.
75 Gnubbies.prototype.removeOpenDevice = function(which) {
76 if (this.openDevs_[which.namespace] &&
77 this.openDevs_[which.namespace].hasOwnProperty(which.device)) {
78 delete this.openDevs_[which.namespace][which.device];
237 * @param {GnubbyDeviceId} which Which device to open.
242 Gnubbies.prototype.addClient = function(which, who, cb) {
259 if (self.pendingOpens_[which.namespace]) {
260 while (self.pendingOpens_[which.namespace][which.device].length != 0) {
261 var client = self.pendingOpens_[which.namespace][which.device].shift();
264 delete self.pendingOpens_[which.namespace][which.device];
269 var deviceToDeviceId = this.impl_[which.namespace].deviceToDeviceId;
270 if (this.devs_[which.namespace]) {
271 for (var i = 0; i < this.devs_[which.namespace].length; i++) {
272 var device = this.devs_[which.namespace][i];
273 if (deviceToDeviceId(device).device == which.device) {
296 if (!self.openDevs_[which.namespace]) {
297 self.openDevs_[which.namespace] = {};
299 self.openDevs_[which.namespace][which.device] = gnubby;
300 while (self.pendingOpens_[which.namespace][which.device].length != 0) {
301 var client = self.pendingOpens_[which.namespace][which.device].shift();
304 delete self.pendingOpens_[which.namespace][which.device];
307 if (this.openDevs_[which.namespace] &&
308 this.openDevs_[which.namespace].hasOwnProperty(which.device)) {
309 var gnubby = this.openDevs_[which.namespace][which.device];
313 if (!this.pendingOpens_.hasOwnProperty(which.namespace)) {
314 this.pendingOpens_[which.namespace] = {};
316 if (this.pendingOpens_[which.namespace].hasOwnProperty(which.device)) {
317 this.pendingOpens_[which.namespace][which.device].push(opener);
319 this.pendingOpens_[which.namespace][which.device] = [opener];
320 var openImpl = this.impl_[which.namespace].open;
321 openImpl(this, which.device, dev, openCb);