From: Aleš Křenek Date: Fri, 2 Jul 2004 15:20:43 +0000 (+0000) Subject: fixes to build C++ library X-Git-Tag: EXCEPTION~21 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=390d707e374966907b7a4464b51b7ae8d6ad02c6;p=jra1mw.git fixes to build C++ library --- diff --git a/org.glite.lb.client-interface/interface/Event.h.T b/org.glite.lb.client-interface/interface/Event.h.T index cfeedf0..4c53c7f 100644 --- a/org.glite.lb.client-interface/interface/Event.h.T +++ b/org.glite.lb.client-interface/interface/Event.h.T @@ -20,8 +20,8 @@ */ @@@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; @@ -130,7 +130,7 @@ public: 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; diff --git a/org.glite.lb.client-interface/interface/Job.h b/org.glite.lb.client-interface/interface/Job.h index 391822d..870c88d 100644 --- a/org.glite.lb.client-interface/interface/Job.h +++ b/org.glite.lb.client-interface/interface/Job.h @@ -25,14 +25,14 @@ EWL_BEGIN_NAMESPACE; 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, @@ -66,7 +66,7 @@ public: private: ServerConnection server; - edg::workload::common::jobid::JobId jobId; + glite::wms::jobid::JobId jobId; }; EWL_END_NAMESPACE; diff --git a/org.glite.lb.client-interface/interface/JobStatus.h.T b/org.glite.lb.client-interface/interface/JobStatus.h.T index 76163a7..fc1af5c 100644 --- a/org.glite.lb.client-interface/interface/JobStatus.h.T +++ b/org.glite.lb.client-interface/interface/JobStatus.h.T @@ -107,7 +107,7 @@ public: 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; diff --git a/org.glite.lb.client-interface/interface/LoggingExceptions.h b/org.glite.lb.client-interface/interface/LoggingExceptions.h index f209acd..eea476d 100644 --- a/org.glite.lb.client-interface/interface/LoggingExceptions.h +++ b/org.glite.lb.client-interface/interface/LoggingExceptions.h @@ -13,7 +13,7 @@ EWL_BEGIN_NAMESPACE; -class Exception: public edg::workload::common::utilities::Exception { +class Exception: public glite::wms::common::utilities::Exception { public: /* constructor for mandatory fields */ @@ -22,11 +22,11 @@ public: 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 */ @@ -35,12 +35,12 @@ public: 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(); }; }; @@ -63,7 +63,7 @@ public: 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) {}; }; @@ -91,7 +91,7 @@ public: 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, diff --git a/org.glite.lb.client-interface/interface/Notification.h b/org.glite.lb.client-interface/interface/Notification.h index 6c221e3..574d59f 100644 --- a/org.glite.lb.client-interface/interface/Notification.h +++ b/org.glite.lb.client-interface/interface/Notification.h @@ -36,16 +36,16 @@ public: * 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 &); + void setStates(const std::vector &); /** Get states */ std::string getStates(); @@ -60,11 +60,11 @@ public: * \retval 0 OK * \retval 1 timeout */ - int receive(edg::workload::logging::client::JobStatus &,timeval &); + int receive(glite::lb::JobStatus &,timeval &); private: - std::vector jobs; - std::vector states; + std::vector jobs; + std::vector states; edg_wll_Context ctx; edg_wll_NotifId notifId; diff --git a/org.glite.lb.client-interface/interface/ServerConnection.h b/org.glite.lb.client-interface/interface/ServerConnection.h index faa98f5..adf7284 100644 --- a/org.glite.lb.client-interface/interface/ServerConnection.h +++ b/org.glite.lb.client-interface/interface/ServerConnection.h @@ -65,7 +65,7 @@ public: 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 &); @@ -94,7 +94,7 @@ private: 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; @@ -222,9 +222,9 @@ public: */ void queryJobs(const std::vector& query, - std::vector& ids) const; + std::vector& ids) const; - const std::vector + const std::vector queryJobs(const std::vector& query) const; @@ -236,9 +236,9 @@ public: */ void queryJobs(const std::vector >& query, - std::vector& ids) const; + std::vector& ids) const; - const std::vector + const std::vector queryJobs(const std::vector >& query) const; /** Retrieve jobs satisfying the query records, including status @@ -281,8 +281,8 @@ public: /** JobId's of all user's jobs. * Convenience wrapper around queryJobs. */ - void userJobs(std::vector &) const; - const std::vector userJobs() const; + void userJobs(std::vector &) const; + const std::vector userJobs() const; /** Manipulate LB parameters, the same as for edg_wll_Context in C */ void setParam(edg_wll_ContextParam, int); diff --git a/org.glite.lb.client-interface/interface/notifid.h b/org.glite.lb.client-interface/interface/notifid.h index 3d1ed53..fc52d01 100644 --- a/org.glite.lb.client-interface/interface/notifid.h +++ b/org.glite.lb.client-interface/interface/notifid.h @@ -1,4 +1,29 @@ -#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