Syntax for C++ offline

unsigned int

res_offline(const char *res_name, void **attr_val);

You may select any name for the function.

Set the VCSAgValidateAndSetEntryPoint() parameter to the name of the entry point's function.

In the following example, the function res_offline is defined as the Offline entry point.

For example:

#include "VCSAgApi.h"

unsigned int

res_offline(const char *res_name, void **attr_val) {

// Implement the code to offline a resource here.

...

// If monitor can check the state of the resource

// immediately, return 0. Otherwise, return the

// appropriate number of seconds to wait before

// calling monitor.

return 0;

}

void VCSAgStartup()

{

VCSAG_LOG_INIT("VCSAgStartup");

VCSAgSetLogCategory(10051);

VCSAgInitEntryPointStruct(V50);

VCSAgValidateAndSetEntryPoint(VCSAgEPMonitor, res_monitor);

VCSAgValidateAndSetEntryPoint(VCSAgEPOnline, res_online);

VCSAgValidateAndSetEntryPoint(VCSAgEPOffline, res_offline);

VCSAgValidateAndSetEntryPoint(VCSAgEPClean, res_clean);

}