axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r344951 - in /webservices/axis2/trunk/c/include: axis2_disp.h axis2_msg_ctx.h axis2_operation.h axis2_relates_to.h axis2_svc.h
Date Wed, 16 Nov 2005 08:21:55 GMT
Author: samisa
Date: Wed Nov 16 00:21:43 2005
New Revision: 344951

URL: http://svn.apache.org/viewcvs?rev=344951&view=rev
Log:
Added dispatcher base

Added:
    webservices/axis2/trunk/c/include/axis2_disp.h
Modified:
    webservices/axis2/trunk/c/include/axis2_msg_ctx.h
    webservices/axis2/trunk/c/include/axis2_operation.h
    webservices/axis2/trunk/c/include/axis2_relates_to.h
    webservices/axis2/trunk/c/include/axis2_svc.h

Added: webservices/axis2/trunk/c/include/axis2_disp.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_disp.h?rev=344951&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_disp.h (added)
+++ webservices/axis2/trunk/c/include/axis2_disp.h Wed Nov 16 00:21:43 2005
@@ -0,0 +1,86 @@
+/*
+ * 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 AXIS2_DISP_H
+#define AXIS2_DISP_H
+
+/**
+ * @file axis2_disp.h
+ * @brief Axis2 Dispatcher interface
+ */
+
+#include <axis2_defines.h>
+#include <axis2_qname.h>
+#include <axis2_handler.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    struct axis2_disp;
+    struct axis2_disp_ops;
+    
+/**
+ * @defgroup axis2_disp Dispatcher
+ * @ingroup axis2_engine
+ * @{
+ */
+
+/**
+ *   \brief Dispatcher operations struct
+ */
+ AXIS2_DECLARE_DATA   typedef struct axis2_disp_ops
+    { 
+        axis2_handler_t* (AXIS2_CALL *get_base) (struct axis2_disp *disp, 
+                                               axis2_env_t **env);
+        axis2_qname_t* (AXIS2_CALL *get_qname) (struct axis2_disp *disp, 
+                                               axis2_env_t **env);
+        axis2_status_t (AXIS2_CALL *set_qname) (struct axis2_disp *disp, 
+                                               axis2_env_t **env, axis2_qname_t *qname);
+        axis2_status_t (AXIS2_CALL *free) (struct axis2_disp *disp, 
+                                               axis2_env_t **env);
+        
+    } axis2_disp_ops_t;
+	
+   /** 
+    * \brief Dispatcher struct
+    */
+    typedef struct axis2_disp
+    {
+        /** Dispatcher related operations */
+        axis2_disp_ops_t *ops;
+    } axis2_disp_t;
+
+
+/**
+ * creates disp struct
+ * @param qname qname, can be NULL
+ */
+AXIS2_DECLARE(axis2_disp_t*) axis2_disp_create(axis2_env_t **env, axis2_qname_t *qname);
+
+#define AXIS2_DISP_GET_BASE(disp, env) ((disp)->ops->get_base(disp, env))
+#define AXIS2_DISP_GET_QNAME(disp, env) ((disp)->ops->get_qname(disp, env))
+#define AXIS2_DISP_SET_QNAME(disp, env, name) ((disp)->ops->set_qname(disp, env, name))
+#define AXIS2_DISP_FREE(disp, env) ((disp)->ops->free(disp, env))
+    
+/** @} */
+    
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* AXIS2_DISP_H */

Modified: webservices/axis2/trunk/c/include/axis2_msg_ctx.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_msg_ctx.h?rev=344951&r1=344950&r2=344951&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_ctx.h Wed Nov 16 00:21:43 2005
@@ -37,7 +37,9 @@
  */
     
 typedef struct axis2_msg_ctx_ops axis2_msg_ctx_ops_t;
