1/*
2 * Copyright (c) 2002,2008 Apple Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18#ifndef _H_SA_TYPES
19#define _H_SA_TYPES
20
21#define __MigTypeCheck 1
22
23#include <sys/types.h>
24#include <Security/Authorization.h>
25#include <Security/AuthorizationPlugin.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif // C++
30
31#include <mach/mach.h>
32
33// force unmangled name
34boolean_t secagentreply_server(mach_msg_header_t *, mach_msg_header_t *);
35
36typedef u_int32_t SessionId;
37typedef uint32_t MigBoolean;
38typedef uint32_t SATransactionId;
39
40typedef AuthorizationItemSet AuthorizationItemSetBlob;
41typedef AuthorizationItemSet *AuthorizationItemSetPtr;
42typedef AuthorizationValueVector AuthorizationValueVectorBlob;
43typedef AuthorizationValueVector *AuthorizationValueVectorPtr;
44
45typedef AuthorizationMechanismId PluginId;
46typedef AuthorizationMechanismId MechanismId;
47
48// pass structured arguments in/out of IPC calls. See "data walkers" for details
49#define BLOB(copy)			copy, copy.length(), copy
50#define BLOB_OUT(copy)		&copy, &copy##Length, &copy##Base
51#define BLOB_DECL(type,name) type *name, *name##Base; mach_msg_type_number_t name##Length
52#define BLOB_FUNC_DECL(type,name) type *name, type *name##Base, mach_msg_type_number_t name##Length
53
54//
55// Customization macros for MIG code
56//
57/*
58#define __AfterSendRpc(id, name) \
59	if (msg_result == MACH_MSG_SUCCESS && Out0P->Head.msgh_id == MACH_NOTIFY_DEAD_NAME) \
60		return MIG_SERVER_DIED;
61
62#define UseStaticTemplates 0
63*/
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* _H_SA_TYPES */
70
71