]> git.saurik.com Git - apple/xnu.git/blame_incremental - iokit/IOKit/OSMessageNotification.h
xnu-792.6.56.tar.gz
[apple/xnu.git] / iokit / IOKit / OSMessageNotification.h
... / ...
CommitLineData
1/*
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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.
12 *
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
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
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.
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
34extern "C" {
35#endif
36
37#include <mach/mach_types.h>
38#include <IOKit/IOReturn.h>
39
40enum {
41 kFirstIOKitNotificationType = 100,
42 kIOServicePublishNotificationType = 100,
43 kIOServiceMatchedNotificationType = 101,
44 kIOServiceTerminatedNotificationType = 102,
45 kIOAsyncCompletionNotificationType = 150,
46 kIOServiceMessageNotificationType = 160,
47 kLastIOKitNotificationType = 199
48};
49
50enum {
51 kOSNotificationMessageID = 53,
52 kOSAsyncCompleteMessageID = 57,
53 kMaxAsyncArgs = 16
54};
55
56enum {
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
74enum {
75 kOSAsyncRefCount = 8,
76 kOSAsyncRefSize = 32
77};
78typedef natural_t OSAsyncReference[kOSAsyncRefCount];
79
80struct OSNotificationHeader {
81 vm_size_t size; /* content size */
82 natural_t type;
83 OSAsyncReference reference;
84
85#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
86 unsigned char content[];
87#else
88 unsigned char content[0];
89#endif
90};
91
92struct IOServiceInterestContent {
93 natural_t messageType;
94 void * messageArgument[1];
95};
96
97struct IOAsyncCompletionContent {
98 IOReturn result;
99#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
100 void * args[];
101#else
102 void * args[0];
103#endif
104};
105
106#ifndef __cplusplus
107typedef struct OSNotificationHeader OSNotificationHeader;
108typedef struct IOServiceInterestContent IOServiceInterestContent;
109typedef struct IOAsyncCompletionContent IOAsyncCompletionContent;
110#endif
111
112#ifdef __cplusplus
113}
114#endif
115
116#endif /* __OS_OSMESSAGENOTIFICATION_H */
117