1/* 2 * Copyright (c) 2004 Apple Computer, 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 24 25 26#include "Database.h" 27#include "CommonCode.h" 28 29 30 31Database::Database (AttachedInstance *ai) : mAttachedInstance (ai) 32{ 33} 34 35 36 37Database::~Database () 38{ 39} 40 41 42 43void Database::DbOpen (const char* DbName, 44 const CSSM_NET_ADDRESS *dbLocation, 45 const CSSM_DB_ACCESS_TYPE accessRequest, 46 const CSSM_ACCESS_CREDENTIALS *accessCredentials, 47 const void* openParameters) 48{ 49 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 50} 51 52 53 54void Database::DbClose () 55{ 56 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 57} 58 59 60 61void Database::DbCreate (const char* dbName, 62 const CSSM_NET_ADDRESS *dbLocation, 63 const CSSM_DBINFO *dbInfo, 64 const CSSM_DB_ACCESS_TYPE accessRequest, 65 const CSSM_RESOURCE_CONTROL_CONTEXT *credAndAclEntry, 66 const void *openParameters) 67{ 68 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 69} 70 71 72 73void Database::DbCreateRelation (CSSM_DB_RECORDTYPE relationID, 74 const char* relationName, 75 uint32 numberOfAttributes, 76 const CSSM_DB_SCHEMA_ATTRIBUTE_INFO *pAttributeInfo, 77 uint32 numberOfIndexes, 78 const CSSM_DB_SCHEMA_INDEX_INFO *pIndexInfo) 79{ 80 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 81} 82 83 84 85void Database::DbDestroyRelation (CSSM_DB_RECORDTYPE relationID) 86{ 87 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 88} 89 90 91 92void Database::DbAuthenticate (CSSM_DB_ACCESS_TYPE accessRequest, 93 const CSSM_ACCESS_CREDENTIALS *accessCred) 94{ 95 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 96} 97 98 99 100void Database::DbGetDbAcl (CSSM_STRING* selectionTag, 101 uint32 *numberOfAclInfos) 102{ 103 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 104} 105 106 107 108void Database::DbChangeDbAcl (const CSSM_ACCESS_CREDENTIALS *accessCred, 109 const CSSM_ACL_EDIT *aclEdit) 110{ 111 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 112} 113 114 115 116void Database::DbGetDbOwner (CSSM_ACL_OWNER_PROTOTYPE_PTR owner) 117{ 118 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 119} 120 121 122 123void Database::DbChangeDbOwner (const CSSM_ACCESS_CREDENTIALS *accessCred, 124 const CSSM_ACL_OWNER_PROTOTYPE *newOwner) 125{ 126 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 127} 128 129 130 131 132void Database::DbGetDbNameFromHandle (char** dbName) 133{ 134 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 135} 136 137 138 139void Database::DbDataInsert (CSSM_DB_RECORDTYPE recordType, 140 const CSSM_DB_RECORD_ATTRIBUTE_DATA *attributes, 141 const CSSM_DATA *data, 142 CSSM_DB_UNIQUE_RECORD_PTR *uniqueId) 143{ 144 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 145} 146 147 148 149void Database::DbDataDelete (const CSSM_DB_UNIQUE_RECORD *uniqueRecordIdentifier) 150{ 151 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 152} 153 154 155 156void Database::DbDataModify (CSSM_DB_RECORDTYPE recordType, 157 CSSM_DB_UNIQUE_RECORD_PTR uniqueRecordIdentifier, 158 const CSSM_DB_RECORD_ATTRIBUTE_DATA attributesToBeModified, 159 const CSSM_DATA *dataToBeModified, 160 CSSM_DB_MODIFY_MODE modifyMode) 161{ 162 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 163} 164 165 166 167CSSM_HANDLE Database::DbDataGetFirst (const CSSM_QUERY *query, 168 CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR attributes, 169 CSSM_DATA_PTR data, 170 CSSM_DB_UNIQUE_RECORD_PTR *uniqueID) 171{ 172 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 173 174 return 0; 175} 176 177 178 179bool Database::DbDataGetNext (CSSM_HANDLE resultsHandle, 180 CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR attributes, 181 CSSM_DATA_PTR data, 182 CSSM_DB_UNIQUE_RECORD_PTR *uniqueID) 183{ 184 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 185} 186 187 188 189void Database::DbDataAbortQuery (CSSM_HANDLE resultsHandle) 190{ 191 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 192} 193 194 195 196 197void Database::DbDataGetFromUniqueRecordID (const CSSM_DB_UNIQUE_RECORD_PTR uniqueRecord, 198 CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR attributes, 199 CSSM_DATA_PTR data) 200{ 201 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 202} 203 204 205 206 207void Database::DbFreeUniqueRecord (CSSM_DB_UNIQUE_RECORD_PTR uniqueRecord) 208{ 209 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 210} 211 212 213 214 215void Database::DbPassThrough (uint32 passThroughID, const void* inputParams, void **outputParams) 216{ 217 CSSMError::ThrowCSSMError (CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED); 218} 219 220 221