[mapserver-commits] r10009 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Mar 25 10:18:44 EDT 2010
Author: assefa
Date: 2010-03-25 10:18:41 -0400 (Thu, 25 Mar 2010)
New Revision: 10009
Modified:
trunk/mapserver/mapowscommon.c
trunk/mapserver/mapowscommon.h
Log:
msOWSCommonNegotiateVersion:no need to have it dependent on libxml2 (#3282
Modified: trunk/mapserver/mapowscommon.c
===================================================================
--- trunk/mapserver/mapowscommon.c 2010-03-25 14:05:29 UTC (rev 10008)
+++ trunk/mapserver/mapowscommon.c 2010-03-25 14:18:41 UTC (rev 10009)
@@ -44,37 +44,8 @@
MS_CVSID("$Id$")
-/**
- * msOWSCommonNegotiateVersion()
- *
- * returns a supported version as per subclause 7.3.2
- *
- * @param requested_version the version passed by the client
- * @param supported_versions an array of supported versions
- * @param num_supported_versions size of supported_versions
- *
- * @return supported version integer, or -1 on error
- *
- */
-int msOWSCommonNegotiateVersion(int requested_version, int supported_versions[], int num_supported_versions) {
- int i;
- /* if version is not set return error */
- if (! requested_version)
- return -1;
-
- /* return the first entry that's equal to the requested version */
- for (i = 0; i < num_supported_versions; i++) {
- if (supported_versions[i] == requested_version)
- return supported_versions[i];
- }
-
- /* no match; calling code should throw an exception */
- return -1;
-}
-
-
/**
* msOWSCommonServiceIdentification()
*
@@ -654,3 +625,34 @@
return xmlNewChild(psParent, psNs, BAD_CAST name, BAD_CAST content);
}
#endif /* defined(USE_LIBXML2) */
+
+
+/**
+ * msOWSCommonNegotiateVersion()
+ *
+ * returns a supported version as per subclause 7.3.2
+ *
+ * @param requested_version the version passed by the client
+ * @param supported_versions an array of supported versions
+ * @param num_supported_versions size of supported_versions
+ *
+ * @return supported version integer, or -1 on error
+ *
+ */
+
+int msOWSCommonNegotiateVersion(int requested_version, int supported_versions[], int num_supported_versions) {
+ int i;
+
+ /* if version is not set return error */
+ if (! requested_version)
+ return -1;
+
+ /* return the first entry that's equal to the requested version */
+ for (i = 0; i < num_supported_versions; i++) {
+ if (supported_versions[i] == requested_version)
+ return supported_versions[i];
+ }
+
+ /* no match; calling code should throw an exception */
+ return -1;
+}
Modified: trunk/mapserver/mapowscommon.h
===================================================================
--- trunk/mapserver/mapowscommon.h 2010-03-25 14:05:29 UTC (rev 10008)
+++ trunk/mapserver/mapowscommon.h 2010-03-25 14:18:41 UTC (rev 10009)
@@ -70,7 +70,6 @@
/* function prototypes */
-int msOWSCommonNegotiateVersion(int requested_version, int supported_versions[], int num_supported_versions);
xmlNodePtr msOWSCommonServiceIdentification(xmlNsPtr psNsOws, mapObj *map, const char *servicetype, const char *version, const char *namespaces);
@@ -98,4 +97,6 @@
const char *content, const char *encoding);
#endif /* defined(USE_LIBXML2) */
+int msOWSCommonNegotiateVersion(int requested_version, int supported_versions[], int num_supported_versions);
+
#endif /* MAPOWSCOMMON_H */
More information about the mapserver-commits
mailing list