fixes to build C++ library
authorAleš Křenek <ljocha@ics.muni.cz>
Fri, 2 Jul 2004 15:20:43 +0000 (15:20 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Fri, 2 Jul 2004 15:20:43 +0000 (15:20 +0000)
org.glite.lb.client-interface/interface/Event.h.T
org.glite.lb.client-interface/interface/Job.h
org.glite.lb.client-interface/interface/JobStatus.h.T
org.glite.lb.client-interface/interface/LoggingExceptions.h
org.glite.lb.client-interface/interface/Notification.h
org.glite.lb.client-interface/interface/ServerConnection.h
org.glite.lb.client-interface/interface/notifid.h

index cfeedf0..4c53c7f 100644 (file)
@@ -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;
index 391822d..870c88d 100644 (file)
@@ -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;
index 76163a7..fc1af5c 100644 (file)
@@ -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;
index f209acd..eea476d 100644 (file)
@@ -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, 
index 6c221e3..574d59f 100644 (file)
@@ -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<edg::workload::logging::client::JobStatus::Code> &);
+       void setStates(const std::vector<glite::lb::JobStatus::Code> &);
 
        /** 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<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;
index faa98f5..adf7284 100644 (file)
@@ -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<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;
   
        
@@ -236,9 +236,9 @@ public:
         */
    
        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
@@ -281,8 +281,8 @@ public:
        /** 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); 
index 3d1ed53..fc52d01 100644 (file)
@@ -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