From cb89d52a45018898f1af4aec89efcce1a724b423 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Fri, 22 Jan 2010 13:35:45 +0000 Subject: [PATCH] - replace legacy edg_wlc_JobId with glite_jobid_t in the public interface - use glite_jobid_const_t where appropriate --- org.glite.lb.client/interface/consumer.h | 16 ++++++++-------- org.glite.lb.client/interface/producer.h.T | 16 ++++++++-------- org.glite.lb.client/src/Job.cpp | 6 +++--- org.glite.lb.client/src/consumer.c | 8 ++++---- org.glite.lb.common/interface/context-int.h | 4 ++-- org.glite.lb.common/interface/context.h | 2 +- org.glite.lb.common/interface/lb_perftest.h | 2 +- org.glite.lb.common/interface/query_rec.h | 2 +- org.glite.lb.common/interface/xml_conversions.h | 6 +++--- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/org.glite.lb.client/interface/consumer.h b/org.glite.lb.client/interface/consumer.h index fe78142..edeb693 100644 --- a/org.glite.lb.client/interface/consumer.h +++ b/org.glite.lb.client/interface/consumer.h @@ -111,7 +111,7 @@ int edg_wll_QueryJobs( edg_wll_Context context, const edg_wll_QueryRec * conditions, int flags, - edg_wlc_JobId ** jobs, + glite_jobid_t ** jobs, edg_wll_JobStat ** states ); @@ -128,7 +128,7 @@ int edg_wll_QueryJobsExt( edg_wll_Context context, const edg_wll_QueryRec ** conditions, int flags, - edg_wlc_JobId ** jobs, + glite_jobid_t ** jobs, edg_wll_JobStat ** states ); @@ -141,7 +141,7 @@ int edg_wll_QueryJobsProxy( edg_wll_Context context, const edg_wll_QueryRec * conditions, int flags, - edg_wlc_JobId ** jobs, + glite_jobid_t ** jobs, edg_wll_JobStat ** states ); @@ -153,7 +153,7 @@ int edg_wll_QueryJobsExtProxy( edg_wll_Context context, const edg_wll_QueryRec ** conditions, int flags, - edg_wlc_JobId ** jobs, + glite_jobid_t ** jobs, edg_wll_JobStat ** states ); @@ -223,7 +223,7 @@ int edg_wll_JobLogProxy( */ int edg_wll_UserJobs( edg_wll_Context context, - edg_wlc_JobId ** jobs, + glite_jobid_t ** jobs, edg_wll_JobStat ** states ); @@ -235,7 +235,7 @@ int edg_wll_UserJobs( */ int edg_wll_UserJobsProxy( edg_wll_Context context, - edg_wlc_JobId ** jobs, + glite_jobid_t ** jobs, edg_wll_JobStat ** states ); @@ -274,7 +274,7 @@ int edg_wll_GetServerLimit( */ int edg_wll_QueryListener( edg_wll_Context context, - edg_wlc_JobId jobId, + glite_jobid_const_t jobId, const char * name, char ** host, uint16_t * port @@ -286,7 +286,7 @@ int edg_wll_QueryListener( */ int edg_wll_QueryListenerProxy( edg_wll_Context context, - edg_wlc_JobId jobId, + glite_jobid_const_t jobId, const char * name, char ** host, uint16_t * port diff --git a/org.glite.lb.client/interface/producer.h.T b/org.glite.lb.client/interface/producer.h.T index 470383f..5283980 100644 --- a/org.glite.lb.client/interface/producer.h.T +++ b/org.glite.lb.client/interface/producer.h.T @@ -197,7 +197,7 @@ extern int edg_wll_RegisterJob( const char * ns, int num_subjobs, const char * seed, - edg_wlc_JobId ** subjobs + glite_jobid_t ** subjobs ); /** @@ -212,7 +212,7 @@ extern int edg_wll_RegisterJobSync( const char * ns, int num_subjobs, const char * seed, - edg_wlc_JobId ** subjobs + glite_jobid_t ** subjobs ); /** @@ -243,7 +243,7 @@ extern int edg_wll_RegisterJobProxy( const char * ns, int num_subjobs, const char * seed, - edg_wlc_JobId ** subjobs + glite_jobid_t ** subjobs ); #ifdef LB_PERF @@ -256,7 +256,7 @@ extern int edg_wll_RegisterJobProxyOld( const char * ns, int num_subjobs, const char * seed, - edg_wlc_JobId ** subjobs + glite_jobid_t ** subjobs ); /* register only to LBProxy */ @@ -270,7 +270,7 @@ extern int edg_wll_RegisterJobProxyOnly( const char * ns, int num_subjobs, const char * seed, - edg_wlc_JobId ** subjobs + glite_jobid_t ** subjobs ); #endif @@ -292,7 +292,7 @@ extern int edg_wll_RegisterSubjobs( glite_jobid_const_t parent, char const * const * jdls, const char * ns, - edg_wlc_JobId const * subjobs + glite_jobid_t const * subjobs ); @@ -312,7 +312,7 @@ extern int edg_wll_RegisterSubjobsProxy( glite_jobid_const_t parent, char const * const * jdls, const char * ns, - edg_wlc_JobId const * subjobs + glite_jobid_t const * subjobs ); /** @@ -326,7 +326,7 @@ extern int edg_wll_GenerateSubjobIds( glite_jobid_const_t parent, int num_subjobs, const char * seed, - edg_wlc_JobId ** subjobs + glite_jobid_t ** subjobs ); diff --git a/org.glite.lb.client/src/Job.cpp b/org.glite.lb.client/src/Job.cpp index fed330c..ec959fe 100644 --- a/org.glite.lb.client/src/Job.cpp +++ b/org.glite.lb.client/src/Job.cpp @@ -62,7 +62,7 @@ Job::status(int flags) const try { edg_wll_JobStat *cstat = jobStatus.c_ptr(); int ret = edg_wll_JobStatus(server.getContext(), - const_cast(jobId.c_jobid()), + jobId.c_jobid(), flags, cstat); check_result(ret, @@ -91,7 +91,7 @@ Job::log(std::vector &eventList) const try { context = server.getContext(); - result = edg_wll_JobLog(context, const_cast(jobId.c_jobid()), &events); + result = edg_wll_JobLog(context, jobId.c_jobid(), &events); if (result == E2BIG) { edg_wll_Error(context, NULL, &errstr); check_result(edg_wll_GetParam(context, @@ -147,7 +147,7 @@ Job::queryListener(std::string const & name) const try { int ret = edg_wll_QueryListener(server.getContext(), - const_cast(jobId.c_jobid()), + jobId.c_jobid(), name.c_str(), &c_host, &port); diff --git a/org.glite.lb.client/src/consumer.c b/org.glite.lb.client/src/consumer.c index 73de913..a9a06c9 100644 --- a/org.glite.lb.client/src/consumer.c +++ b/org.glite.lb.client/src/consumer.c @@ -284,7 +284,7 @@ int edg_wll_JobLog( j[0].attr = EDG_WLL_QUERY_ATTR_JOBID; j[0].op = EDG_WLL_QUERY_OP_EQUAL; - j[0].value.j = (glite_jobid_t) job; + j[0].value.j = job; e[0].attr = EDG_WLL_QUERY_ATTR_LEVEL; e[0].op = EDG_WLL_QUERY_OP_LESS; @@ -307,7 +307,7 @@ int edg_wll_JobStatus( j[0].attr = EDG_WLL_QUERY_ATTR_JOBID; j[0].op = EDG_WLL_QUERY_OP_EQUAL; - j[0].value.j = (glite_jobid_t) job; + j[0].value.j = job; j[1].attr = EDG_WLL_QUERY_ATTR_UNDEF; ret = edg_wll_QueryJobs(ctx,j,flags,NULL,&statesOut); @@ -335,7 +335,7 @@ int edg_wll_JobStatus( -int edg_wll_QueryListener(edg_wll_Context ctx, edg_wlc_JobId job, const char *name, char** host, uint16_t *port) { +int edg_wll_QueryListener(edg_wll_Context ctx, glite_jobid_const_t job, const char *name, char** host, uint16_t *port) { int i; edg_wll_Event *events = NULL; @@ -570,7 +570,7 @@ int edg_wll_JobStatusProxy( int edg_wll_QueryListenerProxy( edg_wll_Context ctx, - edg_wlc_JobId job, + glite_jobid_const_t job, const char *name, char** host, uint16_t *port) diff --git a/org.glite.lb.common/interface/context-int.h b/org.glite.lb.common/interface/context-int.h index ede5076..79852a9 100644 --- a/org.glite.lb.common/interface/context-int.h +++ b/org.glite.lb.common/interface/context-int.h @@ -145,7 +145,7 @@ glite_lb_padded_struct(_edg_wll_Context,150, char *p_key_filename; time_t purge_timeout[EDG_WLL_NUMBER_OF_STATCODES]; /* producer part */ - edg_wlc_JobId p_jobid; + glite_jobid_t p_jobid; edg_wll_SeqCode p_seqcode; int count_statistics; @@ -199,7 +199,7 @@ extern int edg_wll_IncSequenceCode(edg_wll_Context ctx); extern void edg_wll_FreeParams(edg_wll_Context context); -extern int edg_wll_GenerateSubjobIds(edg_wll_Context, glite_jobid_const_t, int, const char *, edg_wlc_JobId **); +extern int edg_wll_GenerateSubjobIds(edg_wll_Context, glite_jobid_const_t, int, const char *, glite_jobid_t **); #ifdef __cplusplus } diff --git a/org.glite.lb.common/interface/context.h b/org.glite.lb.common/interface/context.h index 5eeb137..1c576c7 100644 --- a/org.glite.lb.common/interface/context.h +++ b/org.glite.lb.common/interface/context.h @@ -270,7 +270,7 @@ char * edg_wll_GetSequenceCode( */ int edg_wll_GetLoggingJob( const edg_wll_Context context, - edg_wlc_JobId *jobid_out + glite_jobid_t *jobid_out ); /* diff --git a/org.glite.lb.common/interface/lb_perftest.h b/org.glite.lb.common/interface/lb_perftest.h index 313e921..7fb7429 100644 --- a/org.glite.lb.common/interface/lb_perftest.h +++ b/org.glite.lb.common/interface/lb_perftest.h @@ -43,6 +43,6 @@ glite_wll_perftest_createJobId(const char *bkserver, const char *test_user, const char *test_name, int job_num, - edg_wlc_JobId *jobid); + glite_jobid_t *jobid); #endif /* GLITE_LB_PERFTEST_H */ diff --git a/org.glite.lb.common/interface/query_rec.h b/org.glite.lb.common/interface/query_rec.h index c8d302d..e21621d 100644 --- a/org.glite.lb.common/interface/query_rec.h +++ b/org.glite.lb.common/interface/query_rec.h @@ -100,7 +100,7 @@ typedef struct _edg_wll_QueryRec { int i; /**< integer query attribute value */ char *c; /**< character query attribute value */ struct timeval t; /**< time query attribute value */ - glite_jobid_t j; /**< JobId query attribute value */ + glite_jobid_const_t j; /**< JobId query attribute value */ } value, value2; } edg_wll_QueryRec; diff --git a/org.glite.lb.common/interface/xml_conversions.h b/org.glite.lb.common/interface/xml_conversions.h index 792e487..5aeedb0 100644 --- a/org.glite.lb.common/interface/xml_conversions.h +++ b/org.glite.lb.common/interface/xml_conversions.h @@ -52,7 +52,7 @@ typedef struct _edg_wll_XML_ctx { enum edg_wll_QueryType type; edg_wll_QueryRec **conditions; int flags; - edg_wlc_JobId *jobsOutGlobal; + glite_jobid_t *jobsOutGlobal; edg_wll_Event *eventsOutGlobal; edg_wll_JobStat *jobStatGlobal; edg_wll_JobStat jobStatSingleGlobal; @@ -81,7 +81,7 @@ typedef struct _edg_wll_XML_ctx { time_t statsFrom, statsTo; float statsRate, statsDuration; int statsResFrom, statsResTo; - edg_wlc_JobId jobId; + glite_jobid_t jobId; char *source; char *seqCode; int errCode; @@ -123,7 +123,7 @@ void edg_wll_add_taglist_to_XMLBody(char **body, const edg_wll_TagValue *toAdd, void edg_wll_add_time_t_list_to_XMLBody(char **body, const time_t *toAdd, const char *tag, char *(*indexToTag)(), const char *indent, const int from, const int to); void edg_wll_add_cclassad_to_XMLBody(char **body, void *toAdd, const char *tag, const char *null); char *edg_wll_from_string_to_string(edg_wll_XML_ctx *XMLCtx); -edg_wlc_JobId edg_wll_from_string_to_jobid(edg_wll_XML_ctx *XMLCtx); +glite_jobid_t edg_wll_from_string_to_jobid(edg_wll_XML_ctx *XMLCtx); edg_wll_NotifId edg_wll_from_string_to_notifid(edg_wll_XML_ctx *XMLCtx); edg_wll_JobStatCode edg_wll_from_string_to_edg_wll_JobStatCode(edg_wll_XML_ctx *XMLCtx); int edg_wll_from_string_to_int(edg_wll_XML_ctx *XMLCtx); -- 1.8.2.3