]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/DeviceOnHold.h
effb404ccb8efd8d7b8c0036144aa4aa7e893045
[apple/configd.git] / SystemConfiguration.fproj / DeviceOnHold.h
1 /*
2 * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23
24 #ifndef _DEVICEONHOLD_H
25 #define _DEVICEONHOLD_H
26
27 #include <sys/cdefs.h>
28 #include <CoreFoundation/CoreFoundation.h>
29
30
31 /*!
32 @enum
33 @discussion Returned status codes from DeviceOnHoldGetStatus()
34
35 @constant kDeviceIdle
36 @constant kDeviceConnecting
37 @constant kDeviceDataConnectionActive
38 @constant kDeviceDataConnectionOnHold
39 @constant kDeviceDisconnecting
40 */
41 enum
42 {
43 kDeviceIdle = 0,
44 kDeviceConnecting,
45 kDeviceDataConnectionActive,
46 kDeviceDataConnectionOnHold,
47 kDeviceDisconnecting
48 };
49
50
51 /*!
52 @typedef DeviceOnHoldRef
53 @discussion This is the handle to a specific device
54 which is used by the DeviceOnHold APIs.
55 */
56 typedef const struct __DeviceOnHoldRef * DeviceOnHoldRef;
57
58
59 __BEGIN_DECLS
60
61
62 /*!
63 @function IsDeviceOnHoldSupported
64 @discussion Determines whether a device has the capability to have
65 a connection placed "on hold".
66
67 This function determines whether the device specified supports
68 the "on hold" capabality.
69
70 @param devname A CFStringRef that represents the device being queried.
71 @param options A CFDictionaryRef of various options for the device.
72 @result TRUE if device supports "on hold".
73
74 */
75 Boolean
76 IsDeviceOnHoldSupported (
77 CFStringRef devname, // e.g. "modem"
78 CFDictionaryRef options
79 );
80
81 /*!
82 @function DeviceOnHoldCreate
83 @discussion Creates a DeviceOnHoldRef for the specified device supports.
84
85 This function creates a DeviceOnHoldRef handle which will be used
86 in all subsequent calls to the "on hold" API's.
87
88 @param allocator A CFAllocatorRef.
89 @param devname A CFStringRef that represents the device being queried.
90 @param options A CFDictionaryRef of various options for the device.
91 @result DeviceOnHoldRef to pass to subsequent device hold api's.
92
93 */
94 DeviceOnHoldRef
95 DeviceOnHoldCreate (
96 CFAllocatorRef allocator,
97 CFStringRef devname, // e.g. "modem"
98 CFDictionaryRef options
99 );
100
101
102 /*!
103 @function DeviceOnHoldGetStatus
104 @discussion Returns the "on hold" status of the device.
105
106 @param deviceRef A DeviceOnHoldRef.
107 @result The status of device.
108
109 */
110 int32_t
111 DeviceOnHoldGetStatus (
112 DeviceOnHoldRef deviceRef
113 );
114
115
116 /*!
117 @function DeviceOnHoldSuspend
118 @discussion Tells the device to go "on hold".
119
120 This function will signal the deviceRef to suspend operations
121
122 @param deviceRef A DeviceOnHoldRef.
123 @result Boolean if call succeeded.
124
125 */
126 Boolean
127 DeviceOnHoldSuspend (
128 DeviceOnHoldRef deviceRef
129 );
130
131 /*!
132 @function DeviceOnHoldResume
133 @discussion Tells the device to resume.
134
135 This function will signal the deviceRef to resume operations
136
137 @param deviceRef A DeviceOnHoldRef.
138 @result Boolean if call succeeded.
139
140 */
141 Boolean
142 DeviceOnHoldResume (
143 DeviceOnHoldRef deviceRef
144 );
145
146 __END_DECLS
147
148 #endif /* _DEVICEONHOLD_H */
149