-typedef struct axis2_msg_ctx axis2_msg_ctx_t;    
+typedef struct axis2_msg_ctx axis2_msg_ctx_t; 
+struct axis2_svc;    
+struct axis2_operation;
     
 /** 
  * @brief Message Context operations struct
@@ -63,7 +65,30 @@
                                          axis2_env_t **env); 
     /** TODO change void* to real return type */
     axis2_relates_to_t* (AXIS2_CALL *get_relates_to)(axis2_msg_ctx_t *msg_ctx,
-                                         axis2_env_t **env); 
+                                         axis2_env_t **env);
+    
+    struct axis2_svc* (AXIS2_CALL *get_svc)(axis2_msg_ctx_t *msg_ctx,
+                                         axis2_env_t **env);
+    axis2_status_t (AXIS2_CALL *set_svc)(axis2_msg_ctx_t *msg_ctx,
+                                         axis2_env_t **env, struct axis2_svc *svc);
+   /**
+    * needs to be implemented by despatchers and be assigned the function pointer
+    * dependancy comes from disp interface
+    */
+    struct axis2_svc* (AXIS2_CALL *find_svc)(axis2_msg_ctx_t *msg_ctx,
+                                         axis2_env_t **env);
+    struct axis2_operation* (AXIS2_CALL *get_operation)(axis2_msg_ctx_t *msg_ctx,
+                                         axis2_env_t **env);
+    axis2_status_t (AXIS2_CALL *set_operation)(axis2_msg_ctx_t *msg_ctx,
+                                         axis2_env_t **env, struct axis2_operation *operation);
+   /**
+    * needs to be implemented by despatchers and be assigned the function pointer
+    * dependancy comes from disp interface
+    * needs to use the current service for searching the operation
+    */
+    struct axis2_operation* (AXIS2_CALL *find_operation)(axis2_msg_ctx_t *msg_ctx,
+                                         axis2_env_t **env);
+    
 };
 
 /** 
@@ -82,8 +107,14 @@
 
 #define AXIS2_MSG_CTX_FREE(msg_ctx, env) ((msg_ctx)->ops->free (msg_ctx, env))
 #define AXIS2_MSG_CTX_SET_PAUSED_PHASE_NAME(msg_ctx, env, name) ((msg_ctx)->ops->set_paused_phase_name(msg_ctx,
env, name))
-#define AXIS2_MSG_CTX_IS_PAUSED(msg_ctx, env) ((msg_ctx)->ops->is_paused (msg_ctx,
env))
+#define AXIS2_MSG_CTX_IS_PAUSED(msg_ctx, env) ((msg_ctx)->ops->is_paused(msg_ctx, env))
 #define AXIS2_MSG_CTX_GET_RELATES_TO(msg_ctx, env) ((msg_ctx)->ops->get_relates_to(msg_ctx,
env))
+#define AXIS2_MSG_CTX_GET_SVC(msg_ctx, env) ((msg_ctx)->ops->get_svc(msg_ctx, env))
+#define AXIS2_MSG_CTX_SET_SVC(msg_ctx, env, svc) ((msg_ctx)->ops->set_svc(msg_ctx,
env, svc))
+#define AXIS2_MSG_CTX_FIND_SVC(msg_ctx, env) ((msg_ctx)->ops->find_svc(msg_ctx, env))
+#define AXIS2_MSG_CTX_GET_OPERATION(msg_ctx, env) ((msg_ctx)->ops->get_operation(msg_ctx,
env))
+#define AXIS2_MSG_CTX_SET_OPERATION(msg_ctx, env, operation) ((msg_ctx)->ops->set_operation(msg_ctx,
env, operation))
+#define AXIS2_MSG_CTX_FIND_OPERATION(msg_ctx, env) ((msg_ctx)->ops->find_operation(msg_ctx,
env))
 
 /************************** End of function macros ****************************/    
 

