move prototypes to a separate header files
authorZdeněk Šustr <sustr4@cesnet.cz>
Fri, 19 Mar 2010 12:29:17 +0000 (12:29 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Fri, 19 Mar 2010 12:29:17 +0000 (12:29 +0000)
org.glite.lb.server/src/lb_proto.c
org.glite.lb.server/src/server_notification.h [new file with mode: 0644]
org.glite.lb.server/src/ws_query.c

index 06ad861..cfba7a2 100644 (file)
@@ -37,6 +37,7 @@ limitations under the License.
 #include "lb_proto.h"
 #include "lb_text.h"
 #include "lb_html.h"
+#include "lb_rss.h"
 #include "stats.h"
 #include "jobstat.h"
 #include "get_events.h"
@@ -44,6 +45,7 @@ limitations under the License.
 #include "lb_xml_parse.h"
 #include "lb_xml_parse_V21.h"
 #include "db_supp.h"
+#include "server_notification.h"
 
 
 #define METHOD_GET      "GET "
@@ -82,19 +84,6 @@ static const char* const response_headers_html[] = {
 
 volatile sig_atomic_t purge_quit = 0;
 
-extern int edg_wll_NotifNewServer(edg_wll_Context,
-                               edg_wll_QueryRec const * const *, int flags, char const *,
-                               const edg_wll_NotifId, time_t *);
-extern int edg_wll_NotifBindServer(edg_wll_Context,
-                               const edg_wll_NotifId, const char *, time_t *);
-extern int edg_wll_NotifChangeServer(edg_wll_Context,
-                               const edg_wll_NotifId, edg_wll_QueryRec const * const *,
-                               edg_wll_NotifChangeOp);
-extern int edg_wll_NotifRefreshServer(edg_wll_Context,
-                               const edg_wll_NotifId, time_t *);
-extern int edg_wll_NotifDropServer(edg_wll_Context, edg_wll_NotifId);
-
-
 
 char *edg_wll_HTTPErrorMessage(int errCode)
 {
@@ -391,7 +380,7 @@ static int getJobsRSS(edg_wll_Context ctx, char *feedType, edg_wll_JobStat **sta
                return -1;
        }
 
-       edg_wll_QueryJobsServer(ctx, conds, 0, &jobsOut, statesOut);
+       edg_wll_QueryJobsServer(ctx, (const edg_wll_QueryRec **)conds, 0, &jobsOut, statesOut);
 
        for (i = 0; conds[i]; i++)
                free(conds[i]);
@@ -401,9 +390,8 @@ static int getJobsRSS(edg_wll_Context ctx, char *feedType, edg_wll_JobStat **sta
        return 0;
 }
 
-static int hup_handler(int sig) {
+static void hup_handler(int sig) {
        purge_quit = 1;
-       return 0;
 }
 
 edg_wll_ErrorCode edg_wll_ProtoV21(edg_wll_Context ctx,
diff --git a/org.glite.lb.server/src/server_notification.h b/org.glite.lb.server/src/server_notification.h
new file mode 100644 (file)
index 0000000..b2768d5
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef GLITE_LB_SERVER_NOTIFICATION_H
+#define GLITE_LB_SERVER_NOTIFICATION_H
+
+#ident "$Header$"
+/*
+Copyright (c) Members of the EGEE Collaboration. 2004-2010.
+See http://www.eu-egee.org/partners for details on the copyright holders.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+int edg_wll_NotifNewServer(edg_wll_Context,
+                               edg_wll_QueryRec const * const *, int flags, char const *,
+                               const edg_wll_NotifId, time_t *);
+int edg_wll_NotifBindServer(edg_wll_Context,
+                               const edg_wll_NotifId, const char *, time_t *);
+int edg_wll_NotifChangeServer(edg_wll_Context,
+                               const edg_wll_NotifId, edg_wll_QueryRec const * const *,
+                               edg_wll_NotifChangeOp);
+int edg_wll_NotifRefreshServer(edg_wll_Context,
+                               const edg_wll_NotifId, time_t *);
+int edg_wll_NotifDropServer(edg_wll_Context, edg_wll_NotifId);
+
+#endif
index f3de492..8c6a7e4 100644 (file)
@@ -35,6 +35,7 @@ limitations under the License.
 #include "ws_fault.h"
 #include "ws_typeref.h"
 #include "lb_proto.h"
+#include "server_notification.h"
 
 #if GSOAP_VERSION <= 20602
 #define __lb__GetVersion __ns1__GetVersion
@@ -193,7 +194,7 @@ SOAP_FMAC5 int SOAP_FMAC6 __lb__UserJobs(
        ctx = (edg_wll_Context) glite_gsplugin_get_udata(soap);
        memset(out, 0, sizeof *out);
        if (edg_wll_UserJobsServer(ctx, &jobs, &states) != 0) goto fault;
-       if (edg_wll_UserJobsResToSoap(soap, jobs, states, out) != SOAP_OK) {
+       if (edg_wll_UserJobsResToSoap(soap, (glite_jobid_const_t *)jobs, (const edg_wll_JobStat *)states, out) != SOAP_OK) {
                edg_wll_SetError(ctx, ENOMEM, "Couldn't create internal structures");
                goto freefault;
        }
@@ -345,7 +346,7 @@ SOAP_FMAC5 int SOAP_FMAC6 __lb__NotifNew(
        }
 
        out->valid = in->valid ? *in->valid : 0;
-       if (edg_wll_NotifNewServer(ctx,conditions,flags,in->destination,nid,&out->valid)) {
+       if (edg_wll_NotifNewServer(ctx,(const edg_wll_QueryRec **)conditions,flags,in->destination,nid,&out->valid)) {
                edg_wll_ErrToFault(ctx, soap);
                ret = SOAP_FAULT;
                goto cleanup;