2 * Copyright (c) 2008,2011 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
28 #ifndef _H_SS_HANDLE_TYPES
29 #define _H_SS_HANDLE_TYPES
31 #include <Security/cssmtype.h>
37 namespace SecurityServer
{
39 #endif /* __cplusplus */
42 /* XXX/gh Might have to be guarded thusly to protect ss_types.h */
43 /* #ifndef _H_SS_TYPES */
46 * These are all uint32_ts behind the curtain, but we try to be
47 * explicit about which kind they are.
48 * By protocol, each of these is in a different address space - i.e.
49 * a KeyHandle and a DbHandle with the same value may or may not refer
50 * to the same thing - it's up to the handle provider.
51 * GenericHandle is for cases where a generic handle is further elaborated
52 * with a "kind code" - currently for ACL manipulations only.
54 typedef uint32_t DbHandle
; /* database handle */
55 typedef uint32_t KeyHandle
; /* cryptographic key handle */
56 typedef uint32_t RecordHandle
; /* data record identifier handle */
57 typedef uint32_t SearchHandle
; /* search (query) handle */
58 typedef uint32_t GenericHandle
; /* for polymorphic handle uses */
60 static const DbHandle noDb
= 0;
61 static const KeyHandle noKey
= 0;
62 static const RecordHandle noRecord
= 0;
63 static const SearchHandle noSearch
= 0;
65 /* #endif */ /* _H_SS_TYPES */
68 * Required for MIG-generated code; made sense when the above handle types
69 * were all CSSM_HANDLEs
71 typedef uint32_t IPCHandle
;
72 typedef IPCHandle IPCDbHandle
;
73 typedef IPCHandle IPCKeyHandle
;
74 typedef IPCHandle IPCRecordHandle
;
75 typedef IPCHandle IPCSearchHandle
;
76 typedef IPCHandle IPCGenericHandle
;
80 } // end namespace SecurityServer
81 } // end namespace Security
83 #endif /* __cplusplus */
86 #endif /* _H_SS_HANDLE_TYPES */