Return a list of all registered procedures for which a client thread has notification requests pending.
CS_RETCODE srv_regwatchlist(spp, proclistp)
SRV_PROC *spp; SRV_PROCLIST **proclistp;
A pointer to an internal thread control structure.
A pointer to a pointer to a structure that contains the number of registered procedures and the names of each registered procedure. Open Server allocates the space for this structure.
Returns |
To indicate |
---|---|
CS_SUCCEED |
The routine completed successfully. |
CS_FAIL |
The routine failed. |
#include <ospublic.h>
/*
** Local Prototype.
*/
CS_RETCODE ex_srv_regwatchlist PROTOTYPE((
SRV_PROC *spp
));
/*
** EX_SRV_REGWATCHLIST
**
** Example routine to get a list of all registered procedures
** for which a client thread has notifications pending.
**
** Arguments:
** spp A pointer to an internal thread control structure.
**
** Returns:
**
** CS_SUCCEED The list returned successfully.
** CS_FAIL An error was detected.
*/
CS_RETCODE ex_srv_regwatchlist(spp)
SRV_PROC *spp;
{
SRV_PROCLIST *listp;
if (srv_regwatchlist(spp, &listp) == CS_FAIL)
return (CS_FAIL);
/*
** Process the information in the list and free the
** memory allocated for the list.
*/
(CS_VOID)srv_reglistfree(spp, listp);
return (CS_SUCCEED);
}
srv_regwatchlist returns a list of registered procedures for which the client thread has requested notification.
The proclistp parameter points to a SRV_PROCLIST structure that is allocated and initialized by Open Server. The SRV_PROCLIST structure looks like this:
typedef struct srv__proclist
{
CS_INT num_procs; /* The number of procedure names */
CS_CHAR **proc_list; /* The list of procedure names */
} SRV_PROCLIST;
An application deallocates the SRV_PROCLIST structure by calling srv_reglistfree.