axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manj...@apache.org
Subject svn commit: r530251 - in /webservices/axis2/scratch/c/neethi: include/rp_algorithmsuite_builder.h include/rp_layout_builder.h src/secpolicy/builder/algorithmsuite_builder.c src/secpolicy/builder/layout_builder.c
Date Thu, 19 Apr 2007 03:38:16 GMT
Author: manjula
Date: Wed Apr 18 20:38:15 2007
New Revision: 530251

URL: http://svn.apache.org/viewvc?view=rev&rev=530251
Log:
Adding layout and algorithmsuite builders.

Added:
    webservices/axis2/scratch/c/neethi/include/rp_algorithmsuite_builder.h
    webservices/axis2/scratch/c/neethi/include/rp_layout_builder.h
    webservices/axis2/scratch/c/neethi/src/secpolicy/builder/algorithmsuite_builder.c
    webservices/axis2/scratch/c/neethi/src/secpolicy/builder/layout_builder.c

Added: webservices/axis2/scratch/c/neethi/include/rp_algorithmsuite_builder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/include/rp_algorithmsuite_builder.h?view=auto&rev=530251
==============================================================================
--- webservices/axis2/scratch/c/neethi/include/rp_algorithmsuite_builder.h (added)
+++ webservices/axis2/scratch/c/neethi/include/rp_algorithmsuite_builder.h Wed Apr 18 20:38:15
2007
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
+#ifndef RP_ALGORITHMSUITE_BUILDER_H
+#define RP_ALGORITHMSUITE_BUILDER_H
+
+/** @defgroup rp_algorithmsuite_builder
+ * @ingroup rp_algorithmsuite_builder
+ * @{
+ */
+
+#include <rp_includes.h>
+#include <rp_property.h>
+#include <rp_algorithmsuite.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    AXIS2_EXTERN rp_algorithmsuite_t *AXIS2_CALL
+    rp_algorithmsuite_builder_build(
+        const axutil_env_t *env,
+        axiom_node_t *node,
+        axiom_element_t *element);
+ 
+#ifdef __cplusplus
+}
+#endif
+#endif

Added: webservices/axis2/scratch/c/neethi/include/rp_layout_builder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/include/rp_layout_builder.h?view=auto&rev=530251
==============================================================================
--- webservices/axis2/scratch/c/neethi/include/rp_layout_builder.h (added)
+++ webservices/axis2/scratch/c/neethi/include/rp_layout_builder.h Wed Apr 18 20:38:15 2007
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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.
+ */
+
+#ifndef RP_LAYOUT_BUILDER_H
+#define RP_LAYOUT_BUILDER_H
+
+/** @defgroup rp_layout_builder
+ * @ingroup rp_layout_builder
+ * @{
+ */
+
+#include <rp_includes.h>
+#include <rp_property.h>
+#include <rp_layout.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    AXIS2_EXTERN rp_layout_t *AXIS2_CALL
+    rp_layout_builder_build(
+        const axutil_env_t *env,
+        axiom_node_t *node,
+        axiom_element_t *element);
+ 
+#ifdef __cplusplus
+}
+#endif
+#endif

Added: webservices/axis2/scratch/c/neethi/src/secpolicy/builder/algorithmsuite_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/src/secpolicy/builder/algorithmsuite_builder.c?view=auto&rev=530251
==============================================================================
--- webservices/axis2/scratch/c/neethi/src/secpolicy/builder/algorithmsuite_builder.c (added)
+++ webservices/axis2/scratch/c/neethi/src/secpolicy/builder/algorithmsuite_builder.c Wed
Apr 18 20:38:15 2007
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <rp_algorithmsuite_builder.h>
+#include <policy_operator.h>
+#include <policy.h>
+#include <policy_assertion.h>
+#include <policy_exactlyone.h>
+#include <policy_all.h>
+#include <policy_engine.h>
+
+
+
+AXIS2_EXTERN rp_algorithmsuite_t *AXIS2_CALL 
+rp_algorithmsuite_builder_build(
+        const axutil_env_t *env,
+        axiom_node_t *node,
+        axiom_element_t *element)
+
+{
+    rp_algorithmsuite_t *algorithmsuite = NULL;
+    axiom_node_t *child_node = NULL;
+    axiom_node_t *algo_node = NULL;
+    axiom_element_t *algo_element = NULL;
+
+    algorithmsuite = rp_algorithmsuite_create(env);
+    
+    child_node = axiom_node_get_first_element(node,env);
+
+    if(child_node)
+    {
+        algo_node = axiom_node_get_first_element(child_node, env);
+    }        
+
+    if(axiom_node_get_node_type(algo_node, env) == AXIOM_ELEMENT)
+    {
+        algo_element = (axiom_element_t*)axiom_node_get_data_element(algo_node, env);
+        if(algo_element)
+        {
+            axis2_char_t *algosuite_string = NULL;
+
+            algosuite_string = axiom_element_get_localname(algo_element, env);
+            if(!algosuite_string)
+                return NULL;
+            rp_algorithmsuite_set_algosuite(algorithmsuite, env, algosuite_string);
+            return algorithmsuite;
+        }
+        else return NULL;
+    }
+    else return NULL;
+}
+

Added: webservices/axis2/scratch/c/neethi/src/secpolicy/builder/layout_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/src/secpolicy/builder/layout_builder.c?view=auto&rev=530251
==============================================================================
--- webservices/axis2/scratch/c/neethi/src/secpolicy/builder/layout_builder.c (added)
+++ webservices/axis2/scratch/c/neethi/src/secpolicy/builder/layout_builder.c Wed Apr 18 20:38:15
2007
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#include <rp_layout_builder.h>
+#include <policy_operator.h>
+#include <policy.h>
+#include <policy_assertion.h>
+#include <policy_exactlyone.h>
+#include <policy_all.h>
+#include <policy_engine.h>
+
+
+
+AXIS2_EXTERN rp_layout_t *AXIS2_CALL 
+rp_layout_builder_build(
+        const axutil_env_t *env,
+        axiom_node_t *node,
+        axiom_element_t *element)
+
+{
+    rp_layout_t *layout = NULL;
+    axiom_node_t *child_node = NULL;
+    axiom_node_t *layout_node = NULL;
+    axiom_element_t *layout_element = NULL;
+
+    layout = rp_layout_create(env);
+    
+    child_node = axiom_node_get_first_element(node,env);
+
+    if(child_node)
+    {
+        layout_node = axiom_node_get_first_element(child_node, env);
+    }        
+
+    if(axiom_node_get_node_type(layout_node, env) == AXIOM_ELEMENT)
+    {
+        layout_element = (axiom_element_t*)axiom_node_get_data_element(layout_node, env);
+        if(layout_element)
+        {
+            axis2_char_t *local_name = NULL;
+
+            local_name = axiom_element_get_localname(layout_element, env);
+            if(!local_name)
+                return NULL;
+            rp_layout_set_value(layout, env, local_name);
+            return layout;
+        }
+        else return NULL;
+    }
+    else return NULL;
+}
+



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message