FreeStick  0.3
Cross Platform Open Sorce Joystick Lib
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
IOHIDDevice_.h
Go to the documentation of this file.
1 // File: IOHIDDevice_.h
2 // Abstract: convieance functions for IOHIDDeviceGetProperty
3 // Version: 5.0
4 //
5 // Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
6 // Inc. ("Apple") in consideration of your agreement to the following
7 // terms, and your use, installation, modification or redistribution of
8 // this Apple software constitutes acceptance of these terms. If you do
9 // not agree with these terms, please do not use, install, modify or
10 // redistribute this Apple software.
11 //
12 // In consideration of your agreement to abide by the following terms, and
13 // subject to these terms, Apple grants you a personal, non-exclusive
14 // license, under Apple's copyrights in this original Apple software (the
15 // "Apple Software"), to use, reproduce, modify and redistribute the Apple
16 // Software, with or without modifications, in source and/or binary forms;
17 // provided that if you redistribute the Apple Software in its entirety and
18 // without modifications, you must retain this notice and the following
19 // text and disclaimers in all such redistributions of the Apple Software.
20 // Neither the name, trademarks, service marks or logos of Apple Inc. may
21 // be used to endorse or promote products derived from the Apple Software
22 // without specific prior written permission from Apple. Except as
23 // expressly stated in this notice, no other rights or licenses, express or
24 // implied, are granted by Apple herein, including but not limited to any
25 // patent rights that may be infringed by your derivative works or by other
26 // works in which the Apple Software may be incorporated.
27 //
28 // The Apple Software is provided by Apple on an "AS IS" basis. APPLE
29 // MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
30 // THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
31 // FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
32 // OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
33 //
34 // IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
35 // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
37 // INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
38 // MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
39 // AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
40 // STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
41 // POSSIBILITY OF SUCH DAMAGE.
42 //
43 // Copyright (C) 2010 Apple Inc. All Rights Reserved.
44 //
45 // *****************************************************
46 #ifndef __IOHIDDevice__
47 #define __IOHIDDevice__
48 
49 // *****************************************************
50 #pragma mark - includes & imports
51 
52 #include <AvailabilityMacros.h>
53 
54 #include "IOHIDLib_.h"
55 
56 // *****************************************************
57 #if PRAGMA_ONCE
58 #pragma once
59 #endif // if PRAGMA_ONCE
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif // ifdef __cplusplus
64 
65 #if PRAGMA_IMPORT
66 #pragma import on
67 #endif // if PRAGMA_IMPORT
68 
69 #if PRAGMA_STRUCT_ALIGN
70 #pragma options align=mac68k
71 #elif PRAGMA_STRUCT_PACKPUSH
72 #pragma pack(push, 2)
73 #elif PRAGMA_STRUCT_PACK
74 #pragma pack(2)
75 #endif // if PRAGMA_STRUCT_ALIGN
76 
77 // *****************************************************
78 #pragma mark - typedef's, struct's, enums, defines, etc.
79 // -----------------------------------------------------
80 
81 // *****************************************************
82 #pragma mark - exported globals
83 // -----------------------------------------------------
84 
85 // *****************************************************
86 #pragma mark - exported function prototypes
87 // -----------------------------------------------------
88 
89 // *************************************************************************
90 //
91 // HIDIsValidDevice(inIOHIDDeviceRef)
92 //
93 // Purpose: validate this device
94 //
95 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
96 //
97 // Returns: Boolean - TRUE if we find the device in our(internal) device list
98 //
99 
100 extern Boolean HIDIsValidDevice(IOHIDDeviceRef inIOHIDDeviceRef);
101 
102 // *************************************************************************
103 //
104 // IOHIDDevice_GetTransport(inIOHIDDeviceRef)
105 //
106 // Purpose: get the Transport CFString for this device
107 //
108 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
109 //
110 // Returns: CFStringRef - the Transport CFString for this device
111 //
112 
113 extern CFStringRef IOHIDDevice_GetTransport(IOHIDDeviceRef inIOHIDDeviceRef);
114 
115 // *************************************************************************
116 //
117 // IOHIDDevice_GetVendorID(inIOHIDDeviceRef)
118 //
119 // Purpose: get the vendor ID for this device
120 //
121 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
122 //
123 // Returns: long - the vendor ID for this device
124 //
125 
126 extern long IOHIDDevice_GetVendorID(IOHIDDeviceRef inIOHIDDeviceRef);
127 
128 // *************************************************************************
129 //
130 // IOHIDDevice_GetVendorIDSource(inIOHIDDeviceRef)
131 //
132 // Purpose: get the VendorIDSource for this device
133 //
134 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
135 //
136 // Returns: long - the VendorIDSource for this device
137 //
138 
139 extern long IOHIDDevice_GetVendorIDSource(IOHIDDeviceRef inIOHIDDeviceRef);
140 
141 // *************************************************************************
142 //
143 // IOHIDDevice_GetProductID(inIOHIDDeviceRef)
144 //
145 // Purpose: get the product ID for this device
146 //
147 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
148 //
149 // Returns: long - the product ID for this device
150 //
151 
152 extern long IOHIDDevice_GetProductID(IOHIDDeviceRef inIOHIDDeviceRef);
153 
154 // *************************************************************************
155 //
156 // IOHIDDevice_GetVersionNumber(inIOHIDDeviceRef)
157 //
158 // Purpose: get the VersionNumber CFString for this device
159 //
160 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
161 //
162 // Returns: long - the VersionNumber for this device
163 //
164 
165 extern long IOHIDDevice_GetVersionNumber(IOHIDDeviceRef inIOHIDDeviceRef);
166 
167 // *************************************************************************
168 //
169 // IOHIDDevice_GetManufacturer(inIOHIDDeviceRef)
170 //
171 // Purpose: get the Manufacturer CFString for this device
172 //
173 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
174 //
175 // Returns: CFStringRef - the Manufacturer CFString for this device
176 //
177 
178 extern CFStringRef IOHIDDevice_GetManufacturer(IOHIDDeviceRef inIOHIDDeviceRef);
179 
180 // *************************************************************************
181 //
182 // IOHIDDevice_GetProduct(inIOHIDDeviceRef)
183 //
184 // Purpose: get the Product CFString for this device
185 //
186 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
187 //
188 // Returns: CFStringRef - the Product CFString for this device
189 //
190 
191 extern CFStringRef IOHIDDevice_GetProduct(IOHIDDeviceRef inIOHIDDeviceRef);
192 
193 // *************************************************************************
194 //
195 // IOHIDDevice_GetSerialNumber(inIOHIDDeviceRef)
196 //
197 // Purpose: get the SerialNumber CFString for this device
198 //
199 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
200 //
201 // Returns: CFStringRef - the SerialNumber CFString for this device
202 //
203 
204 extern CFStringRef IOHIDDevice_GetSerialNumber(IOHIDDeviceRef inIOHIDDeviceRef);
205 
206 // *************************************************************************
207 //
208 // IOHIDDevice_GetCountryCode(inIOHIDDeviceRef)
209 //
210 // Purpose: get the CountryCode CFString for this device
211 //
212 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
213 //
214 // Returns: long - the CountryCode for this device
215 //
216 
217 extern long IOHIDDevice_GetCountryCode(IOHIDDeviceRef inIOHIDDeviceRef);
218 
219 // *************************************************************************
220 //
221 // IOHIDDevice_GetLocationID(inIOHIDDeviceRef)
222 //
223 // Purpose: get the location ID for this device
224 //
225 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
226 //
227 // Returns: long - the location ID for this device
228 //
229 
230 extern long IOHIDDevice_GetLocationID(IOHIDDeviceRef inIOHIDDeviceRef);
231 
232 // *************************************************************************
233 //
234 // IOHIDDevice_GetUsage(inIOHIDDeviceRef)
235 //
236 // Purpose: get the usage for this device
237 //
238 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
239 //
240 // Returns: uint32_t - the usage for this device
241 //
242 
243 extern uint32_t IOHIDDevice_GetUsage(IOHIDDeviceRef inIOHIDDeviceRef);
244 
245 // *************************************************************************
246 //
247 // IOHIDDevice_GetUsagePage(inIOHIDDeviceRef)
248 //
249 // Purpose: get the usage page for this device
250 //
251 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
252 //
253 // Returns: uint32_t - the usage page for this device
254 //
255 
256 extern uint32_t IOHIDDevice_GetUsagePage(IOHIDDeviceRef inIOHIDDeviceRef);
257 
258 // *************************************************************************
259 //
260 // IOHIDDevice_GetUsagePairs(inIOHIDDeviceRef)
261 //
262 // Purpose: get the UsagePairs CFString for this device
263 //
264 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
265 //
266 // Returns: CFArrayRef - the UsagePairs for this device
267 //
268 
269 extern CFArrayRef IOHIDDevice_GetUsagePairs(IOHIDDeviceRef inIOHIDDeviceRef);
270 
271 // *************************************************************************
272 //
273 // IOHIDDevice_GetPrimaryUsage(inIOHIDDeviceRef)
274 //
275 // Purpose: get the PrimaryUsage CFString for this device
276 //
277 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
278 //
279 // Returns: CFStringRef - the PrimaryUsage CFString for this device
280 //
281 
282 extern uint32_t IOHIDDevice_GetPrimaryUsage(IOHIDDeviceRef inIOHIDDeviceRef);
283 
284 // *************************************************************************
285 //
286 // IOHIDDevice_GetPrimaryUsagePage(inIOHIDDeviceRef)
287 //
288 // Purpose: get the PrimaryUsagePage CFString for this device
289 //
290 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
291 //
292 // Returns: CFStringRef - the PrimaryUsagePage CFString for this device
293 //
294 
295 extern uint32_t IOHIDDevice_GetPrimaryUsagePage(IOHIDDeviceRef inIOHIDDeviceRef);
296 
297 // *************************************************************************
298 //
299 // IOHIDDevice_GetMaxInputReportSize(inIOHIDDeviceRef)
300 //
301 // Purpose: get the MaxInputReportSize for this device
302 //
303 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
304 //
305 // Returns: long - the MaxInputReportSize for this device
306 //
307 
308 extern long IOHIDDevice_GetMaxInputReportSize(IOHIDDeviceRef inIOHIDDeviceRef);
309 
310 // *************************************************************************
311 //
312 // IOHIDDevice_GetMaxOutputReportSize(inIOHIDDeviceRef)
313 //
314 // Purpose: get the MaxOutputReportSize for this device
315 //
316 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
317 //
318 // Returns: long - the MaxOutputReportSize for this device
319 //
320 
321 extern long IOHIDDevice_GetMaxOutputReportSize(IOHIDDeviceRef inIOHIDDeviceRef);
322 
323 // *************************************************************************
324 //
325 // IOHIDDevice_GetMaxFeatureReportSize(inIOHIDDeviceRef)
326 //
327 // Purpose: get the MaxFeatureReportSize for this device
328 //
329 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
330 //
331 // Returns: long - the MaxFeatureReportSize for this device
332 //
333 
334 extern long IOHIDDevice_GetMaxFeatureReportSize(IOHIDDeviceRef inIOHIDDeviceRef);
335 
336 // *************************************************************************
337 //
338 // IOHIDDevice_GetReportInterval(inIOHIDDeviceRef)
339 //
340 // Purpose: get the ReportInterval for this device
341 //
342 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
343 //
344 // Returns: long - the ReportInterval for this device
345 //
346 
347 extern long IOHIDDevice_GetReportInterval(IOHIDDeviceRef inIOHIDDeviceRef);
348 
349 // *************************************************************************
350 //
351 // IOHIDDevice_GetQueue(inIOHIDDeviceRef)
352 //
353 // Purpose: get the Queue for this device
354 //
355 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
356 //
357 // Returns: IOHIDQueueRef - the Queue for this device
358 //
359 
360 extern IOHIDQueueRef IOHIDDevice_GetQueue(IOHIDDeviceRef inIOHIDDeviceRef);
361 
362 // *************************************************************************
363 //
364 // IOHIDDevice_SetQueue(inIOHIDDeviceRef, inQueueRef)
365 //
366 // Purpose: Set the Queue for this device
367 //
368 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
369 // inQueueRef - the Queue
370 //
371 // Returns: nothing
372 //
373 
374 extern void IOHIDDevice_SetQueue(IOHIDDeviceRef inIOHIDDeviceRef, IOHIDQueueRef inQueueRef);
375 
376 // *************************************************************************
377 //
378 // IOHIDDevice_GetTransaction(inIOHIDDeviceRef)
379 //
380 // Purpose: get the Transaction for this device
381 //
382 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
383 //
384 // Returns: IOHIDTransactionRef - the Transaction for this device
385 //
386 
387 extern IOHIDTransactionRef IOHIDDevice_GetTransaction(IOHIDDeviceRef inIOHIDDeviceRef);
388 
389 // *************************************************************************
390 //
391 // IOHIDDevice_SetTransaction(inIOHIDDeviceRef, inTransactionRef)
392 //
393 // Purpose: Set the Transaction for this device
394 //
395 // Inputs: inIOHIDDeviceRef - the IDHIDDeviceRef for this device
396 // inTransactionRef - the Transaction
397 //
398 // Returns: nothing
399 //
400 
401 extern void IOHIDDevice_SetTransaction(IOHIDDeviceRef inIOHIDDeviceRef, IOHIDTransactionRef inTransactionRef);
402 
403 // *****************************************************
404 #if PRAGMA_STRUCT_ALIGN
405 #pragma options align=reset
406 #elif PRAGMA_STRUCT_PACKPUSH
407 #pragma pack(pop)
408 #elif PRAGMA_STRUCT_PACK
409 #pragma pack()
410 #endif // if PRAGMA_STRUCT_ALIGN
411 
412 #ifdef PRAGMA_IMPORT_OFF
413 #pragma import off
414 #elif PRAGMA_IMPORT
415 #pragma import reset
416 #endif // ifdef PRAGMA_IMPORT_OFF
417 
418 #ifdef __cplusplus
419 }
420 #endif // ifdef __cplusplus
421 
422 #endif // __IOHIDDevice__ //
IOHIDQueueRef IOHIDDevice_GetQueue(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:445
long IOHIDDevice_GetMaxOutputReportSize(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:389
CFArrayRef IOHIDDevice_GetUsagePairs(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:319
uint32_t IOHIDDevice_GetUsage(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:283
uint32_t IOHIDDevice_GetUsagePage(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:301
long IOHIDDevice_GetMaxInputReportSize(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:371
CFStringRef IOHIDDevice_GetManufacturer(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:199
long IOHIDDevice_GetMaxFeatureReportSize(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:407
long IOHIDDevice_GetVersionNumber(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:181
CFStringRef IOHIDDevice_GetProduct(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:215
uint32_t IOHIDDevice_GetPrimaryUsage(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:335
long IOHIDDevice_GetLocationID(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:265
CFStringRef IOHIDDevice_GetSerialNumber(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:231
long IOHIDDevice_GetVendorID(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:127
Boolean HIDIsValidDevice(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:88
long IOHIDDevice_GetReportInterval(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:427
long IOHIDDevice_GetCountryCode(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:247
void IOHIDDevice_SetQueue(IOHIDDeviceRef inIOHIDDeviceRef, IOHIDQueueRef inQueueRef)
Definition: IOHIDDevice_.c:468
void IOHIDDevice_SetTransaction(IOHIDDeviceRef inIOHIDDeviceRef, IOHIDTransactionRef inTransactionRef)
Definition: IOHIDDevice_.c:502
CFStringRef IOHIDDevice_GetTransport(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:111
uint32_t IOHIDDevice_GetPrimaryUsagePage(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:353
IOHIDTransactionRef IOHIDDevice_GetTransaction(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:483
long IOHIDDevice_GetVendorIDSource(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:145
long IOHIDDevice_GetProductID(IOHIDDeviceRef inIOHIDDeviceRef)
Definition: IOHIDDevice_.c:163