- Adapted indenation to new agreed upon system
- Added support for second generation scriptcontext based counter
This commit is contained in:
34
polldriv.h
34
polldriv.h
@ -11,18 +11,18 @@
|
||||
#include <time.h>
|
||||
#include <sics.h>
|
||||
/*==================== a data structure ===================================*/
|
||||
typedef struct __POLLDRIV{
|
||||
char *objectIdentifier; /* the object identifier */
|
||||
void *objPointer; /* a pointer to the object */
|
||||
time_t nextPoll; /* next polling time */
|
||||
int pollIntervall; /* poll intervall */
|
||||
int (*isDue)(struct __POLLDRIV *self, time_t now, SConnection *pCon);
|
||||
/* function called to determine if this object must be polled */
|
||||
int (*poll)(struct __POLLDRIV *self, SConnection *pCon);
|
||||
/* the actual polling function */
|
||||
void (*killObjPointer)(void *data);
|
||||
/* a function to possibly kill the objPointer. Can be NULL */
|
||||
}PollDriv, *pPollDriv;
|
||||
typedef struct __POLLDRIV {
|
||||
char *objectIdentifier; /* the object identifier */
|
||||
void *objPointer; /* a pointer to the object */
|
||||
time_t nextPoll; /* next polling time */
|
||||
int pollIntervall; /* poll intervall */
|
||||
int (*isDue) (struct __POLLDRIV * self, time_t now, SConnection * pCon);
|
||||
/* function called to determine if this object must be polled */
|
||||
int (*poll) (struct __POLLDRIV * self, SConnection * pCon);
|
||||
/* the actual polling function */
|
||||
void (*killObjPointer) (void *data);
|
||||
/* a function to possibly kill the objPointer. Can be NULL */
|
||||
} PollDriv, *pPollDriv;
|
||||
/*==================== the interface =====================================*/
|
||||
/*
|
||||
* make a poll driver
|
||||
@ -33,12 +33,12 @@ typedef struct __POLLDRIV{
|
||||
* @param *argv[] Additional parameters.
|
||||
* @return NULL on failure or a PollDriv strucure else.
|
||||
*/
|
||||
pPollDriv makePollDriver(SConnection *pCon, char *driver,
|
||||
char *objectIdentifier, int argc, char *argv[]);
|
||||
pPollDriv makePollDriver(SConnection * pCon, char *driver,
|
||||
char *objectIdentifier, int argc, char *argv[]);
|
||||
/**
|
||||
* free all memory associated with this poll driver
|
||||
* @param self The structure to delete
|
||||
*/
|
||||
void deletePollDriv(pPollDriv self);
|
||||
|
||||
#endif /*POLLDRIV_H_*/
|
||||
void deletePollDriv(pPollDriv self);
|
||||
|
||||
#endif /*POLLDRIV_H_ */
|
||||
|
Reference in New Issue
Block a user