#ifndef __EDG_WORKLOAD_LOGGING_CLIENT_COUNTREF_HPP__
#define __EDG_WORKLOAD_LOGGING_CLIENT_COUNTREF_HPP__
+/**
+ * \define EWL_BEGIN_NAMESPACE
+ *
+ * Switching into glite.lb namespace (couple with EWL_END_NAMESPACE).
+ */
#define EWL_BEGIN_NAMESPACE namespace glite { namespace lb {
+
+/**
+ * \define EWL_END_NAMESPACE
+ *
+ * Leave the glite.lb namespace.
+ */
#define EWL_END_NAMESPACE } }
EWL_BEGIN_NAMESPACE;
#include "glite/lb/events.h"
#include "glite/lb/notifid.h"
-EWL_BEGIN_NAMESPACE;
+EWL_BEGIN_NAMESPACE
class Event {
friend class Job;
CountRef<Event> *flesh;
};
-EWL_END_NAMESPACE;
+EWL_END_NAMESPACE
#endif
* @version $Revision$
*/
-EWL_BEGIN_NAMESPACE;
+EWL_BEGIN_NAMESPACE
/** L&B job.
+ *
* Implementation of L&B job-specific calls.
* Connection to the server is maintained transparently.
-*/
+ */
class Job {
public:
*/
const std::pair<std::string,uint16_t> queryListener(const std::string & name) const;
- /** Manipulate LB parameters, the same as for edg_wll_Context in C */
- void setParam(edg_wll_ContextParam, int);
- void setParam(edg_wll_ContextParam, const std::string);
- void setParam(edg_wll_ContextParam, const struct timeval &);
+ /**
+ * Manipulate LB parameters.
+ *
+ * The same as for edg_wll_Context in C
+ *
+ * \param ctx INOUT context to work with
+ * \param val IN value
+ */
+ void setParam(edg_wll_ContextParam ctx, int val);
+ /**
+ * Manipulate LB parameters.
+ *
+ * The same as for edg_wll_Context in C
+ *
+ * \param ctx INOUT context to work with
+ * \param val IN value
+ */
+ void setParam(edg_wll_ContextParam ctx, const std::string val);
+ /**
+ * Manipulate LB parameters.
+ *
+ * The same as for edg_wll_Context in C
+ *
+ * \param ctx INOUT context to work with
+ * \param val IN value
+ */
+ void setParam(edg_wll_ContextParam ctx, const struct timeval &val);
- int getParamInt(edg_wll_ContextParam) const;
+ /**
+ * Get LB parameters.
+ *
+ * The same as for edg_wll_Context in C
+ *
+ * \param ctx INOUT context to work with
+ * \return integer value of the parameter
+ */
+ int getParamInt(edg_wll_ContextParam ctx) const;
+ /**
+ * Get LB parameters.
+ *
+ * The same as for edg_wll_Context in C
+ *
+ * \param ctx INOUT context to work with
+ * \return string value of the parameter
+ */
std::string getParamString(edg_wll_ContextParam) const;
+ /**
+ * Get LB parameters.
+ *
+ * The same as for edg_wll_Context in C
+ *
+ * \param ctx INOUT context to work with
+ * \return timeval value of the parameter
+ */
struct timeval getParamTime(edg_wll_ContextParam) const;
private:
glite::wmsutils::jobid::JobId jobId;
};
-EWL_END_NAMESPACE;
+EWL_END_NAMESPACE
#endif
#include <pthread.h>
-EWL_BEGIN_NAMESPACE;
+EWL_BEGIN_NAMESPACE
class Exception: public glite::wmsutils::exception::Exception {
public:
-EWL_END_NAMESPACE;
+EWL_END_NAMESPACE
#endif
#include "glite/lb/JobStatus.h"
#include "glite/lb/consumer.h"
-EWL_BEGIN_NAMESPACE;
+EWL_BEGIN_NAMESPACE
/** Auxiliary class to hold an atomic query condition. */
class QueryRecord {
edg_wll_Context context;
};
-EWL_END_NAMESPACE;
+EWL_END_NAMESPACE
#endif
#define __EDG_WORKLOAD_LOGGING_CLIENT_CONSUMER_H__
/*!
- * \file client/consumer.h (lbapi.h originaly)
* \brief L&B consumer API
*
* General rules:
/**
* General query on events.
- * Return events satysfying all conditions
+ * Return events satisfying all conditions
* query records represent conditions in the form
* \a attr \a op \a value eg. time > 87654321.
* \see edg_wll_QueryRec
* \param jobid IN: query this job
* \param flags IN: specifies optional status fields to retrieve,
* \see EDG_WLL_STAT_CLASSADS, EDG_WLL_STAT_CHILDREN, EDG_WLL_STAT_CHILDSTAT
+ * \param status OUT: the status of the job
*/
int edg_wll_JobStatus(
);
/**
- * Query LBProxy and use plain communication
+ * Query LBProxy and use plain communication.
+ * \param context IN: context to operate on
+ * \param jobid IN: query this job
+ * \param flags IN: specifies optional status fields to retrieve,
+ * \see EDG_WLL_STAT_CLASSADS, EDG_WLL_STAT_CHILDREN, EDG_WLL_STAT_CHILDSTAT
+ * \param status OUT: the status of the job
*/
int edg_wll_JobStatusProxy(
edg_wll_Context context,
/**
* Query LBProxy and use plain communication
*/
-int edg_wll_QueryListener(
+int edg_wll_QueryListenerProxy(
edg_wll_Context context,
edg_wlc_JobId jobId,
const char * name,
/**
- * default and maximal query timeout (in seconds)
+ * default query timeout (in seconds)
*/
#define EDG_WLL_QUERY_TIMEOUT_DEFAULT 120
+
+/**
+ * maximal query timeout (in seconds)
+ */
#define EDG_WLL_QUERY_TIMEOUT_MAX 1800
#ifdef __cplusplus
#define _EDG_WORKLOAD_LOGGING_CLIENT_CONTEXT_H
/**
- * \file edg/workload/logging/client/context.h
* \brief L&B API common context (publicly visible) and related definitions
*/
struct timeval; /* gcc, shut up! */
-int edg_wll_SetParamInt(edg_wll_Context,edg_wll_ContextParam,int);
-int edg_wll_SetParamString(edg_wll_Context,edg_wll_ContextParam,const char *);
-int edg_wll_SetParamTime(edg_wll_Context,edg_wll_ContextParam,const struct timeval *);
+/** Set a context parameter of type int.
+ * \param ctx INOUT context to work with
+ * \param param IN parameter to set
+ * \param val IN value to set
+ * \retval 0 success
+ * \retval EINVAL param is not a valid parameter, or invalid value
+ */
+int edg_wll_SetParamInt(edg_wll_Context ctx, edg_wll_ContextParam param, int val);
+
+/** Set a context parameter of type string.
+ * \param context INOUT context to work with
+ * \param param IN parameter to set
+ * \param IN val to set (if NULL, default is used)
+ * \retval 0 success
+ * \retval EINVAL param is not a valid parameter, or invalid value
+ */
+int edg_wll_SetParamString(edg_wll_Context ctx,edg_wll_ContextParam param,const char *val);
+
+/** Set a context parameter of type timeval.
+ * \param INOUT ctx context to work with
+ * \param IN param parameter to set
+ * \param IN val value to set (if NULL, default is used)
+ * \retval 0 success
+ * \retval EINVAL param is not a valid parameter, or invalid value
+ */
+int edg_wll_SetParamTime(edg_wll_Context ctx,edg_wll_ContextParam param,const struct timeval *val);
/** Get current parameter value.
* \param context INOUT context to work with
int edg_wll_Error(
edg_wll_Context context,
char **errText,
- char **eddDesc
+ char **errDesc
);
/** Convert source code to printable string
#define __EDG_WORKLOAD_LOGGING_CLIENT_EVENTS_H__
/**
- * \file edg/workload/logging/client/events.h
* \brief contains definition of event type codes for use both by lbapi.h and dglog.h
*/
gen "\n";
@@@}
+/**
+ * \typedef edg_wll_AnyEvent
+ * common structure definition contained in all types of the events
+ */
typedef struct _edg_wll_AnyEvent {
_EDG_WLL_EVENT_COMMON
} edg_wll_AnyEvent;
/**
* Free the contents of event structure
- * \param IN event structure to be freed
+ * \param event IN structure to be freed
* \warning As event structures are likely to be allocated in arrays,
* the structure itself is not freed.
* Its the responsibility of the caller to call free(event)
*/
/*!
- * \file client/jobstat.h
* \brief edg_wll_JobStat definition and related stuff
*/
/** Default socket descriptor where to select(2) for notifications.
- * Even if nothing is available for reading freom the socket,
+ * Even if nothing is available for reading from the socket,
* there may be some data cached so calling \see edg_wll_NotifReceive
* may return notifications immediately.
*
#define __EDG_WORKLOAD_LOGGING_CLIENT_PRODUCER_H__
/**
- * \file edg/workload/logging/client/producer.h
* \brief client API for storing data into L&B service
*/
* Partitionable jobs should set num_subjobs=0 initially,
* and re-register when number of subjobs becomes known.
*
+ * \param context INOUT context to work with
+ * \param job IN registered job
* \param type IN EDG_WLL_JOB_SIMPLE, EDG_WLL_JOB_DAG, or EDG_WLL_JOB_PARTITIONABLE
* \param user IN user credentials
* \param jdl IN user-specified JDL
/**
* Change ACL for given job.
- * \param specification of user's credential
- * \param user_id_type type of user_id,
+ * \param context INOUT context to workt with
+ * \param user_id IN: specification of user's credential
+ * \param user_id_type IN type of user_id,
* for EDG_WLL_USER_SUBJECT the user_id parameter is expected to be user's subject name
* for EDG_WLL_USER_VOMS_GROUP the user_id is expected to be of the form VO:group specifying required group membersip as managed by VOMS
- * \param permission ACL permission to change
- * \param permission_type type of given permission (allow or deny operation)
- * \param operation operation to perform with ACL (add or remove record)
+ * \param permission IN ACL permission to change
+ * \param permission_type IN type of given permission (allow or deny operation)
+ * \param operation IN operation to perform with ACL (add or remove record)
*/
extern int edg_wll_ChangeACL(