2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Stubs for Parallel and ParallelUnit 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>
22 #include <oop/static_mid.h>
23 #include <hidd/parallel.h>
25 //#include "parallel_intern.h"
30 #include <aros/debug.h>
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
48 /***************************************************************/
50 OOP_Object
* HIDD_Parallel_NewUnit(OOP_Object
*obj
, ULONG unitnum
)
53 struct pHidd_Parallel_NewUnit p
, *msg
= &p
;
55 if(!static_mid
) static_mid
= OOP_GetMethodID(IID_Hidd_Parallel
, moHidd_Parallel_NewUnit
);
60 return((OOP_Object
*) OOP_DoMethod(obj
, (OOP_Msg
) msg
));
62 /***************************************************************/
64 VOID
HIDD_Parallel_DisposeUnit(OOP_Object
*obj
, OOP_Object
*unit
)
67 struct pHidd_Parallel_DisposeUnit p
, *msg
= &p
;
69 if(!static_mid
) static_mid
= OOP_GetMethodID(IID_Hidd_Parallel
, moHidd_Parallel_DisposeUnit
);
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
)
85 struct pHidd_ParallelUnit_Init p
, *msg
= &p
;
87 if(!static_mid
) static_mid
= OOP_GetMethodID(IID_Hidd_ParallelUnit
, moHidd_ParallelUnit_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_ParallelUnit_Write (OOP_Object
*obj
, UBYTE
* data
, ULONG length
)
102 struct pHidd_ParallelUnit_Write p
, *msg
= &p
;
104 if(!static_mid
) static_mid
= OOP_GetMethodID(IID_Hidd_ParallelUnit
, moHidd_ParallelUnit_Write
);
110 return ((ULONG
) OOP_DoMethod(obj
, (OOP_Msg
) msg
));
113 /***************************************************************/
115 VOID
HIDD_ParallelUnit_Start (OOP_Object
*obj
)
118 struct pHidd_ParallelUnit_Start p
, *msg
= &p
;
120 if(!static_mid
) static_mid
= OOP_GetMethodID(IID_Hidd_ParallelUnit
, moHidd_ParallelUnit_Start
);
124 ((VOID
)OOP_DoMethod(obj
, (OOP_Msg
) msg
));
127 /***************************************************************/
129 VOID
HIDD_ParallelUnit_Stop (OOP_Object
*obj
)
132 struct pHidd_ParallelUnit_Stop p
, *msg
= &p
;
134 if(!static_mid
) static_mid
= OOP_GetMethodID(IID_Hidd_ParallelUnit
, moHidd_ParallelUnit_Stop
);
138 ((VOID
) OOP_DoMethod(obj
, (OOP_Msg
) msg
));
141 /***************************************************************/
143 UWORD
HIDD_ParallelUnit_GetStatus(OOP_Object
*obj
)
146 struct pHidd_ParallelUnit_GetStatus p
, *msg
= &p
;
148 if (!static_mid
) static_mid
= OOP_GetMethodID(IID_Hidd_ParallelUnit
, moHidd_ParallelUnit_GetStatus
);
152 return ((UWORD
)OOP_DoMethod(obj
, (OOP_Msg
) msg
));