2 Copyright © 2015-2016, The AROS Development Team. All rights reserved.
6 #include <exec/types.h>
8 #include <proto/exec.h>
11 #include <aros/symbolsets.h>
12 #include <hidd/hidd.h>
14 #include "storage_intern.h"
16 #include LC_LIBDEFS_FILE
19 #include <aros/debug.h>
22 static int Storage_Init(LIBBASETYPEPTR LIBBASE
)
24 struct class_static_data
*csd
= &LIBBASE
->hsi_csd
;
25 struct Library
*OOPBase
= csd
->cs_OOPBase
;
27 D(bug("[HiddStorage] %s()\n", __PRETTY_FUNCTION__
));
29 OOP_Object
*hwroot
= OOP_NewObject(NULL
, CLID_HW_Root
, NULL
);
30 csd
->hwAttrBase
= OOP_ObtainAttrBase(IID_HW
);
32 if (HW_AddDriver(hwroot
, csd
->oopclass
, NULL
))
34 D(bug("[HiddStorage] %s: initialised\n", __PRETTY_FUNCTION__
));
37 D(bug("[HiddStorage] %s: failed\n", __PRETTY_FUNCTION__
));
42 static int Storage_Expunge(LIBBASETYPEPTR LIBBASE
)
44 struct class_static_data
*csd
= &LIBBASE
->hsi_csd
;
46 struct Library
*OOPBase
= csd
->cs_OOPBase
;
48 D(bug("[HiddStorage] %s(csd=%p)\n", __PRETTY_FUNCTION__
, csd
));
53 ADD2INITLIB(Storage_Init
, -2)
54 ADD2EXPUNGELIB(Storage_Expunge
, -2)