.\" pragma ident "@(#)KcsCreateProfile.3 1.3 04/21/95" .TH KcsCreateProfile 3 "21 April 1995" "" "KCMS Library" .SH NAME KcsCreateProfile \- Create an empty profile .SH SYNOPSIS .ft B .nf #include #include .sp KcsStatusId KcsCreateProfile( KcsProfileId *resultProfileId, KcsCreationDesc *desc) .fi .ft R .SH MT-LEVEL MT-Unsafe .SH DESCRIPTION .B KcsCreateProfile() creates an empty profile. The profile will contain neither attributes nor CMM-specific data. .SH ARGUMENTS .TP .SB resultProfileId The reference to the resultant profile, returned if the function executes successfully. .TP .SB desc Is a pointer to a KcsCreationDesc. desc supplies a way for the application to describe the static store used to save the profile to and an extendable union of profile information used to create it. The id member of the union describes which CMM and version to use and the profile format and version to use. If desc is NULL the default CMM and profile format will be used. .SH RETURN VALUES Upon successful completion KCS_SUCCESS is returned. Otherwise one of the following errors will be returned. .SH ERRORS KCS_MEM_ALLOC_ERROR .SH NOTE You cannot call KcsGetAttribute(3) for a list of the installed and available CMMs. The workaround is to load all available profiles and do a KcsGetAttribute(3) for each individual CMM type. .SH SEE ALSO .BR KcsFreeProfile (3) .BR KcsGetAttribute (3) .BR KcsLoadProfile (3) .BR KcsUpdateProfile (3) .BR KcsSaveProfile (3) .BR KcsSetAttribute (3) .br .BR "KCMS Application Developers Guide" .SH EXAMPLE .nf KcsProfileDesc desc; KcsCreationDesc c_desc; KcsProfileId profileid; KcsStatusId status; KcsErrDesc errDesc; /* The filename is a command line argument */ /* Create a new profile with the default CMM */ desc.type = KcsSolarisProfile; desc.desc.solarisFile.fileName = argv[1]; desc.desc.solarisFile.hostName = NULL; desc.desc.solarisFile.oflag = O_RDWR|O_CREAT|O_TRUNC; desc.desc.solarisFile.mode = 0666; c_desc.desc.id.desc = &desc; c_desc.desc.id.cmmId = 0; c_desc.desc.id.cmmVersionId = 0; c_desc.desc.id.profileVersionId = 0; status = KcsCreateProfile(&profileid, &c_desc); if(status != KCS_SUCCESS) { KcsGetLastError(&errDesc); printf("CreateProfile error: %s\\n", errDesc.desc); exit(1); } /* Note that other required fields in the profile need to be set * via KcsSetAttribute */ .fi