< Previous | Next > | |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 Agent Developer's Guide |
C++ Entry Point SyntaxThe following paragraphs describes the syntax for C++ entry points. VCSAgStartupvoid VCSAgStartup(); The entry point VCSAgStartup() must use the primitive VCSAgRegisterEPStruct() to register the other entry points with the VCS agent framework. (See "VCS Primitives.) Note that the name of the C++ function must be VCSAgStartup(). // This example shows the VCSAgStartup() entry point // implementation,assuming that the monitor, online, and // offline entry points are implemented in C++ and the respective // function names are res_monitor, res_online, and res_offline. #include "VCSAgApi.h" void VCSAgStartup() { VCSAgV40EntryPointStruct ep; ep.open = NULL; ep.close = NULL; ep.monitor = res_monitor; ep.online = res_online; ep.offline = res_offline; ep.action = NULL; ep.info = NULL; ep.attr_changed = NULL; ep.clean = NULL; ep.shutdown = NULL; VCSAgRegisterEPStruct(V40, &ep); } VCSAgResState res_monitor(const char *res_name, void **attr_val, int *conf_level) { ... } unsigned int res_online(const char *res_name, void **attr_val) { ... } unsigned int res_offline(const char *res_name, void **attr_val) { ... } |
^ Return to Top | < Previous | Next > |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 Agent Developer's Guide | |
VERITAS Software Corporation
www.veritas.com |