|
|
1.1 ! root 1: Adb Device pseudocode ! 2: ! 3: ADB Keyboard ! 4: ! 5: + probe : directDevice ! 6: { ! 7: /* ! 8: * We want to locate each keyboard, move each one up to a soft ! 9: * address, and create an instance for each one. ! 10: */ ! 11: create an AdbKeyboard client; ! 12: for(address=0 to max keyboard address) { ! 13: attachDevice(address, client); ! 14: do { ! 15: error = do a talk register 3; ! 16: if it works and if it's a keyboard { ! 17: newAddress = getSoftAddress(); ! 18: attachDevice(newAddress, client); ! 19: relocate to newAddress; ! 20: AdbKeyboardInit(address, newAddress); ! 21: create a new client; ! 22: } ! 23: } while(!error); ! 24: detachDevice(address); ! 25: } ! 26: } ! 27: ! 28: - AdbKeyboardInit(oldAddress, currentAddress) ! 29: { ! 30: get handlerId; ! 31: if we know about it { ! 32: save ptr to map? ! 33: } ! 34: else { ! 35: log error; ! 36: what else? ! 37: } ! 38: detachDevice(oldAddress, self); ! 39: } ! 40: ! 41: /* ! 42: * Standard AdbClient methods. ! 43: */ ! 44: - (void)sendAdbData : (adbEvent *)event ! 45: { ! 46: ! 47: } ! 48: ! 49: /* ! 50: * Called on ADB bus reset. ! 51: */ ! 52: - (void)adbBusWasReset ! 53: { ! 54: ! 55: } ! 56:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.