1/* 2 * Copyright (c) 1998-2013 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#ifndef __DISKARBITRATIOND_DASUPPORT__ 25#define __DISKARBITRATIOND_DASUPPORT__ 26 27#include <CoreFoundation/CoreFoundation.h> 28 29#include "DADisk.h" 30#include "DAInternal.h" 31 32#ifdef __cplusplus 33extern "C" { 34#endif /* __cplusplus */ 35 36typedef void ( *DAAuthorizeCallback )( DAReturn status, void * context ); 37 38extern DAReturn DAAuthorize( DASessionRef session, 39 _DAAuthorizeOptions options, 40 DADiskRef disk, 41 uid_t userUID, 42 gid_t userGID, 43 const char * right ); 44 45extern void DAAuthorizeWithCallback( DASessionRef session, 46 _DAAuthorizeOptions options, 47 DADiskRef disk, 48 uid_t userUID, 49 gid_t userGID, 50 DAAuthorizeCallback callback, 51 void * callbackContext, 52 const char * right ); 53 54extern const CFStringRef kDAFileSystemKey; /* ( DAFileSystem ) */ 55 56extern void DAFileSystemListRefresh( void ); 57 58extern const CFStringRef kDAMountMapMountAutomaticKey; /* ( CFBoolean ) */ 59extern const CFStringRef kDAMountMapMountOptionsKey; /* ( CFString ) */ 60extern const CFStringRef kDAMountMapMountPathKey; /* ( CFURL ) */ 61extern const CFStringRef kDAMountMapProbeIDKey; /* ( CFUUID ) */ 62extern const CFStringRef kDAMountMapProbeKindKey; /* ( CFString ) */ 63 64extern void DAMountMapListRefresh1( void ); 65extern void DAMountMapListRefresh2( void ); 66 67extern const CFStringRef kDAPreferenceMountDeferExternalKey; /* ( CFBoolean ) */ 68extern const CFStringRef kDAPreferenceMountDeferInternalKey; /* ( CFBoolean ) */ 69extern const CFStringRef kDAPreferenceMountDeferRemovableKey; /* ( CFBoolean ) */ 70extern const CFStringRef kDAPreferenceMountTrustExternalKey; /* ( CFBoolean ) */ 71extern const CFStringRef kDAPreferenceMountTrustInternalKey; /* ( CFBoolean ) */ 72extern const CFStringRef kDAPreferenceMountTrustRemovableKey; /* ( CFBoolean ) */ 73 74extern void DAPreferenceListRefresh( void ); 75 76enum 77{ 78 kDAUnitStateCommandActive = 0x00000001, 79 kDAUnitStateStagedUnreadable = 0x00010000 80}; 81 82typedef UInt32 DAUnitState; 83 84extern Boolean DAUnitGetState( DADiskRef disk, DAUnitState state ); 85extern void DAUnitSetState( DADiskRef disk, DAUnitState state, Boolean value ); 86 87#ifdef __cplusplus 88} 89#endif /* __cplusplus */ 90 91#endif /* !__DISKARBITRATIOND_DASUPPORT__ */ 92