]> git.saurik.com Git - apple/security.git/blob - libsecurityd/lib/ss_types.h
Security-55471.tar.gz
[apple/security.git] / libsecurityd / lib / ss_types.h
1 /*
2 * Copyright (c) 2000-2007 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 #ifndef _H_SS_TYPES
24 #define _H_SS_TYPES
25
26 #include <sys/syslimits.h>
27 #include <securityd_client/handletypes.h>
28
29 //
30 // ss_types - common type definitions for securityd-related IPC services
31 //
32 #include "ssclient.h"
33
34 #define __MigTypeCheck 1
35
36
37 typedef void *Data;
38 typedef void *XMLBlob;
39 typedef void *XMLBlobOut;
40 typedef void *Pointer;
41 typedef void *BasePointer;
42
43 typedef const char *CssmString;
44
45 typedef const char *FilePath;
46 typedef char FilePathOut[PATH_MAX];
47 typedef void *HashData;
48 typedef char HashDataOut[maxUcspHashLength];
49 typedef const char *RelationName;
50
51
52 #ifdef __cplusplus
53
54 namespace Security {
55
56 using namespace SecurityServer;
57
58
59 // @@@ OBSOLETE BEYOND THIS POINT (SecurityTokend uses this still)
60
61 typedef void *ContextAttributes;
62 typedef Context::Attr *ContextAttributesPointer;
63
64 typedef CssmKey *CssmKeyPtr;
65 typedef AclEntryPrototype *AclEntryPrototypePtr;
66 typedef AclEntryInput *AclEntryInputPtr;
67 typedef AclEntryInfo *AclEntryInfoPtr;
68 typedef AclOwnerPrototype *AclOwnerPrototypePtr;
69 typedef AccessCredentials *AccessCredentialsPtr;
70 typedef CssmDeriveData *CssmDeriveDataPtr;
71
72 typedef CssmDbRecordAttributeData *CssmDbRecordAttributeDataPtr;
73 typedef CssmNetAddress *CssmNetAddressPtr;
74 typedef CssmQuery *CssmQueryPtr;
75 typedef CssmSubserviceUid *CssmSubserviceUidPtr;
76 typedef CSSM_DBINFO *CSSM_DBINFOPtr;
77 typedef CSSM_DB_SCHEMA_ATTRIBUTE_INFO *CSSM_DB_SCHEMA_ATTRIBUTE_INFOPtr;
78 typedef CSSM_DB_SCHEMA_INDEX_INFO *CSSM_DB_SCHEMA_INDEX_INFOPtr;
79 typedef CSSM_NAME_LIST *CSSM_NAME_LISTPtr;
80 typedef void *VoidPtr;
81
82 typedef CssmKey::Header CssmKeyHeader;
83
84 typedef SecGuestRef *GuestChain;
85
86
87 //
88 // MIG-used translation functions
89 //
90 inline Context &inTrans(CSSM_CONTEXT &arg) { return Context::overlay(arg); }
91 inline CssmKey &inTrans(CSSM_KEY &arg) { return CssmKey::overlay(arg); }
92 inline CSSM_KEY &outTrans(CssmKey &key) { return key; }
93
94 } // end namespace Security
95
96 #endif //__cplusplus
97
98
99 //
100 // MIG-used byte swapping macros
101 //
102 #define __NDR_convert__int_rep__BasePointer__defined
103 #define __NDR_convert__int_rep__BasePointer(a, f) /* do not flip */
104
105 #endif //_H_SS_TYPES