BALTECH Docs |
C API for BALTECH SDK
|
BRP_LIB brp_protocol brp_detach_layer | ( | brp_protocol | composite_protocol, |
brp_layer_id | layer_id | ||
) |
Removes a protocol from a composite protocol stack without destroying.
After calling this function, the application is responsible for destroying the returned protocol object (expect it was NULL)!
This function ensures, that the detached protocol will be closed. All other layers will be kept open, except the closed protocol was the I/O layer. In the latter case the other protocols will be closed, too.
The protocol layer will keep intact, so that you can insert another protocol at exactly the same position, later when specifing the same layer_id.
composite_protocol | composite protocol to where layer shall be removed from |
layer_id | identification of layer (see BRP_LAYERID_*, i.e. BRP_LAYERID_BRP) which protocol shall be detached |