skip book previous and next navigation links
go up to top of book: HP Open Source Security for OpenVMS Volume 1:... HP Open Source Security for OpenVMS Volume 1:...
go to beginning of reference: API FunctionsAPI Functions
go to previous page: DL_DataInsertDL_DataInsert
go to next page: DL_DbCloseDL_DbClose
end of book navigation links


DL_DataModify
Library
Description
Errors
 Parameters
Return Value
See Also

NAME

DL_DataModify: CSSM_DL_DataModify - Modify persistent data record (CDSA)

SYNOPSIS  

# include <cssm.h>

API:CSSM_RETURN CSSMAPI CSSM_DL_DataModify(CSSM_DL_DB_HANDLE DLDBHandle,CSSM_DB_RECORDTYPE RecordType,CSSM_DB_UNIQUE_RECORD_PTR UniqueRecordIdentifier,const CSSM_DB_RECORD_ATTRIBUTE_DATA *AttributesToBeModified,const CSSM_DATA *DataToBeModified,CSSM_DB_MODIFY_MODE ModifyMode)SPI:CSSM_RETURN CSSMDLI DL_DataModify(CSSM_DL_DB_HANDLE DLDBHandle,CSSM_DB_RECORDTYPE RecordType,CSSM_DB_UNIQUE_RECORD_PTR UniqueRecordIdentifier,const CSSM_DB_RECORD_ATTRIBUTE_DATA *AttributesToBeModified,const CSSM_DATA *DataToBeModified,CSSM_DB_MODIFY_MODE ModifyMode)


return to top LIBRARY  

Common Security Services Manager library (cdsa$incssm300_shr.exe)


return to top PARAMETERS  

DLDBHandle (input)
 The handle pair that describes the add-in data storagelibrary module to be used to perform this function and the opendata store to search for records satisfying the query.
RecordType (input)
 Indicates the type of data record being modified.
UniqueRecordIdentifier (input/output)
 A pointer to a CSSM_DB_UNIQUE_RECORD containinga unique identifier associated with the record to modify. If themodification succeeds, the UniqueRecordIdentifier pointsto a CSSM_DB_UNIQUE_RECORD containing a unique identifier associatedwith the updated record. If the modification fails, the UniqueRecordIdentifier isnot modified.
AttributesToBeModified (input/optional)
 A list of structures containing the attribute valuesto be stored in that attribute and the meta information (schema)describing those attributes. The list contains at most one entry perattribute in the specified record type. The specified AttributeFormat foreach attribute must match that of the database schema, otherwisethe error CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT is returned. If anattribute is of type CSSM_DB_ATTRIBUTE_FORMAT_STRING and the valuespecified for that string includes a null-terminator, then the lengthcount in the CSSM_DATA structure containing the input string shouldinclude the terminating character. (If null-terminators are used, theyshould be used consistently when storing, searching, and retrievingthe string value, otherwise selection predicates will not locateexpected matches.) Each attribute specified is modified accordingto the value of ModifyMode (see table in the DESCRIPTION sectionof this definition). Those attributes that are not specified aspart of this parameter remain unchanged. If the AttributesToBeModified parameteris NULL, no attribute modification occurs.
DataToBeModified (input/optional)
 A pointer to the CSSM_DATA structure which containsthe opaque data object to be stored in the data record. If thisparameter is NULL, no Data modification occurs.
ModifyMode (input)
 A CSSM_DB_MODIFY_MODE value indicating the typeof modification to be performed on the record attributes identifiedby AttributesToBeModified. If no attributes arespecified, then this value must be CSSM_DB_MODIFY_ATTRIBUTE_NONE.


return to top DESCRIPTION  

This function modifies the persistent data record identifiedby the UniqueRecordIdentifier. The modificationsare specified by the Attributes and Data parameters.The ModifyMode indicates how the attributes areto be updated. The ModifyMode has no affect onupdating the data blob contained in the record. If the data blobis the only record attribute being updated by this function call,then the modification mode must be 0. The current modification modesbehave as follows:

ModifyModeValue
FunctionBehavior
CSSM_DB_MODIFY_ATTRIBUTE_NONE
No Attributes arebeing updated.
CSSM_DB_MODIFY_ATTRIBUTE_ADD
The specified valuesare added to the set of current values for each attribute. If 0values are specified then the error CSSMERR_DL_INVALID_MODIFY_MODEis returned. If a DL does not support multiple values per attribute,the error CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED is returned.
CSSM_DB_MODIFY_ATTRIBUTE_DELETE
The specified valuesare removed from the set of current values for each attribute. If0 values are specified then all values are deleted or the attributesvalue is replaced with the default for this attribute. If a DL doesnot support multiple values per attribute, the error CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTEDis returned.
CSSM_DB_MODIFY_ATTRIBUTE_REPLACE
The values for each attributeare replaced with the specified set of values for each attribute.If no values are specified then all values are deleted or the attributesvalue is replaced with the default for this attribute. If a DL doesnot support multiple values per attribute, the error CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTEDis returned when more than 1 value is specified.

If the attribute lists specifies an attribute that is notdefined in the database's meta-information, an error condition isreturned. For each attribute-value pair, the value replaces thecorresponding attribute value in the record. If a data value isspecified, the record's data value is replaced with the specifiedvalue. A record's data value or attribute values can be set to NULLor zero to represent deletion or the lack of a known value.

If the record referenced by UniqueRecordIdentifier hasbeen modified since the last time it was updated, the error CSSMERR_DL_STALE_UNIQUE_RECORDis returned and no modification takes place.


return to top RETURN VALUE  

A CSSM_RETURN value indicating success or specifying a particularerror condition. The value CSSM_OK indicates success. All othervalues represent an error condition.


return to top ERRORS  

Errors are described in the CDSA Technical Standard.
CSSMERR_DL_FIELD_SPECIFIED_MULTIPLECSSMERR_DL_INCOMPATIBLE_FIELD_FORMATCSSMERR_DL_INVALID_DB_HANDLECSSMERR_DL_INVALID_FIELD_NAMECSSMERR_DL_INVALID_MODIFY_MODECSSMERR_DL_INVALID_RECORDTYPECSSMERR_DL_INVALID_RECORD_UIDCSSMERR_DL_INVALID_UNIQUE_INDEX_DATACSSMERR_DL_INVALID_VALUECSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTEDCSSMERR_DL_STALE_UNIQUE_RECORD


return to top SEE ALSO  

Books

Intel CDSA Application Developer's Guide

Online Help

Functions for the CSSM API:

CSSM_DL_DataInsert, CSSM_DL_DataDelete

Functions for the DL SPI:

DL_DataInsert, DL_DataDelete


go to previous page: DL_DataInsertDL_DataInsert
go to next page: DL_DbCloseDL_DbClose