*/
@@@LANG: C++
-#include "edg/workload/logging/client/events.h"
-#include "edg/workload/logging/common/notifid.h"
+#include "glite/lb/events.h"
+#include "glite/lb/notifid.h"
EWL_BEGIN_NAMESPACE;
struct timeval getValTime(Attr) const;
/** Retrieve jobid attribute */
- const edg::workload::common::jobid::JobId getValJobId(Attr) const;
+ const glite::wms::jobid::JobId getValJobId(Attr) const;
/** Attribute name */
const std::string & getAttrName(Attr) const;
class Job {
public:
Job(void);
- Job(const edg::workload::common::jobid::JobId &);
+ Job(const glite::wms::jobid::JobId &);
~Job();
/** Assign new JobId to an existing instance.
* Connection to server is preserved if possible.
*/
- Job & operator= (const edg::workload::common::jobid::JobId &);
+ Job & operator= (const glite::wms::jobid::JobId &);
/**
* Status retrieval bitmasks. Used ORed as Job::status() argument,
private:
ServerConnection server;
- edg::workload::common::jobid::JobId jobId;
+ glite::wms::jobid::JobId jobId;
};
EWL_END_NAMESPACE;
struct timeval getValTime(Attr) const;
/** Retrieve jobid attribute */
- const edg::workload::common::jobid::JobId getValJobId(Attr) const;
+ const glite::wms::jobid::JobId getValJobId(Attr) const;
/** Retrieve bool attribute */
bool getValBool(Attr) const;
EWL_BEGIN_NAMESPACE;
-class Exception: public edg::workload::common::utilities::Exception {
+class Exception: public glite::wms::common::utilities::Exception {
public:
/* constructor for mandatory fields */
const std::string& method,
int code,
const std::string& exception)
- : edg::workload::common::utilities::Exception(source,
+ : glite::wms::common::utilities::Exception(source,
line_number,
method,
code,
- "edg::workload::logging::Exception")
+ "glite::lb::Exception")
{ error_message = exception; };
/* constructor for mandatory fields AND exception chain */
const std::string& method,
int code,
const std::string& exception,
- const edg::workload::common::utilities::Exception &exc)
- : edg::workload::common::utilities::Exception(source,
+ const glite::wms::common::utilities::Exception &exc)
+ : glite::wms::common::utilities::Exception(source,
line_number,
method,
code,
- "edg::workload::logging::Exception")
+ "glite::lb::Exception")
{ error_message = exception + ": " + exc.what(); };
};
const std::string& method,
int code,
const std::string& exception,
- const edg::workload::common::utilities::Exception &exc)
+ const glite::wms::common::utilities::Exception &exc)
: Exception(source, line_number, method, code, exception)
{};
};
const std::string& method,
int code,
const std::string& exception,
- const edg::workload::common::utilities::Exception &exc)
+ const glite::wms::common::utilities::Exception &exc)
: Exception(source,
line_number,
method,
* Local operation only, Register() has to be called
* to propagate changes to server
*/
- void addJob(const edg::workload::common::jobid::JobId &);
+ void addJob(const glite::wms::jobid::JobId &);
/** Remove job from the list, local op again. */
- void removeJob(const edg::workload::common::jobid::JobId &);
+ void removeJob(const glite::wms::jobid::JobId &);
/** Get jobs on the list */
std::string getJobs();
/** Receive notifications on these states */
- void setStates(const std::vector<edg::workload::logging::client::JobStatus::Code> &);
+ void setStates(const std::vector<glite::lb::JobStatus::Code> &);
/** Get states */
std::string getStates();
* \retval 0 OK
* \retval 1 timeout
*/
- int receive(edg::workload::logging::client::JobStatus &,timeval &);
+ int receive(glite::lb::JobStatus &,timeval &);
private:
- std::vector<edg::workload::common::jobid::JobId> jobs;
- std::vector<edg::workload::logging::client::JobStatus::Code> states;
+ std::vector<glite::wms::jobid::JobId> jobs;
+ std::vector<glite::lb::JobStatus::Code> states;
edg_wll_Context ctx;
edg_wll_NotifId notifId;
QueryRecord(const Attr, const Op, const std::string &);
QueryRecord(const Attr, const Op, const int);
QueryRecord(const Attr, const Op, const struct timeval &);
- QueryRecord(const Attr, const Op, const edg::workload::common::jobid::JobId&);
+ QueryRecord(const Attr, const Op, const glite::wms::jobid::JobId&);
/* this one is for attr==TIME and particular state */
QueryRecord(const Attr, const Op, const int, const struct timeval &);
std::string tag_name;
int state;
std::string string_value;
- edg::workload::common::jobid::JobId jobid_value;
+ glite::wms::jobid::JobId jobid_value;
int int_value;
struct timeval timeval_value;
std::string string_value2;
*/
void queryJobs(const std::vector<QueryRecord>& query,
- std::vector<edg::workload::common::jobid::JobId>& ids) const;
+ std::vector<glite::wms::jobid::JobId>& ids) const;
- const std::vector<edg::workload::common::jobid::JobId>
+ const std::vector<glite::wms::jobid::JobId>
queryJobs(const std::vector<QueryRecord>& query) const;
*/
void queryJobs(const std::vector<std::vector<QueryRecord> >& query,
- std::vector<edg::workload::common::jobid::JobId>& ids) const;
+ std::vector<glite::wms::jobid::JobId>& ids) const;
- const std::vector<edg::workload::common::jobid::JobId>
+ const std::vector<glite::wms::jobid::JobId>
queryJobs(const std::vector<std::vector<QueryRecord> >& query) const;
/** Retrieve jobs satisfying the query records, including status
/** JobId's of all user's jobs.
* Convenience wrapper around queryJobs.
*/
- void userJobs(std::vector<edg::workload::common::jobid::JobId> &) const;
- const std::vector<edg::workload::common::jobid::JobId> userJobs() const;
+ void userJobs(std::vector<glite::wms::jobid::JobId> &) const;
+ const std::vector<glite::wms::jobid::JobId> userJobs() const;
/** Manipulate LB parameters, the same as for edg_wll_Context in C */
void setParam(edg_wll_ContextParam, int);
-#ifndef __GLITE_LB_NOTIFID_H__
-#define __GLITE_LB_NOTIFID_H__
-typedef void *edg_wll_NotifId;
+#ifndef __EDG_WORKLOAD_LOGGING_COMMON_NOTIFID_H__
+#define __EDG_WORKLOAD_LOGGING_COMMON_NOTIFID_H__
+
+#ident "$Header$"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Notification handle.
+ * Refers to a particular registration for receiving notifications.
+ */
+typedef void *edg_wll_NotifId;
+
+/** Parse and unparse the Id. */
+int edg_wll_NotifIdParse(const char *,edg_wll_NotifId *);
+char* edg_wll_NotifIdUnparse(const edg_wll_NotifId);
+
+int edg_wll_NotifIdCreate(const char *,int,edg_wll_NotifId *);
+void edg_wll_NotifIdFree(edg_wll_NotifId);
+
+void edg_wll_NotifIdGetServerParts(const edg_wll_NotifId, char **, unsigned int *);
+char *edg_wll_NotifIdGetUnique(const edg_wll_NotifId);
+int edg_wll_NotifIdSetUnique(edg_wll_NotifId *, const char *);
+
+#ifdef __cplusplus
+}
+#endif
#endif