1/* 2 * Copyright (c) 2009 Apple 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 File: DVComponentGlue/DeviceControl.h 25 26 Contains: Component API for doing AVC transactions. 27 28 Copyright: � 1997-2006 by Apple Computer, Inc., all rights reserved. 29 30*/ 31#ifndef __DEVICECONTROL__ 32#define __DEVICECONTROL__ 33 34#ifndef __CORESERVICES__ 35#include <CoreServices/CoreServices.h> 36#endif 37 38 39 40#if PRAGMA_ONCE 41#pragma once 42#endif 43 44#ifdef __cplusplus 45extern "C" { 46#endif 47 48#if PRAGMA_STRUCT_ALIGN 49 #pragma options align=mac68k 50#elif PRAGMA_STRUCT_PACKPUSH 51 #pragma pack(push, 2) 52#elif PRAGMA_STRUCT_PACK 53 #pragma pack(2) 54#endif 55 56typedef CALLBACK_API_C( UInt32 , DCResponseHandler )(UInt32 fwCommandObjectID, Ptr responseBuffer, UInt32 responseLength); 57struct DVCTransactionParams { 58 Ptr commandBufferPtr; 59 UInt32 commandLength; 60 Ptr responseBufferPtr; 61 UInt32 responseBufferSize; 62 DCResponseHandler * responseHandler; 63}; 64typedef struct DVCTransactionParams DVCTransactionParams; 65/* 66 * DeviceControlDoAVCTransaction() 67 * 68 * Availability: 69 * Mac OS X: in version 10.0 and later in DVComponentGlue.framework 70 * CarbonLib: not available 71 * Non-Carbon CFM: in IDHLib 1.0 and later 72 */ 73extern ComponentResult 74DeviceControlDoAVCTransaction( 75 ComponentInstance instance, 76 DVCTransactionParams * params); 77 78 79 80 81/* selectors for component calls */ 82enum { 83 kDeviceControlDoAVCTransactionSelect = 0x0001 84}; 85 86#if PRAGMA_STRUCT_ALIGN 87 #pragma options align=reset 88#elif PRAGMA_STRUCT_PACKPUSH 89 #pragma pack(pop) 90#elif PRAGMA_STRUCT_PACK 91 #pragma pack() 92#endif 93 94#ifdef __cplusplus 95} 96#endif 97 98#endif /* __DEVICECONTROL__ */ 99 100