Modified: webservices/axis2/trunk/c/include/axis2_operation.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_operation.h?rev=344951&r1=344950&r2=344951&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_operation.h (original)
+++ webservices/axis2/trunk/c/include/axis2_operation.h Wed Nov 16 00:21:43 2005
@@ -39,16 +39,16 @@
   * @{
   */
 
-struct axis2_svc_s;
-struct axis2_msg_recv_s;
-typedef struct axis2_operation_ops_s axis2_operation_ops_t;    
-typedef struct axis2_operation_s axis2_operation_t;    
+struct axis2_svc;
+struct axis2_msg_recv;
+typedef struct axis2_operation_ops axis2_operation_ops_t;    
+typedef struct axis2_operation axis2_operation_t;    
     
 /** 
  * @brief Operation operations struct
  * Encapsulator struct for operations of axis2_operation
  */    
-AXIS2_DECLARE_DATA struct axis2_operation_ops_s
+AXIS2_DECLARE_DATA struct axis2_operation_ops
 {
     /** De-allocate memory
   	 * @return status code
@@ -87,9 +87,9 @@
 	
 	axis2_status_t (AXIS2_CALL *set_parent) (axis2_operation_t *operation, 
                                      axis2_env_t **env,
-                                     struct axis2_svc_s *service_desc);
+                                     struct axis2_svc *service_desc);
 
-	struct axis2_svc_s *(AXIS2_CALL *get_parent) (axis2_operation_t *operation, 
+	struct axis2_svc *(AXIS2_CALL *get_parent) (axis2_operation_t *operation, 
                                             axis2_env_t **env);
 
     axis2_status_t (AXIS2_CALL *set_name) (axis2_operation_t *operation, 
@@ -110,9 +110,9 @@
 
 	axis2_status_t (AXIS2_CALL *set_msg_recv) (axis2_operation_t *operation, 
                                         axis2_env_t **env,
-                                        struct axis2_msg_recv_s *msg_recv);
+                                        struct axis2_msg_recv *msg_recv);
 
-	struct axis2_msg_recv_s *(AXIS2_CALL *get_msg_recv) (axis2_operation_t *operation, 
+	struct axis2_msg_recv *(AXIS2_CALL *get_msg_recv) (axis2_operation_t *operation, 
                                                     axis2_env_t **env);
     
     axis2_hash_t * (AXIS2_CALL *get_component_properties) (
@@ -148,7 +148,7 @@
  * @brief Operaton struct
  *	Axis2 Operation   
  */  
-AXIS2_DECLARE_DATA struct axis2_operation_s
+AXIS2_DECLARE_DATA struct axis2_operation
 {
 	axis2_operation_ops_t *ops;
 };

Modified: webservices/axis2/trunk/c/include/axis2_relates_to.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_relates_to.h?rev=344951&r1=344950&r2=344951&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_relates_to.h (original)
+++ webservices/axis2/trunk/c/include/axis2_relates_to.h Wed Nov 16 00:21:43 2005
@@ -23,8 +23,6 @@
  */
 
 #include <axis2_defines.h>
-#include <axis2_qname.h>
-#include <axis2_handler.h>
 
 #ifdef __cplusplus
 extern "C"
@@ -50,14 +48,14 @@
          *
          * @return
          */
-        axis2_char_t* (AXIS2_CALL *get_value)(struct axis_relates_to *relates_to, axis2_env_t
**env);
+        axis2_char_t* (AXIS2_CALL *get_value)(struct axis2_relates_to *relates_to, axis2_env_t
**env);
 
         /**
          * Method set_value
          *
          * @param value
          */
-        axis2_status_t (AXIS2_CALL *set_value)(struct axis_relates_to *relates_to, axis2_env_t
**env, 
+        axis2_status_t (AXIS2_CALL *set_value)(struct axis2_relates_to *relates_to, axis2_env_t
**env, 
                                  axis2_char_t * value);
 
         /**
@@ -65,14 +63,14 @@
          *
          * @return
          */
-        axis2_char_t* (AXIS2_CALL *get_relationship_type)(struct axis_relates_to *relates_to,
axis2_env_t **env);
+        axis2_char_t* (AXIS2_CALL *get_relationship_type)(struct axis2_relates_to *relates_to,
axis2_env_t **env);
 
         /**
          * Method set_relationship_type
          *
          * @param relationship_type
          */
-        axis2_status_t (AXIS2_CALL *set_relationship_type)(struct axis_relates_to *relates_to,
axis2_env_t **env, 
+        axis2_status_t (AXIS2_CALL *set_relationship_type)(struct axis2_relates_to *relates_to,
axis2_env_t **env, 
                                              axis2_char_t *relationship_type);
         
        /**

Modified: webservices/axis2/trunk/c/include/axis2_svc.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_svc.h?rev=344951&r1=344950&r2=344951&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc.h Wed Nov 16 00:21:43 2005
@@ -41,29 +41,29 @@
   * @{
   */
 
-struct axis2_svc_grp_s;
-struct axis2_operation_s;    
-typedef struct axis2_svc_ops_s axis2_svc_ops_t;   
-typedef struct axis2_svc_s axis2_svc_t;
+struct axis2_svc_grp;
+struct axis2_operation;    
+typedef struct axis2_svc_ops axis2_svc_ops_t;   
+typedef struct axis2_svc axis2_svc_t;
     
 /** 
  * @brief Service operations struct
  * Encapsulator struct for operations of axis2_svc
  */    
-struct axis2_svc_ops_s
+struct axis2_svc_ops
 {
 	axis2_status_t (AXIS2_CALL *free) (axis2_svc_t *svc, axis2_env_t **env);
 
 	axis2_status_t (AXIS2_CALL *add_operation) (axis2_svc_t *svc, 
                                                 axis2_env_t **env,
-	 	                                        struct axis2_operation_s *operation);
+	 	                                        struct axis2_operation *operation);
 
-	struct axis2_operation_s *(AXIS2_CALL *get_operation_with_qname) (
+	struct axis2_operation *(AXIS2_CALL *get_operation_with_qname) (
                                                   axis2_svc_t *svc, 
                                                   axis2_env_t **env,
 	 	                                          axis2_qname_t *operation_name);
 
-	struct axis2_operation_s *(AXIS2_CALL *get_operation_with_name) (
+	struct axis2_operation *(AXIS2_CALL *get_operation_with_name) (
                                             axis2_svc_t *svc, 
                                             axis2_env_t **env,
 	 	                                    const axis2_char_t * operation_name);
@@ -73,9 +73,9 @@
 
 	axis2_status_t (AXIS2_CALL *set_parent) (axis2_svc_t *svc, 
                                                 axis2_env_t **env,
-	 	                                        struct axis2_svc_grp_s *svc_grp);
+	 	                                        struct axis2_svc_grp *svc_grp);
 
-	struct axis2_svc_grp_s *(AXIS2_CALL *get_parent) (axis2_svc_t *svc, 
+	struct axis2_svc_grp *(AXIS2_CALL *get_parent) (axis2_svc_t *svc, 
                                                 axis2_env_t **env);
 	
     axis2_status_t (AXIS2_CALL *set_name) (const axis2_svc_t *svc, 



Mime
View raw message