Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / hidds / tap / tap_stubs.c
blob434ea7d14dea77bea95b396fb5950b183db07aba
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Stubs for Tap and TapUnit class
6 Lang: english
7 */
9 #ifndef AROS_USE_OOP
10 # define AROS_USE_OOP
11 #endif
13 #include <aros/config.h>
14 #include <exec/types.h>
15 #include <exec/libraries.h>
17 #include <proto/oop.h>
19 #include <utility/tagitem.h>
21 #include <oop/oop.h>
22 #include <hidd/tap.h>
24 #undef SDEBUG
25 #undef DEBUG
26 #define DEBUG 0
27 #include <aros/debug.h>
29 #undef OOPBase
30 #define OOPBase ((struct Library *)OOP_OCLASS(obj)->OOPBasePtr)
32 #define STATIC_MID static OOP_MethodID mid
34 /* A small utility function for using varargs when setting attrs */
36 #warning OOP_SetAttrsTags is defined in inline/oop.h
38 #ifndef OOP_SetAttrsTags
39 IPTR OOP_SetAttrsTags(OOP_Object *obj, IPTR tag1, ...)
41 AROS_SLOWSTACKTAGS_PRE(tag1)
42 retval = OOP_SetAttrs(obj, AROS_SLOWSTACKTAGS_ARG(tag1));
43 AROS_SLOWSTACKTAGS_POST
46 #endif
48 /***************************************************************/
50 OOP_Object * HIDD_Tap_NewUnit(OOP_Object *obj, ULONG unitnum)
52 STATIC_MID;
53 struct pHidd_Tap_NewUnit p, *msg = &p;
55 if(!mid) mid = OOP_GetMethodID(IID_Hidd_Tap, moHidd_Tap_NewUnit);
57 p.mID = mid;
58 p.unitnum = unitnum;
60 return((OOP_Object *) OOP_DoMethod(obj, (OOP_Msg) msg));
62 /***************************************************************/
64 VOID HIDD_Tap_DisposeUnit(OOP_Object *obj, OOP_Object *unit)
66 STATIC_MID;
67 struct pHidd_Tap_DisposeUnit p, *msg = &p;
69 if(!mid) mid = OOP_GetMethodID(IID_Hidd_Tap, moHidd_Tap_DisposeUnit);
71 p.mID = mid;
72 p.unit = unit;
74 OOP_DoMethod(obj, (OOP_Msg) msg);
80 /********************** Stubs for tap unit **********************/
82 BOOL HIDD_TapUnit_Init(OOP_Object *obj, VOID * DataReceived, VOID * DataReceivedUserData, VOID * WriteData, VOID * WriteDataUserData)
84 STATIC_MID;
85 struct pHidd_TapUnit_Init p, *msg = &p;
87 if(!mid) mid = OOP_GetMethodID(IID_Hidd_TapUnit, moHidd_TapUnit_Init);
89 p.mID = mid;
90 p.DataReceived = DataReceived;
91 p.DataReceivedUserData = DataReceivedUserData;
92 p.WriteData = WriteData;
93 p.WriteDataUserData = WriteDataUserData;
95 return((BOOL) OOP_DoMethod(obj, (OOP_Msg) msg));
97 /***************************************************************/
99 ULONG HIDD_TapUnit_Write (OOP_Object *obj, UBYTE * data, ULONG length)
101 STATIC_MID;
102 struct pHidd_TapUnit_Write p, *msg = &p;
104 if(!mid) mid = OOP_GetMethodID(IID_Hidd_TapUnit, moHidd_TapUnit_Write);
106 p.mID = mid;
107 p.Length = length;
108 p.Outbuffer = data;
110 return ((ULONG) OOP_DoMethod(obj, (OOP_Msg) msg));
113 /***************************************************************/
115 VOID HIDD_TapUnit_Start (OOP_Object *obj)
117 STATIC_MID;
118 struct pHidd_TapUnit_Start p, *msg = &p;
120 if(!mid) mid = OOP_GetMethodID(IID_Hidd_TapUnit, moHidd_TapUnit_Start);
122 p.mID = mid;
124 ((VOID)OOP_DoMethod(obj, (OOP_Msg) msg));
127 /***************************************************************/
129 VOID HIDD_TapUnit_Stop (OOP_Object *obj)
131 STATIC_MID;
132 struct pHidd_TapUnit_Stop p, *msg = &p;
134 if(!mid) mid = OOP_GetMethodID(IID_Hidd_TapUnit, moHidd_TapUnit_Stop);
136 p.mID = mid;
138 ((VOID) OOP_DoMethod(obj, (OOP_Msg) msg));
141 /***************************************************************/
143 UWORD HIDD_TapUnit_GetStatus(OOP_Object *obj)
145 STATIC_MID;
146 struct pHidd_TapUnit_GetStatus p, *msg = &p;
148 if (!mid) mid = OOP_GetMethodID(IID_Hidd_TapUnit, moHidd_TapUnit_GetStatus);
150 p.mID = mid;
152 return ((UWORD)OOP_DoMethod(obj, (OOP_Msg) msg));