bstr_object_get_attributes(3) — Subroutines
Name
bstr_object_get_attributes − Returns the requested attributes of a specified object.
Syntax
bstr_t_status bstr_object_get_attributes (
bstr_t_reference ∗object,
bstr_t_descriptor ∗attributes_name,
bstr_t_rcb ∗control,
bstr_t_sequence ∗attributes);
Description
The bstr_object_get_attributes procedure returns the attribute values of the object specified in object.
If no attributes are specified in attributes_name, BASEstar Open returns ALL the attributes of the object in question; otherwise, it returns the values of the attributes whose names are specified by the attributes_name argument. If none of the requested attributes have been set, BASEstar Open returns an empty sequence.
Arguments
object
access: read
The reference of the object whose attributes are to be retrieved.
attributes_name
access: read
The address of a bstr_t_descriptor data structure containing the address of an array and the number of its elements. Each element in the array must be of the bstr_t_attribute_name type, and must be assigned the name of the attribute whose value is to be read. If the attributes_name argument is set to NULL, the values of all the attributes are returned.
control
access: read
The address of the optional request control block.
attributes
access: write
The address of a sequence. Each element in the sequence carries the identifier and the value of one of the requested attributes, unless none of the requested attributes have been set, in which case the sequence is empty. Depending on its associated datatype, the attribute value can be an immediate value, a reference to another object or an address to a nested sequence. As a result, the relevant fields returned in each bstr_t_sequence element are as follows:
•type. Specifies the type of sequence element according to the attribute value returned:
•BSTR_C_VALUE, for an immediate value
•BSTR_C_REFERENCE, for a reference to another object
•BSTR_C_SEQUENCE, for a nested sequence.
•attribute_name. A constant identifying the attribute whose value is returned in the sequence element.
•size. Contains the size of the value buffer (that is, the size of the attribute value).
•value. The address of the buffer containing the value of an attribute. Depending on the contents of the type field, it returns one of the following:
•BSTR_C_VALUE. The address of a buffer containing the attribute value. The allocated buffer is consistent with the attribute value type.
•BSTR_C_REFERENCE. The address of a bstr_t_reference variable which contains a reference to another object.
•
BSTR_C_SEQUENCE. The address of a bstr_t_sequence variable which specifies the address of a nested sequence.
Return Values
| BSTR_S_ABORTED | Operation aborted |
| BSTR_S_ATTRIBUTE_IGNORED | Attribute (or attributes) ignored because not supported on Volatile |
| BSTR_S_BAD_BUFFER | Bad sequence buffer |
| BSTR_S_BAD_PARAMETER | Bad parameter value |
| BSTR_S_BAD_REFERENCE | Bad reference |
| BSTR_S_COMMUNICATION_ERROR | Communication error |
| BSTR_S_COM_PC_SIZE_MISMATCH | Number of bytes requested does not match the number of bytes returned |
| BSTR_S_FINISH | Request aborted by bstr_finish |
| BSTR_S_INTERNAL_ERROR | Internal error |
| BSTR_S_INTR | Operation interrupted |
| BSTR_S_INVALID_NAME | Invalid name |
| BSTR_S_INVALID_OPERATION | Invalid operation |
| BSTR_S_INVALID_RCB | Invalid Request Control Block |
| BSTR_S_NORMAL | Normal successful completion |
| BSTR_S_NO_MEMORY | Insufficient virtual memory |
| BSTR_S_REFERENCE_IN_USE | Reference already in use |
| BSTR_S_SEQUENCE_IN_USE | Sequence already in use |
| BSTR_S_SERVER_NOT_REACHABLE | Server not reachable |
| BSTR_S_TIMEOUT | Timeout expired |
| BSTR_S_TOO_MANY_REQUESTS | Too many pending requests |