nrac_consumer_remove_from_resource()
Abstract
Delete the association between a consumer and a resource.
Syntax
nrac_consumer_remove_from_resource (resource_handle, consumer_handle, event_handle)
| Argument | Type | Description |
|---|---|---|
resource_handle |
Nrac_Resource_Handle |
handle for the resource currently in use by the consumer |
consumer_handle |
Nrac_Consumer_Handle |
handle for the consumer that will be removed. Use NRAC_ANY_CONSUMER to remove all consumers. |
event_handle |
Nrac_Event_Handle |
handle for a conditionalizing event; use NRAC_ANY_EVENT to indicate that the event does not matter. |
Return Type
int
number of consumers actually removed from the resource. Due to conditional events, the same resource may be removed several times from a given resource.
Header
nrac.h
Details
In its simplest form, this function allows you to undo the effect of a call to nrac_resource_consumer_add(), one consumer at a time. If a specific consumer and a specific event are passed in, and a matching consumer is found on the resource, subject to the desired event, then the consumer is removed. Either or both the consumer handle and the event handle can be wildcarded with NRAC_ANY_CONSUMER and NRAC_ANY_EVENT, respectively. “Any” consumer means that all consumers would be removed, still subject to the specified event. “Any” event means that the event is not considered in the matching—all matching consumers are removed irrespective of any event they may be contingent upon.