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#include <mach/mach_types.defs> 25#include <mach/std_types.defs> 26 27subsystem DAServer 0; 28 29import <mach/mach.h>; 30import <sys/types.h>; 31import <Security/Authorization.h>; 32 33import "DAServer.defs.h"; 34 35type ___caddr_t = c_string [*:1024] ctype : caddr_t; 36type ___pid_t = int32_t ctype : pid_t; 37type ___uid_t = int32_t ctype : uid_t; 38type ___vm_address_t = array [] of char ctype : vm_address_t; 39type ___AuthorizationExternalForm = struct [32] of char ctype : AuthorizationExternalForm; 40 41routine _DAServerDiskCopyDescription( _session : mach_port_t; 42 _disk : ___caddr_t; 43 out _description : ___vm_address_t, dealloc ); 44 45routine _DAServerDiskGetOptions( _session : mach_port_t; 46 _disk : ___caddr_t; 47 out _options : int32_t ); 48 49routine _DAServerDiskGetUserUID( _session : mach_port_t; 50 _disk : ___caddr_t; 51 out _userUID : ___uid_t ); 52 53routine _DAServerDiskIsClaimed( _session : mach_port_t; 54 _disk : ___caddr_t; 55 out _claimed : boolean_t ); 56 57routine _DAServerDiskSetAdoption( _session : mach_port_t; 58 _disk : ___caddr_t; 59 _adoption : boolean_t; 60 ServerSecToken _token : security_token_t ); 61 62routine _DAServerDiskSetEncoding( _session : mach_port_t; 63 _disk : ___caddr_t; 64 _encoding : int32_t; 65 ServerSecToken _token : security_token_t ); 66 67routine _DAServerDiskSetOptions( _session : mach_port_t; 68 _disk : ___caddr_t; 69 _options : int32_t; 70 _value : int32_t ); 71 72simpleroutine _DAServerDiskUnclaim( _session : mach_port_t; 73 _disk : ___caddr_t ); 74 75routine _DAServerSessionCopyCallbackQueue( _session : mach_port_t; 76 out _queue : ___vm_address_t, dealloc ); 77 78routine _DAServerSessionCreate( _session : mach_port_t; 79 _name : ___caddr_t; 80 _pid : ___pid_t; 81 out _server : mach_port_make_send_t ); 82 83routine _DAServerSessionQueueRequest( _session : mach_port_t; 84 _kind : int32_t; 85 _argument0 : ___caddr_t; 86 _argument1 : int32_t; 87 _argument2 : ___vm_address_t; 88 _argument3 : ___vm_address_t; 89 _address : mach_vm_offset_t; 90 _context : mach_vm_offset_t; 91 ServerSecToken _token : security_token_t ); 92 93simpleroutine _DAServerSessionQueueResponse( _session : mach_port_t; 94 _address : mach_vm_offset_t; 95 _context : mach_vm_offset_t; 96 _kind : int32_t; 97 _disk : ___caddr_t; 98 _response : ___vm_address_t; 99 _responseID : int32_t ); 100 101simpleroutine _DAServerSessionRegisterCallback( _session : mach_port_t; 102 _address : mach_vm_offset_t; 103 _context : mach_vm_offset_t; 104 _kind : int32_t; 105 _order : int32_t; 106 _match : ___vm_address_t; 107 _watch : ___vm_address_t ); 108 109simpleroutine _DAServerSessionRelease( _session : mach_port_t ); 110 111simpleroutine _DAServerSessionSetAuthorization( _session : mach_port_t; 112 _authorization : ___AuthorizationExternalForm ); 113 114simpleroutine _DAServerSessionSetClientPort( _session : mach_port_t; 115 _client : mach_port_make_send_t ); 116 117simpleroutine _DAServerSessionUnregisterCallback( _session : mach_port_t; 118 _address : mach_vm_offset_t; 119 _context : mach_vm_offset_t ); 120