You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by da...@apache.org on 2006/07/18 07:59:27 UTC

svn commit: r422980 - in /webservices/sandesha/trunk/c: include/sandesha2/sandesha2_msg_ctx.h include/sandesha2_sender.h src/util/utils.c

Author: damitha
Date: Mon Jul 17 22:59:27 2006
New Revision: 422980

URL: http://svn.apache.org/viewvc?rev=422980&view=rev
Log:
Added new file and added utility functions

Added:
    webservices/sandesha/trunk/c/include/sandesha2_sender.h
Modified:
    webservices/sandesha/trunk/c/include/sandesha2/sandesha2_msg_ctx.h
    webservices/sandesha/trunk/c/src/util/utils.c

Modified: webservices/sandesha/trunk/c/include/sandesha2/sandesha2_msg_ctx.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2/sandesha2_msg_ctx.h?rev=422980&r1=422979&r2=422980&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2/sandesha2_msg_ctx.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2/sandesha2_msg_ctx.h Mon Jul 17 22:59:27 2006
@@ -288,9 +288,15 @@
 
 #define SANDESHA2_MSG_CTX_SET_TO(rm_msg_ctx, env, to) \
     ((rm_msg_ctx)->ops->set_to(rm_msg_ctx, env, to))
+
+#define SANDESHA2_MSG_CTX_SET_TO(rm_msg_ctx, env, to) \
+    ((rm_msg_ctx)->ops->set_to(rm_msg_ctx, env, to))
     
 #define SANDESHA2_MSG_CTX_GET_TO(rm_msg_ctx, env) \
     ((rm_msg_ctx)->ops->get_to(rm_msg_ctx, env))
+    
+#define SANDESHA2_MSG_CTX_GET_REPLY_TO(rm_msg_ctx, env) \
+    ((rm_msg_ctx)->ops->get_reply_to(rm_msg_ctx, env))
 
 #define SANDESHA2_MSG_CTX_SET_FAULT_TO(rm_msg_ctx, env, fault_to) \
     ((rm_msg_ctx)->ops->set_fault_to(rm_msg_ctx, env, fault_to))

