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