4 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
6 * The contents of this file constitute Original Code as defined in and are
7 * subject to the Apple Public Source License Version 1.2 (the 'License').
8 * You may not use this file except in compliance with the License. Please obtain
9 * a copy of the License at http://www.apple.com/publicsource and read it before
12 * This Original Code and all software distributed under the License are
13 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
14 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
15 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
17 * specific language governing rights and limitations under the License.
21 `define(`indexIndex', 0)dnl
22 define(`class', $1)dnl
24 // $1 `attribute numbers
29 static const CSSM_DB_SCHEMA_ATTRIBUTE_INFO $1SchemaAttributeList[] =
33 static const CSSM_DB_SCHEMA_INDEX_INFO $1SchemaIndexList[] =
43 const uint32 class()SchemaAttributeCount = sizeof(class()SchemaAttributeList) / sizeof(CSSM_DB_SCHEMA_ATTRIBUTE_INFO);
46 ` // Unique (primary) index'
48 ` // Secondary indices'
52 const uint32 class()SchemaIndexCount = sizeof(class()SchemaIndexList) / sizeof(CSSM_DB_SCHEMA_INDEX_INFO);
60 define(`attributeBody',
62 ifelse(index(`$1',`s'),-1,
63 ` CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER,
65 ` CSSM_DB_ATTRIBUTE_NAME_AS_STRING,
67 CSSM_DB_ATTRIBUTE_FORMAT_$7
70 define(`simpleAttribute',
71 `const CSSM_DB_ATTRIBUTE_INFO $2 =
79 { $3, $4, { $5, $6 }, CSSM_DB_ATTRIBUTE_FORMAT_$7 },
81 ifelse(index(`$1',`S'),-1,`',
86 ifelse(index(`$1',`U'),-1,`',
88 { $3, 0, CSSM_DB_INDEX_UNIQUE, CSSM_DB_INDEX_ON_ATTRIBUTE },
90 ifelse(index(`$1',`I'),-1,`',
91 `define(`indexIndex', incr(indexIndex))dnl
93 { $3, indexIndex(), CSSM_DB_INDEX_NONUNIQUE, CSSM_DB_INDEX_ON_ATTRIBUTE },
96 /* Start of actual output */
99 * Generated by m4 from KeySchema.m4 please do not edit this file.
102 `#include "KeySchema.h"'
104 namespace KeySchema {
108 attribute(` Ss', KeyClass, kKeyClass, "KeyClass", 0, NULL, UINT32)
109 attribute(` Ss', PrintName, kPrintName, "PrintName", 0, NULL, BLOB)
110 attribute(` Ss', Alias, kAlias, "Alias", 0, NULL, BLOB)
111 attribute(` Ss', Permanent, kPermanent, "Permanent", 0, NULL, UINT32)
112 attribute(` Ss', Private, kPrivate, "Private", 0, NULL, UINT32)
113 attribute(` Ss', Modifiable, kModifiable, "Modifiable", 0, NULL, UINT32)
114 attribute(`UISs', Label, kLabel, "Label", 0, NULL, BLOB)
115 attribute(`U Ss', ApplicationTag, kApplicationTag, "ApplicationTag", 0, NULL, BLOB)
116 attribute(`U Ss', KeyCreator, kKeyCreator, "KeyCreator", 0, NULL, BLOB)
117 attribute(`U Ss', KeyType, kKeyType, "KeyType", 0, NULL, UINT32)
118 attribute(`U Ss', KeySizeInBits, kKeySizeInBits, "KeySizeInBits", 0, NULL, UINT32)
119 attribute(`U Ss', EffectiveKeySize, kEffectiveKeySize, "EffectiveKeySize", 0, NULL, UINT32)
120 attribute(`U Ss', StartDate, kStartDate, "StartDate", 0, NULL, BLOB)
121 attribute(`U Ss', EndDate, kEndDate, "EndDate", 0, NULL, BLOB)
122 attribute(` Ss', Sensitive, kSensitive, "Sensitive", 0, NULL, UINT32)
123 attribute(` Ss', AlwaysSensitive, kAlwaysSensitive, "AlwaysSensitive", 0, NULL, UINT32)
124 attribute(` Ss', Extractable, kExtractable, "Extractable", 0, NULL, UINT32)
125 attribute(` Ss', NeverExtractable, kNeverExtractable, "NeverExtractable", 0, NULL, UINT32)
126 attribute(` ISs', Encrypt, kEncrypt, "Encrypt", 0, NULL, UINT32)
127 attribute(` ISs', Decrypt, kDecrypt, "Decrypt", 0, NULL, UINT32)
128 attribute(` ISs', Derive, kDerive, "Derive", 0, NULL, UINT32)
129 attribute(` ISs', Sign, kSign, "Sign", 0, NULL, UINT32)
130 attribute(` ISs', Verify, kVerify, "Verify", 0, NULL, UINT32)
131 attribute(` ISs', SignRecover, kSignRecover, "SignRecover", 0, NULL, UINT32)
132 attribute(` ISs', VerifyRecover, kVerifyRecover, "VerifyRecover", 0, NULL, UINT32)
133 attribute(` ISs', Wrap, kWrap, "Wrap", 0, NULL, UINT32)
134 attribute(` ISs', Unwrap, kUnwrap, "Unwrap", 0, NULL, UINT32)
137 } // end namespace KeySchema