divert(-1) changecom(/*, */) /* * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved. * * The contents of this file constitute Original Code as defined in and are * subject to the Apple Public Source License Version 1.2 (the 'License'). * You may not use this file except in compliance with the License. Please obtain * a copy of the License at http://www.apple.com/publicsource and read it before * using this file. * * This Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the * specific language governing rights and limitations under the License. */ define(`startClass', `define(`indexIndex', 0)dnl define(`class', $1)dnl divert(1)dnl // $1 `attribute numbers enum {' divert(2)dnl // $1 attributes static const CSSM_DB_SCHEMA_ATTRIBUTE_INFO $1SchemaAttributeList[] = { divert(3)dnl // $1 indices static const CSSM_DB_SCHEMA_INDEX_INFO $1SchemaIndexList[] = {') define(`endClass', `divert(1)dnl }; divert(2)dnl }; const uint32 class()SchemaAttributeCount = sizeof(class()SchemaAttributeList) / sizeof(CSSM_DB_SCHEMA_ATTRIBUTE_INFO); divert(3)dnl ` // Unique (primary) index' undivert(5) ` // Secondary indices' undivert(6)dnl }; const uint32 class()SchemaIndexCount = sizeof(class()SchemaIndexList) / sizeof(CSSM_DB_SCHEMA_INDEX_INFO); undivert(4)dnl divert(0)dnl undivert(1)dnl undivert(2)dnl undivert(3)dnl') define(`attributeBody', `{ ifelse(index(`$1',`s'),-1, ` CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER, {(char *)$3},', ` CSSM_DB_ATTRIBUTE_NAME_AS_STRING, {$4},') CSSM_DB_ATTRIBUTE_FORMAT_$7 }') define(`simpleAttribute', `const CSSM_DB_ATTRIBUTE_INFO $2 = attributeBody($*); ') define(`attribute', `divert(1)dnl $3, divert(2)dnl { $3, $4, { $5, $6 }, CSSM_DB_ATTRIBUTE_FORMAT_$7 }, divert(-1) ifelse(index(`$1',`S'),-1,`', `divert(4)dnl simpleAttribute($*) divert(-1)')dnl ifelse(index(`$1',`U'),-1,`', `divert(5)dnl { $3, 0, CSSM_DB_INDEX_UNIQUE, CSSM_DB_INDEX_ON_ATTRIBUTE }, divert(-1)')dnl ifelse(index(`$1',`I'),-1,`', `define(`indexIndex', incr(indexIndex))dnl divert(6)dnl { $3, indexIndex(), CSSM_DB_INDEX_NONUNIQUE, CSSM_DB_INDEX_ON_ATTRIBUTE }, divert(-1)')') /* Start of actual output */ divert(0)dnl /* * Generated by m4 from KeySchema.m4 please do not edit this file. */ `#include "KeySchema.h"' namespace KeySchema { divert(-1) startClass(Key) attribute(` Ss', KeyClass, kKeyClass, "KeyClass", 0, NULL, UINT32) attribute(` Ss', PrintName, kPrintName, "PrintName", 0, NULL, BLOB) attribute(` Ss', Alias, kAlias, "Alias", 0, NULL, BLOB) attribute(` Ss', Permanent, kPermanent, "Permanent", 0, NULL, UINT32) attribute(` Ss', Private, kPrivate, "Private", 0, NULL, UINT32) attribute(` Ss', Modifiable, kModifiable, "Modifiable", 0, NULL, UINT32) attribute(`UISs', Label, kLabel, "Label", 0, NULL, BLOB) attribute(`U Ss', ApplicationTag, kApplicationTag, "ApplicationTag", 0, NULL, BLOB) attribute(`U Ss', KeyCreator, kKeyCreator, "KeyCreator", 0, NULL, BLOB) attribute(`U Ss', KeyType, kKeyType, "KeyType", 0, NULL, UINT32) attribute(`U Ss', KeySizeInBits, kKeySizeInBits, "KeySizeInBits", 0, NULL, UINT32) attribute(`U Ss', EffectiveKeySize, kEffectiveKeySize, "EffectiveKeySize", 0, NULL, UINT32) attribute(`U Ss', StartDate, kStartDate, "StartDate", 0, NULL, BLOB) attribute(`U Ss', EndDate, kEndDate, "EndDate", 0, NULL, BLOB) attribute(` Ss', Sensitive, kSensitive, "Sensitive", 0, NULL, UINT32) attribute(` Ss', AlwaysSensitive, kAlwaysSensitive, "AlwaysSensitive", 0, NULL, UINT32) attribute(` Ss', Extractable, kExtractable, "Extractable", 0, NULL, UINT32) attribute(` Ss', NeverExtractable, kNeverExtractable, "NeverExtractable", 0, NULL, UINT32) attribute(` ISs', Encrypt, kEncrypt, "Encrypt", 0, NULL, UINT32) attribute(` ISs', Decrypt, kDecrypt, "Decrypt", 0, NULL, UINT32) attribute(` ISs', Derive, kDerive, "Derive", 0, NULL, UINT32) attribute(` ISs', Sign, kSign, "Sign", 0, NULL, UINT32) attribute(` ISs', Verify, kVerify, "Verify", 0, NULL, UINT32) attribute(` ISs', SignRecover, kSignRecover, "SignRecover", 0, NULL, UINT32) attribute(` ISs', VerifyRecover, kVerifyRecover, "VerifyRecover", 0, NULL, UINT32) attribute(` ISs', Wrap, kWrap, "Wrap", 0, NULL, UINT32) attribute(` ISs', Unwrap, kUnwrap, "Unwrap", 0, NULL, UINT32) endClass() } // end namespace KeySchema