Added: webservices/sandesha/trunk/c/include/sandesha2_sender.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_sender.h?rev=422980&view=auto
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_sender.h (added)
+++ webservices/sandesha/trunk/c/include/sandesha2_sender.h Mon Jul 17 22:59:27 2006
@@ -0,0 +1,122 @@
+/*
+ * 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 SANDESHA2_SENDER_H
+#define SANDESHA2_SENDER_H
+
+/**
+ * @file sandesha2_sender.h
+ * @brief Sandesha Sender Interface
+ */
+
+#include <axis2_allocator.h>
+#include <axis2_env.h>
+#include <axis2_error.h>
+#include <axis2_string.h>
+#include <axis2_utils.h>
+#include <axis2_conf_ctx.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef struct sandesha2_sender sandesha2_sender_t;
+typedef struct sandesha2_sender_ops sandesha2_sender_ops_t;
+
+/** @defgroup sandesha2_sender Sender
+  * @ingroup sandesha2
+  * @{
+  */
+
+struct sandesha2_sender_ops
+{
+   /** 
+     * Deallocate memory
+     * @return status code
+     */
+    axis2_status_t (AXIS2_CALL *
+    free) (
+            void *sender,
+            const axis2_env_t *env);
+     
+    axis2_status_t (AXIS2_CALL *
+    stop_sender_for_the_seq) (
+            sandesha2_sender_t *sender,
+            const axis2_env_t *env,
+            axis2_char_t *seq_id);
+
+    axis2_status_t (AXIS2_CALL *
+    stop_sending) (
+            sandesha2_sender_t *sender,
+            const axis2_env_t *env);
+
+    axis2_bool_t (AXIS2_CALL *
+    is_sender_started) (
+            sandesha2_sender_t *sender,
+            const axis2_env_t *env);
+
+    axis2_status_t (AXIS2_CALL *
+    run) (
+            sandesha2_sender_t *sender,
+            const axis2_env_t *env);
+
+    axis2_status_t (AXIS2_CALL *
+    run_sender_for_the_seq) (
+            sandesha2_sender_t *sender,
+            const axis2_env_t *env,
+            axis2_conf_ctx_t *conf_ctx,
+            axis2_char_t *seq_id);
+};
+
+struct sandesha2_sender
+{
+    sandesha2_sender_ops_t *ops;
+};
+
+AXIS2_EXTERN sandesha2_sender_t * AXIS2_CALL
+sandesha2_sender_create(
+        const axis2_env_t *env);
+
+#define SANDESHA2_SENDER_FREE(sender, env) \
+      (((sandesha2_sender_t *) sender)->ops->free (sender, env))
+
+#define SANDESHA2_SENDER_STOP_SENDER_FOR_THE_SEQ(sender, env, \
+        seq_id) \
+      (((sandesha2_sender_t *) sender)->ops->\
+      stop_sender_for_the_seq (sender, env, seq_id))
+
+#define SANDESHA2_SENDER_STOP_SENDING(sender, env) \
+      (((sandesha2_sender_t *) sender)->ops->\
+      stop_sending (sender, env))
+
+#define SANDESHA2_SENDER_IS_SENDER_STARTED(sender, env) \
+      (((sandesha2_sender_t *) sender)->ops->\
+      is_sender_started (sender, env))
+
+#define SANDESHA2_SENDER_RUN(sender, env) \
+      (((sandesha2_sender_t *) sender)->ops->\
+      run (sender, env))
+
+#define SANDESHA2_SENDER_RUN_SENDER_FOR_THE_SEQ(sender, env, conf_ctx, seq_id) \
+      (((sandesha2_sender_t *) sender)->ops->\
+      run_sender_for_the_seq (sender, env, conf_ctx, seq_id))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* SANDESHA2_SENDER_H */

Modified: webservices/sandesha/trunk/c/src/util/utils.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/utils.c?rev=422980&r1=422979&r2=422980&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/utils.c Mon Jul 17 22:59:27 2006
@@ -292,6 +292,37 @@
     SANDESHA2_IN_ORDER_INVOKER_RUN_FOR_SEQ(invoker, env, conf_ctx, seq_id);
     return AXIS2_SUCCESS;
 }
+/*
+AXIS2_EXTERN axis2_status_t AXIS2_CALL                        
+sandesha2_utils_start_sender_for_seq(const axis2_env_t *env,
+                        axis2_conf_ctx_t *conf_ctx,
+                        axis2_char_t *seq_id)
+{
+    sandesha2_sender_t *sender = NULL;
+    axis2_property_t *property = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FAILURE);
+    
+    property = AXIS2_CTX_GET_PROPERTY(AXIS2_CONF_CTX_GET_BASE(conf_ctx, env),
+                        env, SANDESHA2_INVOKER, AXIS2_FALSE);
+    if(NULL == property)
+        return AXIS2_FAILURE;
+    sender = AXIS2_PROPERTY_GET_VALUE(property, env);
+    if(NULL == sender)
+    {
+        sender = sandesha2_transport_sender_create(env);
+        property = axis2_property_create(env);
+        AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
+        AXIS2_PROPERTY_SET_VALUE(property, env, sender);
+        AXIS2_CTX_SET_PROPERTY(AXIS2_CONF_CTX_GET_BASE(conf_ctx, env),
+                        env, SANDESHA2_SENDER, property, AXIS2_FALSE);
+    }
+    SANDESHA2_SENDER_RUN_FOR_SEQ(sender, env, conf_ctx, seq_id);
+    return AXIS2_SUCCESS;
+}
+*/               
                         
 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
 sandesha2_utils_get_outgoing_internal_seq_id(const axis2_env_t *env,



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