102ce23a1SMichael Lotz/*
202ce23a1SMichael Lotz * Copyright 2006, Haiku Inc. All rights reserved.
302ce23a1SMichael Lotz * Distributed under the terms of the MIT License.
402ce23a1SMichael Lotz *
502ce23a1SMichael Lotz * Authors:
602ce23a1SMichael Lotz *		Michael Lotz <mmlr@mlotz.ch>
702ce23a1SMichael Lotz */
802ce23a1SMichael Lotz
9853e6be8SMichael Lotz#include "usb_private.h"
105b0ec61fSMichael Lotz
115b0ec61fSMichael Lotz
128fedfdfcSMichael LotzObject::Object(Stack *stack, BusManager *bus)
138fedfdfcSMichael Lotz	:	fParent(NULL),
148fedfdfcSMichael Lotz		fBusManager(bus),
158fedfdfcSMichael Lotz		fStack(stack),
16ffe3f107SMichael Lotz		fUSBID(fStack->GetUSBID(this))
175b0ec61fSMichael Lotz{
185b0ec61fSMichael Lotz}
198fedfdfcSMichael Lotz
208fedfdfcSMichael Lotz
218fedfdfcSMichael LotzObject::Object(Object *parent)
228fedfdfcSMichael Lotz	:	fParent(parent),
238fedfdfcSMichael Lotz		fBusManager(parent->GetBusManager()),
248fedfdfcSMichael Lotz		fStack(parent->GetStack()),
258fedfdfcSMichael Lotz		fUSBID(fStack->GetUSBID(this))
268fedfdfcSMichael Lotz{
278fedfdfcSMichael Lotz}
288fedfdfcSMichael Lotz
298fedfdfcSMichael Lotz
308fedfdfcSMichael LotzObject::~Object()
318fedfdfcSMichael Lotz{
328fedfdfcSMichael Lotz	fStack->PutUSBID(fUSBID);
338fedfdfcSMichael Lotz}
348fedfdfcSMichael Lotz
358fedfdfcSMichael Lotz
368fedfdfcSMichael Lotzstatus_t
378fedfdfcSMichael LotzObject::SetFeature(uint16 selector)
388fedfdfcSMichael Lotz{
398fedfdfcSMichael Lotz	// to be implemented in subclasses
40f14fe767SMichael Lotz	TRACE_ERROR("set feature called\n");
418fedfdfcSMichael Lotz	return B_ERROR;
428fedfdfcSMichael Lotz}
438fedfdfcSMichael Lotz
448fedfdfcSMichael Lotz
458fedfdfcSMichael Lotzstatus_t
468fedfdfcSMichael LotzObject::ClearFeature(uint16 selector)
478fedfdfcSMichael Lotz{
488fedfdfcSMichael Lotz	// to be implemented in subclasses
49f14fe767SMichael Lotz	TRACE_ERROR("clear feature called\n");
508fedfdfcSMichael Lotz	return B_ERROR;
518fedfdfcSMichael Lotz}
528fedfdfcSMichael Lotz
538fedfdfcSMichael Lotz
548fedfdfcSMichael Lotzstatus_t
558fedfdfcSMichael LotzObject::GetStatus(uint16 *status)
568fedfdfcSMichael Lotz{
578fedfdfcSMichael Lotz	// to be implemented in subclasses
58f14fe767SMichael Lotz	TRACE_ERROR("get status called\n");
598fedfdfcSMichael Lotz	return B_ERROR;
608fedfdfcSMichael Lotz}
61