2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Stubs for Tap and TapUnit class
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>
27 #include <aros/debug.h>
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
48 /***************************************************************/
50 OOP_Object
* HIDD_Tap_NewUnit(OOP_Object
*obj
, ULONG unitnum
)
53 struct pHidd_Tap_NewUnit p
, *msg
= &p
;
55 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Tap
, moHidd_Tap_NewUnit
);
60 return((OOP_Object
*) OOP_DoMethod(obj
, (OOP_Msg
) msg
));
62 /***************************************************************/
64 VOID
HIDD_Tap_DisposeUnit(OOP_Object
*obj
, OOP_Object
*unit
)
67 struct pHidd_Tap_DisposeUnit p
, *msg
= &p
;
69 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_Tap
, moHidd_Tap_DisposeUnit
);
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
)
85 struct pHidd_TapUnit_Init p
, *msg
= &p
;
87 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_TapUnit
, moHidd_TapUnit_Init
);
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
)
102 struct pHidd_TapUnit_Write p
, *msg
= &p
;
104 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_TapUnit
, moHidd_TapUnit_Write
);
110 return ((ULONG
) OOP_DoMethod(obj
, (OOP_Msg
) msg
));
113 /***************************************************************/
115 VOID
HIDD_TapUnit_Start (OOP_Object
*obj
)
118 struct pHidd_TapUnit_Start p
, *msg
= &p
;
120 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_TapUnit
, moHidd_TapUnit_Start
);
124 ((VOID
)OOP_DoMethod(obj
, (OOP_Msg
) msg
));
127 /***************************************************************/
129 VOID
HIDD_TapUnit_Stop (OOP_Object
*obj
)
132 struct pHidd_TapUnit_Stop p
, *msg
= &p
;
134 if(!mid
) mid
= OOP_GetMethodID(IID_Hidd_TapUnit
, moHidd_TapUnit_Stop
);
138 ((VOID
) OOP_DoMethod(obj
, (OOP_Msg
) msg
));
141 /***************************************************************/
143 UWORD
HIDD_TapUnit_GetStatus(OOP_Object
*obj
)
146 struct pHidd_TapUnit_GetStatus p
, *msg
= &p
;
148 if (!mid
) mid
= OOP_GetMethodID(IID_Hidd_TapUnit
, moHidd_TapUnit_GetStatus
);
152 return ((UWORD
)OOP_DoMethod(obj
, (OOP_Msg
) msg
));