|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: /* @(#)voldev.h 2.0 03/19/90 (c) 1990 NeXT */
26:
27: /*
28: * HISTORY
29: * 19-Sep-90 Doug Mitchell
30: * Added prototype for vol_notify_cancel.
31: * 03-20-90 Doug Mitchell at NeXT
32: * Created.
33: */
34:
35: #ifdef DRIVER_PRIVATE
36:
37: #ifndef _VOLDEV_
38: #define _VOLDEV_
39:
40: #import <sys/types.h>
41: #import <mach/kern_return.h>
42: #import <kernserv/insertmsg.h>
43: #if KERNEL_PRIVATE
44: #import <kern/kern_port.h>
45: #endif /* KERNEL_PRIVATE */
46:
47: typedef void (*vpt_func)(void *param, int tag, int response_value);
48:
49: /*
50: * Public Functions
51: */
52: kern_return_t vol_notify_dev(dev_t block_dev,
53: dev_t raw_dev,
54: const char *form_type,
55: int vol_state, /* IND_VS_LABEL, etc. */
56: const char *dev_str,
57: int flags);
58: void vol_notify_cancel(dev_t device);
59: kern_return_t vol_panel_request(vpt_func fnc,
60: int panel_type, /* PR_PT_DISK_NUM, etc. */
61: int response_type, /* PR_RT_ACK, atc. */
62: int p1,
63: int p2,
64: int p3,
65: int p4,
66: char *string1,
67: char *string2,
68: void *param,
69: int *tag); /* RETURNED */
70: kern_return_t vol_panel_disk_num(vpt_func fnc,
71: int volume_num,
72: int drive_type, /* PR_DRIVE_FLOPPY, etc. */
73: int drive_num,
74: void *param,
75: boolean_t wrong_disk,
76: int *tag); /* RETURNED */
77: kern_return_t vol_panel_disk_label(vpt_func fnc,
78: char *label,
79: int drive_type, /* PR_DRIVE_FLOPPY, etc. */
80: int drive_num,
81: void *param,
82: boolean_t wrong_disk,
83: int *tag); /* RETURNED */
84: kern_return_t vol_panel_remove(int tag);
85:
86: #ifndef NULL
87: #define NULL 0
88: #endif /* NULL */
89:
90: #ifdef KERNEL_PRIVATE
91: /*
92: * Not used by driverkit-style drivers.
93: */
94: extern kern_port_t panel_req_port; /* PORT_NULL if no port to
95: * which to send panel requests
96: * has been registered */
97: #endif /* KERNEL_PRIVATE */
98:
99: #if SUPPORT_PORT_DEVICE
100:
101: kern_return_t vol_notify_port(kern_port_t dev_port,
102: char *form_type,
103: int vol_state, /* IND_VS_LABEL, etc. */
104: int flags);
105:
106: #endif /* SUPPORT_PORT_DEVICE */
107:
108:
109: #endif /* _VOLDEV_ */
110:
111: /*
112: * Support for manual "disk present" polling. Normally drives are polled
113: * by the volCheck module once per second, but if the driver returns YES
114: * for the needsManualPolling method, its drive will only be polled once
115: * for each time the DKIOCCHECKINSERT ioctl is executed on the vol
116: * driver.
117: */
118:
119: /*
120: * Returns 1 if DKIOCCHECKINSERT has been executed since the last call,
121: * else returns 0.
122: */
123: int vol_check_manual_poll();
124:
125: /*
126: * Internal version of ioctl(DKIOCCHECKINSERT).
127: */
128: void vol_check_set_poll();
129:
130: #endif /* DRIVER_PRIVATE */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.