1#include "TestIOServiceUserNotification.h"
2#include <IOKit/IOService.h>
3#include <IOKit/IOUserClient.h>
4#include <IOKit/IOKitServer.h>
5#include <kern/ipc_kobject.h>
6
7#if DEVELOPMENT || DEBUG
8
9OSDefineMetaClassAndStructors(TestIOServiceUserNotification, IOService);
10
11OSDefineMetaClassAndStructors(TestIOServiceUserNotificationUserClient, IOUserClient);
12
13bool
14TestIOServiceUserNotification::start(IOService * provider)
15{
16 OSString * str = OSString::withCStringNoCopy("TestIOServiceUserNotificationUserClient");
17 bool ret = IOService::start(provider);
18 if (ret && str != NULL) {
19 setProperty(gIOUserClientClassKey, str);
20 registerService();
21 }
22 OSSafeReleaseNULL(str);
23 return ret;
24}
25
26
27IOReturn
28TestIOServiceUserNotificationUserClient::clientClose()
29{
30 if (!isInactive()) {
31 terminate();
32 }
33 return kIOReturnSuccess;
34}
35
36IOReturn
37TestIOServiceUserNotificationUserClient::externalMethod(uint32_t selector, IOExternalMethodArguments * args,
38 IOExternalMethodDispatch * dispatch, OSObject * target, void * reference)
39{
40 registerService();
41 return kIOReturnSuccess;
42}
43
44#endif /* DEVELOPMENT || DEBUG */
45