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