VCSAgRegister(const char *notify_res_name,
This primitive requests that the agent framework notify the resource notify_res_name
when the value of the attribute attr_name
of the resource res_name
is modified. The notification is made by calling the attr_changed
entry point for notify_res_name
.
Note that notify_res_name
can be the same as res_name
.
This primitive can be called from any entry point, but it is useful only when the attr_changed
entry point is implemented. For example:
void res_open(const char *res_name, void **attr_val) {
// Register to get notified when the
// "CriticalAttr" of this resource is modified.
VCSAgRegister(res_name, res_name, "CriticalAttr");
// Register to get notified when the
// "CriticalAttr" of "CentralRes" is modified.
VCSAgRegister(res_name, "CentralRes",
// Register to get notified when the
// "CriticalAttr" of another resource is modified.
// It is assumed that the name of the other resource
// is given as the first ArgList attribute.