1 /* 2 * Copyright 2006, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Michael Lotz <mmlr@mlotz.ch> 7 */ 8 9 #include "usb_p.h" 10 11 12 Object::Object(Stack *stack, BusManager *bus) 13 : fParent(NULL), 14 fBusManager(bus), 15 fStack(stack), 16 fUSBID(fStack->GetUSBID(this)) 17 { 18 } 19 20 21 Object::Object(Object *parent) 22 : fParent(parent), 23 fBusManager(parent->GetBusManager()), 24 fStack(parent->GetStack()), 25 fUSBID(fStack->GetUSBID(this)) 26 { 27 } 28 29 30 Object::~Object() 31 { 32 fStack->PutUSBID(fUSBID); 33 } 34 35 36 status_t 37 Object::SetFeature(uint16 selector) 38 { 39 // to be implemented in subclasses 40 TRACE_ERROR("set feature called\n"); 41 return B_ERROR; 42 } 43 44 45 status_t 46 Object::ClearFeature(uint16 selector) 47 { 48 // to be implemented in subclasses 49 TRACE_ERROR("clear feature called\n"); 50 return B_ERROR; 51 } 52 53 54 status_t 55 Object::GetStatus(uint16 *status) 56 { 57 // to be implemented in subclasses 58 TRACE_ERROR("get status called\n"); 59 return B_ERROR; 60 } 61