Contenues dansTrouver plus de documentationRessources d'assistance comprises | Télécharger cet ouvrage au format PDF (1911 Ko)
labelbuilder(3TSOL)Name | Synopsis | Description | Return Values | Examples | Files | Attributes | See Also | Notes Name
Synopsiscc [flag...] file... -ltsol -lDtTsol [library...] #include <Dt/ModLabel.h>
ModLabelData *tsol_lbuild_create(Widget widget,
void (*event_handler)() ok_callback,
lbuild_attributes extended_operation, ..., NULL);
void *tsol_lbuild_get(ModLabelData *data,
lbuild_attributes extended_operation);
void tsol_lbuild_set(ModLabelData *data,
lbuild_attributes extended_operation, ..., NULL);
void tsol_lbuild_destroy(ModLabelData *data); Description
The label builder user interface prompts the end user for information and generates a valid sensitivity label or clearance from the user input based on specifications in the label_encodings(4) file on the system where the application runs. The end user can build the label or clearance by typing a text value or by interactively choosing options. Application-specific functionality is implemented in the callback for the OK pushbutton. This callback is passed to the tsol_lbuild_create() call where it is mapped to the OK pushbutton widget. When choosing options, the label builder shows the user only those classifications (and related compartments and markings) dominated by the workspace sensitivity label unless the executable has the PRIV_SYS_TRANS_LABEL privilege in its effective set. If the end user does not have the authorization to upgrade or downgrade labels, or if the user-built label is out of the user's accreditation range, the OK and Reset pushbuttons are grayed. There are no privileges to override these restrictions. tsol_lbuild_create() creates the graphical user interface and returns a pointer variable of type ModLabeldata* that contains information on the user interface. This information is a combination of values passed in the tsol_lbuild_create() input parameter list, default values for information not provided, and information on the widgets used by the label builder to create the user interface. All information except the widget information should be accessed with the tsol_lbuild_get() and tsol_lbuild_set() routines. The widget information is accessed directly by referencing the following fields of the ModLabelData structure. The tsol_lbuild_create() parameter list takes the following values: tsol_lbuild_destroy() destroys the ModLabelData structure returned by tsol_lbuild_create(). tsol_lbuild_get() and tsol_lbuild_set() access the information stored in the ModLabelData structure returned by tsol_lbuild_create(). The following extended operations can be passed to tsol_lbuild_create() to build the user interface, to tsol_lbuild_get() to retrieve information on the user interface, and to tsol_lbuild_set() to change the user interface information. All extended operations are valid for tsol_lbuild_get(), but the *WORK* operations are not valid for tsol_lbuild_set() or tsol_lbuild_create() because these values are set from input supplied by the end user. These exceptions are noted in the descriptions. Return ValuesThe tsol_lbuild_get() function returns -1 if it is unable to get the value. The tsol_lbuild_create() function returns a variable of type ModLabelData that contains the information provided in the tsol_lbuild_create() input parameter list, default values for information not provided, and information on the widgets used by the label builder to create the user interface. ExamplesExample 1 Create a Label Builder.
Example 2 Query the Mode and Display the Label Builder.These examples call the tsol_lbuild_get() function to query the mode being used, and call the tsol_lbuild_set() function so the label builder dialog box displays.
Example 3 Destroy the ModLabelData Variable.This example destroys the ModLabelData variable returned in the call to tsol_lbuild_create().
Files
AttributesSee attributes(5) for descriptions of the following attributes:
See Alsolibtsol(3LIB), label_encodings(4), attributes(5) Label Builder APIs in Solaris Trusted Extensions Developer’s Guide NotesThe functionality described on this manual page is available only if the system is configured with Trusted Extensions. Name | Synopsis | Description | Return Values | Examples | Files | Attributes | See Also | Notes |
|||||||||