PLUSOBJS:=Event.o Job.o JobStatus.o Notification.o ServerConnection.o
-HDRS:=consumer.h dump.h Job.h load.h notification.h \
- Notification.h purge.h ServerConnection.h statistics.h
+HDRS:=consumer.h notification.h query.h statistics.h \
+ Job.h Notification.h ServerConnection.h
FAKE_HDRS:=consumer_fake.h producer_fake.h
GEN_HDRS:=JobStatus.h producer.h interface_version.h
+++ /dev/null
-#ifndef __GLITE_LB_DUMP_H__
-#define __GLITE_LB_DUMP_H__
-
-#ident "$Header$"
-
-#define EDG_WLL_DUMP_NOW -1
-#define EDG_WLL_DUMP_LAST_START -2
-#define EDG_WLL_DUMP_LAST_END -3
-/* if adding new attribute, add conversion string to common/xml_conversions.c too !! */
-
-typedef struct {
- time_t from,to;
-} edg_wll_DumpRequest;
-
-typedef struct {
- char *server_file;
- time_t from,to;
-} edg_wll_DumpResult;
-
-/** Dump events in a given time interval
- */
-
-int edg_wll_DumpEvents(
- edg_wll_Context,
- const edg_wll_DumpRequest *,
- edg_wll_DumpResult *
-);
-
-#endif /* __GLITE_LB_DUMP_H__ */
+++ /dev/null
-#ifndef __GLITE_LB_LOAD_H__
-#define __GLITE_LB_LOAD_H__
-
-#ident "$Header$"
-
-typedef struct {
- char *server_file;
-} edg_wll_LoadRequest;
-
-typedef struct {
- char *server_file;
- time_t from,to;
-} edg_wll_LoadResult;
-
-/** Load events from a given file into the database
- * \retval EPERM operation not permitted
- * \retval ENOENT file not found
- */
-
-int edg_wll_LoadEvents(
- edg_wll_Context,
- const edg_wll_LoadRequest *,
- edg_wll_LoadResult *
-);
-
-#endif /* __GLITE_LB_LOAD_H__ */
#include "glite/wmsutils/jobid/cjobid.h"
#include "glite/lb/notifid.h"
+#include "glite/lb/notif_rec.h"
#include "glite/lb/context.h"
#include "consumer.h"
time_t *valid
);
-typedef enum _edg_wll_NotifChangeOp {
- /** No operation, equal to not defined */
- EDG_WLL_NOTIF_NOOP = 0,
- /** Replace notification registration with new one */
- EDG_WLL_NOTIF_REPLACE,
- /** Add new condition when to be notifed */
- EDG_WLL_NOTIF_ADD,
- /** Remove condition on notification */
- EDG_WLL_NOTIF_REMOVE
-/* if adding new attribute, add conversion string to common/xml_conversions.c too !! */
-} edg_wll_NotifChangeOp;
-
/** Modify the query conditions for this notification.
*
* If op is either EDG_WLL_NOTIF_ADD or EDG_WLL_NOTIF_REMOVE, for the sake
* \param[in] id notification ID you are working with
* \param[in] conditions same as for \ref edg_wll_NotifNew
* \param[in] op action to be taken on existing conditions,
- * \ref edg_wll_NotifChangeOp
+ * \ref edg_wll_NotifChangeOp (defined in common notif_rec.h)
*/
int edg_wll_NotifChange(
edg_wll_Context context,
+++ /dev/null
-#ifndef __GLITE_LB_PURGE_H__
-#define __GLITE_LB_PURGE_H__
-
-#ident "$Header$"
-
-/** Purge or dump request */
-typedef struct _edg_wll_PurgeRequest {
- char **jobs; /**< list of jobid's to work on */
-
-/** Purge jobs that are in the given states and "untouched" at least for the
- * specified interval.
- * Currently applicable for CLEARED, ABORTED, CANCELLED and OTHER (catchall).
- * The other array members are for future extensions.
- * Negative values stand for server defaults.
- */
- time_t timeout[EDG_WLL_NUMBER_OF_STATCODES];
-#define EDG_WLL_PURGE_JOBSTAT_OTHER EDG_WLL_JOB_UNDEF
-
-
-/**
- * Actions to be taken and information required.
- */
- int flags;
-
-/** no dry run */
-#define EDG_WLL_PURGE_REALLY_PURGE 1
-/** return list of jobid matching the purge/dump criteria */
-#define EDG_WLL_PURGE_LIST_JOBS 2
-/** dump to a file on the sever */
-#define EDG_WLL_PURGE_SERVER_DUMP 4
-/** TODO: stream the dump info to the client */
-#define EDG_WLL_PURGE_CLIENT_DUMP 8
-/* ! when addning new constant, add it also to common/xml_conversions.c ! */
-
-
-/** private request processing data (for the reentrant functions) */
-/* TODO */
-
-} edg_wll_PurgeRequest;
-
-/** Output data of a purge or dump */
-typedef struct _edg_wll_PurgeResult {
- char *server_file; /**< filename of the dump at the server */
- char **jobs; /**< affected jobs */
-/* TODO: output of the streaming interface */
-} edg_wll_PurgeResult;
-
-
-/** Client side purge/dump
- * \retval EAGAIN only partial result returned, call repeatedly to get all
- * output data
- */
-int edg_wll_Purge(
- edg_wll_Context ctx,
- edg_wll_PurgeRequest *request,
- edg_wll_PurgeResult *result
-);
-
-#endif /* __GLITE_LB_PURGE_H__ */
--- /dev/null
+#ifndef __GLITE_LB_QUERY_H__
+#define __GLITE_LB_QUERY_H__
+
+#ident "$Header$"
+
+#include <glite/lb/query_rec.h>
+#include <glite/lb/context.h>
+
+/** Client side purge
+ * \retval EAGAIN only partial result returned, call repeatedly to get all
+ * output data
+ */
+int edg_wll_Purge(
+ edg_wll_Context ctx,
+ edg_wll_PurgeRequest *request,
+ edg_wll_PurgeResult *result
+);
+
+/** Dump events in a given time interval
+ */
+
+int edg_wll_DumpEvents(
+ edg_wll_Context,
+ const edg_wll_DumpRequest *,
+ edg_wll_DumpResult *
+);
+
+/** Load events from a given file into the database
+ * \retval EPERM operation not permitted
+ * \retval ENOENT file not found
+ */
+
+int edg_wll_LoadEvents(
+ edg_wll_Context,
+ const edg_wll_LoadRequest *,
+ edg_wll_LoadResult *
+);
+
+#endif /* __GLITE_LB_QUERY_H__ */
#include "glite/lb/xml_parse.h"
#include "glite/lb/mini_http.h"
-#include "dump.h"
+#include "query.h"
#include "consumer.h"
#define dprintf(x) { if (debug) printf x; }
#include "glite/lb/xml_parse.h"
#include "glite/lb/mini_http.h"
-#include "load.h"
+#include "query.h"
#include "consumer.h"
#define dprintf(x) { if (debug) printf x; }
#include "glite/lb/xml_parse.h"
#include "glite/lb/mini_http.h"
-#include "purge.h"
+#include "query.h"
#include "consumer.h"
#define dprintf(x) { if (debug) printf x; }
HDRS:=context.h context-int.h lb_plain_io.h mini_http.h authz.h xml_parse.h \
xml_conversions.h log_proto.h events_parse.h il_string.h il_msg.h \
- escape.h ulm_parse.h trio.h lb_maildir.h connpool.h notifid.h \
+ escape.h ulm_parse.h trio.h lb_maildir.h connpool.h notifid.h notif_rec.h \
query_rec.h LoggingExceptions.h CountRef.h ${PERF_HDRS}
GEN_HDRS:=Event.h events.h jobstat.h
--- /dev/null
+#ifndef __GLITE_LB_NOTIF_REC_H__
+#define __GLITE_LB_NOTIF_REC_H__
+
+#ident "$Header$"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Enum used by edg_wll_NotifChange */
+typedef enum _edg_wll_NotifChangeOp {
+ /** No operation, equal to not defined */
+ EDG_WLL_NOTIF_NOOP = 0,
+ /** Replace notification registration with new one */
+ EDG_WLL_NOTIF_REPLACE,
+ /** Add new condition when to be notifed */
+ EDG_WLL_NOTIF_ADD,
+ /** Remove condition on notification */
+ EDG_WLL_NOTIF_REMOVE
+/* if adding new attribute, add conversion string to common/xml_conversions.c too !! */
+} edg_wll_NotifChangeOp;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __GLITE_LB_NOTIF_REC_H__ */
#ident "$Header$"
-#include "glite/wmsutils/jobid/cjobid.h"
+#include <glite/wmsutils/jobid/cjobid.h>
#include "context.h"
#include "events.h"
#include "jobstat.h"
*@} end of group
*/
+/**
+ * \defgroup Structures for Server purge, dump and load
+ * \brief Structures for Server purge, dump and load
+ *
+ *@{
+ */
+
+/** Purge request */
+typedef struct _edg_wll_PurgeRequest {
+ char **jobs; /**< list of jobid's to work on */
+
+/** Purge jobs that are in the given states and "untouched" at least for the
+ * specified interval.
+ * Currently applicable for CLEARED, ABORTED, CANCELLED and OTHER (catchall).
+ * The other array members are for future extensions.
+ * Negative values stand for server defaults.
+ */
+ time_t timeout[EDG_WLL_NUMBER_OF_STATCODES];
+#define EDG_WLL_PURGE_JOBSTAT_OTHER EDG_WLL_JOB_UNDEF
+
+/**
+ * Actions to be taken and information required.
+ */
+ int flags;
+
+/** no dry run */
+#define EDG_WLL_PURGE_REALLY_PURGE 1
+/** return list of jobid matching the purge/dump criteria */
+#define EDG_WLL_PURGE_LIST_JOBS 2
+/** dump to a file on the sever */
+#define EDG_WLL_PURGE_SERVER_DUMP 4
+/** TODO: stream the dump info to the client */
+#define EDG_WLL_PURGE_CLIENT_DUMP 8
+/* ! when addning new constant, add it also to common/xml_conversions.c ! */
+
+
+/** private request processing data (for the reentrant functions) */
+/* TODO */
+
+} edg_wll_PurgeRequest;
+
+/** Output data of a purge */
+typedef struct _edg_wll_PurgeResult {
+ char *server_file; /**< filename of the dump at the server */
+ char **jobs; /**< affected jobs */
+/* TODO: output of the streaming interface */
+} edg_wll_PurgeResult;
+
+
+#define EDG_WLL_DUMP_NOW -1
+#define EDG_WLL_DUMP_LAST_START -2
+#define EDG_WLL_DUMP_LAST_END -3
+/* if adding new attribute, add conversion string to common/xml_conversions.c too !! */
+
+/** Purge request */
+typedef struct {
+ time_t from,to;
+} edg_wll_DumpRequest;
+
+/** Output data of a dump */
+typedef struct {
+ char *server_file;
+ time_t from,to;
+} edg_wll_DumpResult;
+
+
+/** Load request */
+typedef struct {
+ char *server_file;
+} edg_wll_LoadRequest;
+
+/** Output data of a load */
+typedef struct {
+ char *server_file;
+ time_t from,to;
+} edg_wll_LoadResult;
+
+/*
+ *@} end of group
+ */
+
#ifdef __cplusplus
}
#endif
#include "events.h"
#include "query_rec.h"
#include "notifid.h"
-/* FIXME
-#include "glite/lb/purge.h"
-#include "glite/lb/dump.h"
-#include "glite/lb/load.h"
-#include "glite/lb/notification.h"
-*/
+#include "notif_rec.h"
#ifdef __cplusplus
extern "C" {
char *(*indexToTag)();
edg_wll_TagValue *tagListGlobal;
edg_wll_JobStat *stsListGlobal;
-/* FIXME:
edg_wll_PurgeRequest purgeRequestGlobal;
edg_wll_PurgeResult purgeResultGlobal;
edg_wll_DumpRequest dumpRequestGlobal;
edg_wll_DumpResult dumpResultGlobal;
edg_wll_LoadRequest loadRequestGlobal;
edg_wll_LoadResult loadResultGlobal;
-*/
edg_wll_QueryRec **attrsGlobal;
char *notifFunction;
char *notifClientAddress;
edg_wll_NotifId notifId;
-/* FIXME
edg_wll_NotifChangeOp notifChangeOp;
-*/
time_t notifValidity;
char *statsFunction;
edg_wll_QueryRec **statsConditions;
char *edg_wll_done_codeToString(int done_codeConst);
edg_wll_QueryAttr edg_wll_StringToquery_attr(const char *name);
char *edg_wll_query_attrToString(edg_wll_QueryAttr query_attrConst);
-/* FIXME:
edg_wll_NotifChangeOp edg_wll_StringToNotifChangeOp(const char *name);
char *edg_wll_NotifChangeOpToString(edg_wll_NotifChangeOp notifChangeOpConst);
-*/
#ifdef __cplusplus
} // extern "C"
#include "context.h"
#include "query_rec.h"
#include "notifid.h"
-/* FIXME
-#include "glite/lb/purge.h"
-#include "glite/lb/dump.h"
-#include "glite/lb/load.h"
-#include "glite/lb/notification.h"
-*/
+#include "notif_rec.h"
#ifdef __cplusplus
extern "C" {
extern edg_wll_ErrorCode edg_wll_ParseStsList(edg_wll_Context ctx, char *messageBody, long len, char *tag, char *tag2, edg_wll_JobStat **stsListOut);
-/* FIXME
extern edg_wll_ErrorCode edg_wll_ParsePurgeResult(edg_wll_Context ctx, char *messageBody, edg_wll_PurgeResult *result);
extern edg_wll_ErrorCode edg_wll_ParseDumpResult(edg_wll_Context ctx, char *messageBody, edg_wll_DumpResult *result);
extern edg_wll_ErrorCode edg_wll_ParseLoadResult(edg_wll_Context ctx, char *messageBody, edg_wll_LoadResult *result);
-*/
extern edg_wll_ErrorCode edg_wll_ParseIndexedAttrs(edg_wll_Context ctx, char *messageBody, edg_wll_QueryRec ***attrs);
extern int edg_wll_QueryJobsRequestToXML(edg_wll_Context ctx, const edg_wll_QueryRec **conditions, int flags, char **send_mess);
-/* FIXME
extern int edg_wll_PurgeRequestToXML(edg_wll_Context ctx, const edg_wll_PurgeRequest *request, char **message);
extern int edg_wll_DumpRequestToXML(edg_wll_Context ctx, const edg_wll_DumpRequest *request, char **message);
extern int edg_wll_LoadRequestToXML(edg_wll_Context ctx, const edg_wll_LoadRequest *request, char **message);
-*/
extern int edg_wll_IndexedAttrsRequestToXML(edg_wll_Context ctx, char **message);
-/* FIXME:
extern int edg_wll_NotifRequestToXML( edg_wll_Context ctx, const char *function, const edg_wll_NotifId notifId, const char *address, edg_wll_NotifChangeOp op, edg_wll_QueryRec const * const *conditions, char **message);
-*/
extern int edg_wll_QuerySequenceCodeToXML(edg_wll_Context ctx, edg_wlc_JobId jobId, char **message);
c->tagToIndex = NULL;
c->tagListGlobal = NULL;
c->stsListGlobal = NULL;
-/* FIXME:
memset(&(c->purgeRequestGlobal),0,sizeof(c->purgeRequestGlobal));
memset(&(c->purgeResultGlobal),0,sizeof(c->purgeResultGlobal));
memset(&(c->dumpRequestGlobal),0,sizeof(c->dumpRequestGlobal));
memset(&(c->dumpResultGlobal),0,sizeof(c->dumpResultGlobal));
memset(&(c->loadRequestGlobal),0,sizeof(c->loadRequestGlobal));
memset(&(c->loadResultGlobal),0,sizeof(c->loadResultGlobal));
-*/
c->notifFunction = NULL;
c->notifClientAddress = NULL;
c->notifId = NULL;
-/* FIXME:
c->notifChangeOp = EDG_WLL_NOTIF_NOOP;
-*/
c->notifValidity = -1;
c->jobId = NULL;
c->source = NULL;
}
-#if 0
-/* FIXME */
char *edg_wll_purge_flags_to_string(int flags)
{
char *cflags = NULL, *temp_cflags = NULL;
return(flags);
}
-#endif
/* Functions for conversion of DUMP constants */
-/* FIXME
edg_wll_NotifChangeOp edg_wll_StringToNotifChangeOp(const char *name)
{
int i;
if (notifChangeOpConst < 0 || (notifChangeOpConst) > sizeof(notifChangeOpConsts)/sizeof(notifChangeOpConsts[0])) return (char *) NULL;
return strdup(notifChangeOpConsts[(int) notifChangeOpConst]);
}
-*/
#include "globus_config.h"
#include "trio.h"
-// #include "glite/lb/producer.h"
#include "glite/wmsutils/jobid/cjobid.h"
#include "escape.h"
}
-
-/* FIXME */
-#if 0
static void startPurgeResult(void *data, const char *el, const char **attr)
{
edg_wll_XML_ctx *XMLCtx = data;
}
XMLCtx->level++;
}
-#endif
-
-/* FIXME: */
-#if 0
static void endPurgeResult(void *data, const char *el UNUSED_VAR)
{
edg_wll_XML_ctx *XMLCtx = data;
XMLCtx->char_buf_len = 0;
XMLCtx->level--;
}
-#endif
}
-/* FIXME */
-#if 0
/* parse purge result from client */
edg_wll_ErrorCode edg_wll_ParsePurgeResult(edg_wll_Context ctx, char *messageBody, edg_wll_PurgeResult *result)
edg_wll_freeXMLCtx(&XMLCtx);
return errorCode;
}
-#endif
edg_wll_ErrorCode edg_wll_ParseIndexedAttrs(edg_wll_Context ctx, char *messageBody, edg_wll_QueryRec ***attrs)
}
-/* FIXME */
-#if 0
+
/* construct Message-Body of Request-Line for edg_wll_Purge */
int edg_wll_PurgeRequestToXML(
edg_wll_Context ctx,
return 0;
}
-#endif
}
-/* FIXME */
-#if 0
+
/* construct Message-Body of Request-Line for edg_wll_Notif* functions */
int edg_wll_NotifRequestToXML(
edg_wll_Context ctx,
return 0;
}
-#endif
/* construct Message-Body of Request-Line for edg_wll_QuerySequeceCode function */