1/* 2 * Copyright (c) 2000, 2001, 2003-2005, 2011, 2012 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/* 25 * Modification History 26 * 27 * June 1, 2001 Allan Nathanson <ajn@apple.com> 28 * - public API conversion 29 * 30 * March 24, 2000 Allan Nathanson <ajn@apple.com> 31 * - initial revision 32 */ 33 34#include <mach/std_types.defs> 35#include <mach/mach_types.defs> 36 37subsystem config 20000; 38serverprefix _; 39 40import "config_types.h"; 41 42/* 43 * serialized XML or UTF8 data (client->server) 44 */ 45type xmlData = ^ array [] of MACH_MSG_TYPE_BYTE 46 ctype : xmlData_t; 47 48/* 49 * serialized XML or UTF8 data (server->client) 50 */ 51type xmlDataOut = ^ array [] of MACH_MSG_TYPE_BYTE 52 ctype : xmlDataOut_t; 53 54/* 55 * additional types 56 */ 57/* 58type task_move_send_t = MACH_MSG_TYPE_MOVE_SEND 59 ctype: mach_port_t; 60*/ 61 62 63/* 64 * Connection management API's 65 */ 66 67routine configopen ( server : mach_port_t; 68 name : xmlData; 69 options : xmlData; 70 out session : mach_port_move_send_t; 71 out status : int; 72 ServerAuditToken audit_token : audit_token_t); 73 74 skip; /* was configclose */ 75 skip; /* was configlock */ 76 skip; /* was configunlock */ 77 78 skip; /* reserved for future use */ 79 skip; /* reserved for future use */ 80 skip; /* reserved for future use */ 81 skip; /* reserved for future use */ 82 83/* 84 * Dynamic store access API's 85 */ 86 87routine configlist ( server : mach_port_t; 88 xmlData : xmlData; 89 isRegex : int; 90 out list : xmlDataOut, dealloc; 91 out status : int; 92 ServerAuditToken audit_token : audit_token_t); 93 94routine configadd ( server : mach_port_t; 95 key : xmlData; 96 data : xmlData; 97 out newInstance : int; 98 out status : int; 99 ServerAuditToken audit_token : audit_token_t); 100 101routine configget ( server : mach_port_t; 102 key : xmlData; 103 out data : xmlDataOut, dealloc; 104 out newInstance : int; 105 out status : int; 106 ServerAuditToken audit_token : audit_token_t); 107 108routine configset ( server : mach_port_t; 109 key : xmlData; 110 data : xmlData; 111 instance : int; 112 out newInstance : int; 113 out status : int; 114 ServerAuditToken audit_token : audit_token_t); 115 116routine configremove ( server : mach_port_t; 117 key : xmlData; 118 out status : int; 119 ServerAuditToken audit_token : audit_token_t); 120 121 skip; /* was configtouch */ 122 123routine configadd_s ( server : mach_port_t; 124 key : xmlData; 125 data : xmlData; 126 out newInstance : int; 127 out status : int); 128 129routine confignotify ( server : mach_port_t; 130 key : xmlData; 131 out status : int; 132 ServerAuditToken audit_token : audit_token_t); 133 134routine configget_m ( server : mach_port_t; 135 keys : xmlData; 136 patterns : xmlData; 137 out data : xmlDataOut, dealloc; 138 out status : int; 139 ServerAuditToken audit_token : audit_token_t); 140 141routine configset_m ( server : mach_port_t; 142 data : xmlData; 143 remove : xmlData; 144 notify : xmlData; 145 out status : int; 146 ServerAuditToken audit_token : audit_token_t); 147 148/* 149 * Notification API's 150 */ 151 152routine notifyadd ( server : mach_port_t; 153 key : xmlData; 154 isRegex : int; 155 out status : int); 156 157routine notifyremove ( server : mach_port_t; 158 key : xmlData; 159 isRegex : int; 160 out status : int); 161 162routine notifychanges ( server : mach_port_t; 163 out list : xmlDataOut, dealloc; 164 out status : int); 165 166routine notifyviaport ( server : mach_port_t; 167 port : mach_port_move_send_t; 168 msgid : mach_msg_id_t; 169 out status : int); 170 171routine notifyviafd ( server : mach_port_t; 172 path : xmlData; 173 identifier : int; 174 out status : int); 175 176routine notifyviasignal ( server : mach_port_t; 177 task : task_t /*task_move_send_t*/; 178 sig : int; 179 out status : int); 180 181routine notifycancel ( server : mach_port_t; 182 out status : int); 183 184routine notifyset ( server : mach_port_t; 185 keys : xmlData; 186 patterns : xmlData; 187 out status : int); 188 189 skip; /* reserved for future use */ 190 skip; /* reserved for future use */ 191 skip; /* reserved for future use */ 192 193/* 194 * Miscellaneous API's 195 */ 196 197routine snapshot ( server : mach_port_t; 198 out status : int; 199 ServerAuditToken audit_token : audit_token_t); 200