]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/DeviceOnHold.h
configd-84.6.tar.gz
[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 * 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
25 #ifndef _DEVICEONHOLD_H
26 #define _DEVICEONHOLD_H
27
28 #include <sys/cdefs.h>
29 #include <CoreFoundation/CoreFoundation.h>
30
31
32 /*!
33 @enum
34 @discussion Returned status codes from DeviceOnHoldGetStatus()
35
36 @constant kDeviceIdle
37 @constant kDeviceConnecting
38 @constant kDeviceDataConnectionActive
39 @constant kDeviceDataConnectionOnHold
40 @constant kDeviceDisconnecting
41 */
42 enum
43 {
44 kDeviceIdle = 0,
45 kDeviceConnecting,
46 kDeviceDataConnectionActive,
47 kDeviceDataConnectionOnHold,
48 kDeviceDisconnecting
49 };
50
51
52 /*!
53 @typedef DeviceOnHoldRef
54 @discussion This is the handle to a specific device
55 which is used by the DeviceOnHold APIs.
56 */
57 typedef const struct __DeviceOnHoldRef * DeviceOnHoldRef;
58
59
60 __BEGIN_DECLS
61
62
63 /*!
64 @function IsDeviceOnHoldSupported
65 @discussion Determines whether a device has the capability to have
66 a connection placed "on hold".
67
68 This function determines whether the device specified supports
69 the "on hold" capabality.
70
71 @param devname A CFStringRef that represents the device being queried.
72 @param options A CFDictionaryRef of various options for the device.
73 @result TRUE if device supports "on hold".
74
75 */
76 Boolean
77 IsDeviceOnHoldSupported (
78 CFStringRef devname, // e.g. "modem"
79 CFDictionaryRef options
80 );
81
82 /*!
83 @function DeviceOnHoldCreate
84 @discussion Creates a DeviceOnHoldRef for the specified device supports.
85
86 This function creates a DeviceOnHoldRef handle which will be used
87 in all subsequent calls to the "on hold" API's.
88
89 @param allocator A CFAllocatorRef.
90 @param devname A CFStringRef that represents the device being queried.
91 @param options A CFDictionaryRef of various options for the device.
92 @result DeviceOnHoldRef to pass to subsequent device hold api's.
93
94 */
95 DeviceOnHoldRef
96 DeviceOnHoldCreate (
97 CFAllocatorRef allocator,
98 CFStringRef devname, // e.g. "modem"
99 CFDictionaryRef options
100 );
101
102
103 /*!
104 @function DeviceOnHoldGetStatus
105 @discussion Returns the "on hold" status of the device.
106
107 @param deviceRef A DeviceOnHoldRef.
108 @result The status of device.
109
110 */
111 int32_t
112 DeviceOnHoldGetStatus (
113 DeviceOnHoldRef deviceRef
114 );
115
116
117 /*!
118 @function DeviceOnHoldSuspend
119 @discussion Tells the device to go "on hold".
120
121 This function will signal the deviceRef to suspend operations
122
123 @param deviceRef A DeviceOnHoldRef.
124 @result Boolean if call succeeded.
125
126 */
127 Boolean
128 DeviceOnHoldSuspend (
129 DeviceOnHoldRef deviceRef
130 );
131
132 /*!
133 @function DeviceOnHoldResume
134 @discussion Tells the device to resume.
135
136 This function will signal the deviceRef to resume operations
137
138 @param deviceRef A DeviceOnHoldRef.
139 @result Boolean if call succeeded.
140
141 */
142 Boolean
143 DeviceOnHoldResume (
144 DeviceOnHoldRef deviceRef
145 );
146
147 __END_DECLS
148
149 #endif /* _DEVICEONHOLD_H */
150