1/* 2 * Copyright (c) 2000-2007,2011 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 37typedef void *Data; 38typedef void *XMLBlob; 39typedef void *XMLBlobOut; 40typedef void *Pointer; 41typedef void *BasePointer; 42 43typedef const char *CssmString; 44 45typedef const char *FilePath; 46typedef char FilePathOut[PATH_MAX]; 47typedef void *HashData; 48typedef char HashDataOut[maxUcspHashLength]; 49typedef const char *RelationName; 50 51 52#ifdef __cplusplus 53 54namespace Security { 55 56using namespace SecurityServer; 57 58 59// @@@ OBSOLETE BEYOND THIS POINT (SecurityTokend uses this still) 60 61typedef void *ContextAttributes; 62typedef Context::Attr *ContextAttributesPointer; 63 64typedef CssmKey *CssmKeyPtr; 65typedef AclEntryPrototype *AclEntryPrototypePtr; 66typedef AclEntryInput *AclEntryInputPtr; 67typedef AclEntryInfo *AclEntryInfoPtr; 68typedef AclOwnerPrototype *AclOwnerPrototypePtr; 69typedef AccessCredentials *AccessCredentialsPtr; 70typedef CssmDeriveData *CssmDeriveDataPtr; 71 72typedef CssmDbRecordAttributeData *CssmDbRecordAttributeDataPtr; 73typedef CssmNetAddress *CssmNetAddressPtr; 74typedef CssmQuery *CssmQueryPtr; 75typedef CssmSubserviceUid *CssmSubserviceUidPtr; 76typedef CSSM_DBINFO *CSSM_DBINFOPtr; 77typedef CSSM_DB_SCHEMA_ATTRIBUTE_INFO *CSSM_DB_SCHEMA_ATTRIBUTE_INFOPtr; 78typedef CSSM_DB_SCHEMA_INDEX_INFO *CSSM_DB_SCHEMA_INDEX_INFOPtr; 79typedef CSSM_NAME_LIST *CSSM_NAME_LISTPtr; 80typedef void *VoidPtr; 81 82typedef CssmKey::Header CssmKeyHeader; 83 84typedef SecGuestRef *GuestChain; 85 86 87// 88// MIG-used translation functions 89// 90inline Context &inTrans(CSSM_CONTEXT &arg) { return Context::overlay(arg); } 91inline CssmKey &inTrans(CSSM_KEY &arg) { return CssmKey::overlay(arg); } 92inline 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 106