disable debug
[AROS.git] / workbench / hidds / parallel / parallel_stubs.c
blobc4935dc222b99bf4afe26e688bf268c7818fef52
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Stubs for Parallel and ParallelUnit 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 <oop/static_mid.h>
23 #include <hidd/parallel.h>
25 //#include "parallel_intern.h"
27 #undef SDEBUG
28 #undef DEBUG
29 #define DEBUG 0
30 #include <aros/debug.h>
32 #undef OOPBase
33 #define OOPBase ((struct Library *)OOP_OCLASS(obj)->OOPBasePtr)
35 /* A small utility function for using varargs when setting attrs */
37 #ifndef OOP_SetAttrsTags
38 #warning OOP_SetAttrsTags is defined in inline/oop.h
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_Parallel_NewUnit(OOP_Object *obj, ULONG unitnum)
52 STATIC_MID;
53 struct pHidd_Parallel_NewUnit p, *msg = &p;
55 if(!static_mid) static_mid = OOP_GetMethodID(IID_Hidd_Parallel, moHidd_Parallel_NewUnit);
57 p.mID = static_mid;
58 p.unitnum = unitnum;
60 return((OOP_Object *) OOP_DoMethod(obj, (OOP_Msg) msg));
62 /***************************************************************/
64 VOID HIDD_Parallel_DisposeUnit(OOP_Object *obj, OOP_Object *unit)
66 STATIC_MID;
67 struct pHidd_Parallel_DisposeUnit p, *msg = &p;
69 if(!static_mid) static_mid = OOP_GetMethodID(IID_Hidd_Parallel, moHidd_Parallel_DisposeUnit);
71 p.mID = static_mid;
72 p.unit = unit;
74 OOP_DoMethod(obj, (OOP_Msg) msg);
80 /********************** Stubs for parallel unit **********************/
82 BOOL HIDD_ParallelUnit_Init(OOP_Object *obj, VOID * DataReceived, VOID * DataReceivedUserData, VOID * WriteData, VOID * WriteDataUserData)
84 STATIC_MID;
85 struct pHidd_ParallelUnit_Init p, *msg = &p;
87 if(!static_mid) static_mid = OOP_GetMethodID(IID_Hidd_ParallelUnit, moHidd_ParallelUnit_Init);
89 p.mID = static_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_ParallelUnit_Write (OOP_Object *obj, UBYTE * data, ULONG length)
101 STATIC_MID;
102 struct pHidd_ParallelUnit_Write p, *msg = &p;
104 if(!static_mid) static_mid = OOP_GetMethodID(IID_Hidd_ParallelUnit, moHidd_ParallelUnit_Write);
106 p.mID = static_mid;
107 p.Length = length;
108 p.Outbuffer = data;
110 return ((ULONG) OOP_DoMethod(obj, (OOP_Msg) msg));
113 /***************************************************************/
115 VOID HIDD_ParallelUnit_Start (OOP_Object *obj)
117 STATIC_MID;
118 struct pHidd_ParallelUnit_Start p, *msg = &p;
120 if(!static_mid) static_mid = OOP_GetMethodID(IID_Hidd_ParallelUnit, moHidd_ParallelUnit_Start);
122 p.mID = static_mid;
124 ((VOID)OOP_DoMethod(obj, (OOP_Msg) msg));
127 /***************************************************************/
129 VOID HIDD_ParallelUnit_Stop (OOP_Object *obj)
131 STATIC_MID;
132 struct pHidd_ParallelUnit_Stop p, *msg = &p;
134 if(!static_mid) static_mid = OOP_GetMethodID(IID_Hidd_ParallelUnit, moHidd_ParallelUnit_Stop);
136 p.mID = static_mid;
138 ((VOID) OOP_DoMethod(obj, (OOP_Msg) msg));
141 /***************************************************************/
143 UWORD HIDD_ParallelUnit_GetStatus(OOP_Object *obj)
145 STATIC_MID;
146 struct pHidd_ParallelUnit_GetStatus p, *msg = &p;
148 if (!static_mid) static_mid = OOP_GetMethodID(IID_Hidd_ParallelUnit, moHidd_ParallelUnit_GetStatus);
150 p.mID = static_mid;
152 return ((UWORD)OOP_DoMethod(obj, (OOP_Msg) msg));