]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
ff6e181a A |
6 | * This file contains Original Code and/or Modifications of Original Code |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. Please obtain a copy of the License at | |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
11 | * file. | |
1c79356b | 12 | * |
ff6e181a A |
13 | * The Original Code and all software distributed under the License are |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
ff6e181a A |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
18 | * Please see the License for the specific language governing rights and | |
19 | * limitations under the License. | |
1c79356b A |
20 | * |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
23 | /* | |
24 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | |
25 | * | |
26 | * HISTORY | |
27 | * | |
28 | */ | |
29 | ||
30 | #ifndef __OS_OSMESSAGENOTIFICATION_H | |
31 | #define __OS_OSMESSAGENOTIFICATION_H | |
32 | ||
33 | #ifdef __cplusplus | |
34 | extern "C" { | |
35 | #endif | |
36 | ||
37 | #include <mach/mach_types.h> | |
38 | #include <IOKit/IOReturn.h> | |
39 | ||
40 | enum { | |
41 | kFirstIOKitNotificationType = 100, | |
42 | kIOServicePublishNotificationType = 100, | |
43 | kIOServiceMatchedNotificationType = 101, | |
44 | kIOServiceTerminatedNotificationType = 102, | |
45 | kIOAsyncCompletionNotificationType = 150, | |
46 | kIOServiceMessageNotificationType = 160, | |
47 | kLastIOKitNotificationType = 199 | |
48 | }; | |
49 | ||
50 | enum { | |
51 | kOSNotificationMessageID = 53, | |
52 | kOSAsyncCompleteMessageID = 57, | |
53 | kMaxAsyncArgs = 16 | |
54 | }; | |
55 | ||
56 | enum { | |
57 | kIOAsyncReservedIndex = 0, | |
58 | kIOAsyncReservedCount, | |
59 | ||
60 | kIOAsyncCalloutFuncIndex = kIOAsyncReservedCount, | |
61 | kIOAsyncCalloutRefconIndex, | |
62 | kIOAsyncCalloutCount, | |
63 | ||
64 | kIOMatchingCalloutFuncIndex = kIOAsyncReservedCount, | |
65 | kIOMatchingCalloutRefconIndex, | |
66 | kIOMatchingCalloutCount, | |
67 | ||
68 | kIOInterestCalloutFuncIndex = kIOAsyncReservedCount, | |
69 | kIOInterestCalloutRefconIndex, | |
70 | kIOInterestCalloutServiceIndex, | |
71 | kIOInterestCalloutCount | |
72 | }; | |
73 | ||
74 | enum { | |
75 | kOSAsyncRefCount = 8, | |
76 | kOSAsyncRefSize = 32 | |
77 | }; | |
78 | typedef natural_t OSAsyncReference[kOSAsyncRefCount]; | |
79 | ||
80 | struct OSNotificationHeader { | |
81 | vm_size_t size; /* content size */ | |
82 | natural_t type; | |
83 | OSAsyncReference reference; | |
91447636 A |
84 | |
85 | #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) | |
86 | unsigned char content[]; | |
87 | #else | |
1c79356b | 88 | unsigned char content[0]; |
91447636 | 89 | #endif |
1c79356b A |
90 | }; |
91 | ||
92 | struct IOServiceInterestContent { | |
93 | natural_t messageType; | |
94 | void * messageArgument[1]; | |
95 | }; | |
96 | ||
97 | struct IOAsyncCompletionContent { | |
98 | IOReturn result; | |
91447636 A |
99 | #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) |
100 | void * args[]; | |
101 | #else | |
1c79356b | 102 | void * args[0]; |
91447636 | 103 | #endif |
1c79356b A |
104 | }; |
105 | ||
106 | #ifndef __cplusplus | |
107 | typedef struct OSNotificationHeader OSNotificationHeader; | |
108 | typedef struct IOServiceInterestContent IOServiceInterestContent; | |
109 | typedef struct IOAsyncCompletionContent IOAsyncCompletionContent; | |
110 | #endif | |
111 | ||
112 | #ifdef __cplusplus | |
113 | } | |
114 | #endif | |
115 | ||
116 | #endif /* __OS_OSMESSAGENOTIFICATION_H */ | |
117 |