Author: damitha
Date: Sun Nov  6 22:42:50 2005
New Revision: 331225

URL: http://svn.apache.org/viewcvs?rev=331225&view=rev
Log:
svc grp header file is completed. But not tested

Modified:
    webservices/axis2/trunk/c/include/axis2_core.h
    webservices/axis2/trunk/c/include/axis2_operation.h
    webservices/axis2/trunk/c/include/axis2_svc.h
    webservices/axis2/trunk/c/include/axis2_svc_grp.h

Modified: webservices/axis2/trunk/c/include/axis2_core.h
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_core.h?rev=331225&r1=331224&r2=331225&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_core.h (original)
+++ webservices/axis2/trunk/c/include/axis2_core.h Sun Nov  6 22:42:50 2005
@@ -63,50 +63,6 @@
 #define SERVICE_NAME_SPLIT_CHAR ":"
 
 /** @cond */
-struct axis2_param_ops_s;
-struct axis2_param_s;
-/** @endcond */
-typedef struct axis2_param_ops_s axis2_param_ops_t;
-typedef struct axis2_param_s axis2_param_t;
-
-
-
-/** @cond */
-struct axis2_param_container_ops_s;
-struct axis2_param_container_s;
-/** @endcond */                
-typedef struct axis2_param_container_ops_s axis2_param_container_ops_t;        
-typedef struct axis2_param_container_s axis2_param_container_t;
-
-
-/** @cond */
-struct axis2_operation_s;
-struct axis2_operation_ops_s;
-/** @endcond */
-typedef struct axis2_operation_s axis2_operation_t;
-typedef struct axis2_operation_ops_s 
-               axis2_operation_ops_t;
-
-
-/** @cond */
-struct axis2_svc_s;
-struct axis2_svc_ops_s;
-/** @endcond */
-typedef struct axis2_svc_s axis2_svc_t;
-typedef struct axis2_svc_ops_s 
-               axis2_svc_ops_t;
-
-
-/** @cond */
-struct axis2_description_servicegroup_s;
-struct axis2_description_servicegroup_ops_s;
-/** @endcond */        
-typedef struct axis2_description_servicegroup_s axis2_svc_grp_t;
-typedef struct axis2_description_servicegroup_ops_s 
-               axis2_description_servicegroup_ops_t;
-
-
-/** @cond */
 struct axis2_context_msg_ctx_s;
 struct axis2_context_msg_ctx_ops_s;
 /** @endcond */

Modified: webservices/axis2/trunk/c/include/axis2_operation.h
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_operation.h?rev=331225&r1=331224&r2=331225&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_operation.h (original)
+++ webservices/axis2/trunk/c/include/axis2_operation.h Sun Nov  6 22:42:50 2005
@@ -39,7 +39,6 @@
 
 struct axis2_svc_s;
 struct axis2_msg_recv_s;
-typedef struct axis2_operation_s axis2_operation_t;
 typedef struct axis2_operation_s axis2_operation_t;    
     
 /** 
@@ -83,7 +82,7 @@
        
        axis2_status_t (AXIS2_CALL *set_parent) (axis2_operation_t *operation, 
                                      *axis2_env_t **env,
-                                     axis2_svc_t *service_desc);
+                                     struct axis2_svc_s *service_desc);
 
        struct axis2_svc_s *(AXIS2_CALL *get_parent) (axis2_operation_t 
*operation, 
                                             axis2_env_t **env);

Modified: webservices/axis2/trunk/c/include/axis2_svc.h
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_svc.h?rev=331225&r1=331224&r2=331225&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc.h Sun Nov  6 22:42:50 2005
@@ -38,6 +38,9 @@
   * @{
   */
 
+struct axis2_svc_grp_s;
+typedef struct axis2_svc_s axis2_svc_t;
+    
 /** 
  * @brief Service operations struct
  * Encapsulator struct for operations of axis2_svc
@@ -65,9 +68,9 @@
 
        axis2_status_t (AXIS2_CALL *set_parent) (axis2_svc_t *svc, 
                                                 axis2_env_t **env,
-                                                       axis2_svc_grp_t 
*svc_grp);
+                                                       struct axis2_svc_grp_s 
*svc_grp);
 
-       axis2_svc_grp_t *(AXIS2_CALL *get_parent) (axis2_svc_t *svc, 
+       struct axis2_svc_grp_s *(AXIS2_CALL *get_parent) (axis2_svc_t *svc, 
                                                 axis2_env_t **env);
        
        axis2_qname_t *(AXIS2_CALL *get_name) (const axis2_svc_t *svc, 

Modified: webservices/axis2/trunk/c/include/axis2_svc_grp.h
URL: 
http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_svc_grp.h?rev=331225&r1=331224&r2=331225&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_grp.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_grp.h Sun Nov  6 22:42:50 2005
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#ifndef AXIS2_DESCRIPTION_SERVICEGROUP_H
-#define AXIS2_DESCRIPTION_SERVICEGROUP_H
+#ifndef AXIS2_SVC_GRP_H
+#define AXIS2_SVC_GRP_H
 
 /**
- * @file axis2_description_servicegroup.h
- * @brief axis2 DESCRIPTION CORE servicegroup
+ * @file axis2_svc_grp.h
+ * @brief axis2 service group interface
  */
 
 #include <axis2_core.h>
@@ -31,148 +31,131 @@
 {
 #endif
 
-/** @defgroup axis2_description DESCRIPTION (Axis2 Information model)
-  * @ingroup axis2
+/** @defgroup axis2_svc_grp Service group description
+  * @ingroup axis2_description
   * @{
   */
 
-/** @} */
+struct axis2_svc_s;
+typedef struct axis2_svc_grp_s axis2_svc_grp_t;
+    
+/** 
+ * @brief Service group operations struct
+ * Encapsulator struct for operations of axis2_svc_grp
+ */   
+struct axis2_svc_grp_ops_s
+{
+       /** 
+     * Deallocate memory
+     * @return status code
+     */
+    axis2_status_t (AXIS2_CALL *free) (axis2_svc_grp_t *svc_grp, 
+                                        axis2_env_t **env);
+    
+    /** 
+     * Set name of the service group
+     * @param svc_grp_name service group name
+     * @return status_code
+     */
+    axis2_status_t (AXIS2_CALL *set_name) (axis2_svc_grp_t *svc_grp, 
+                                            axis2_env_t **env, 
+                                            axis2_char_t *svc_grp_name);
+       /** 
+     * Get the service group name
+     * @return service group name
+     */
+    axis2_char_t *(AXIS2_CALL *get_name) (axis2_svc_grp_t *svc_grp, 
+                                            axis2_env_t **env) ;
+    /** 
+     * Add a service to the serivce group
+     * @param service service to be added
+     * @return status code
+     */
+       axis2_status_t (AXIS2_CALL *add_svc) (axis2_svc_grp_t *svc_grp, 
+                                            axis2_env_t **env,
+                                                   struct axis2_svc_s *svc) ;
+    
+    /** 
+     * Get the service from service group
+     * @param svc_name name of the service
+     * @return service description
+     */
+       struct axis2_svc_s *(AXIS2_CALL *get_svc) (axis2_svc_grp_t *svc_grp, 
+                                        axis2_env_t **env,
+               ,                               const axis2_qname_t* svc_name);
+        
+       axis2_status_t (AXIS2_CALL *remove_svc) (axis2_svc_grp_t *svc_grp, 
+                                             axis2_env_t **env,
+                                                    const axis2_qname_t 
*svc_name);
+        
+       axis2_status_t (AXIS2_CALL *add_param) (axis2_svc_grp_t *svc_grp, 
+                                                axis2_env_t **env, 
+                                                axis2_param_t *param);
+        
+       axis2_param_t *(AXIS2_CALL *get_param) (axis2_svc_grp_t *svc_grp, 
+                                                axis2_env_t **env, 
+                                                const axis2_char_t *name);
+        
+       axis2_hash_t *(AXIS2_CALL *get_params) (axis2_svc_grp_t *svc_grp, 
+                                                axis2_env_t *env);
+    
+       axis2_bool_t (AXIS2_CALL *is_param_locked) (axis2_svc_grp_t *svc_grp, 
+                                                axis2_env_t **env, 
+                                                const axis2_char_t 
*param_name);
+};
 
-/**
- * @defgroup axis2_description_servicegroup DESCRIPTION Servicegroup
- * @ingroup axis2_description 
- * @{
+/** 
+ * @brief Service group struct
+  *    Axis2 Service group  
  */
+struct axis2_svc_grp_s
+{
+       axis2_svc_grp_ops_t *ops;   
 
-/**************************** Start of function macros 
************************/
-
-#define axis2_description_servicegroup_free(srvgrp_desc, env) \
-               (axis2_description_servicegroup_get_ops(srvgrp_desc, env)->free 
(srvgrp_desc \
-               , env));
-       
-#define axis2_description_servicegroup_set_name(srvgrp_desc, env \
-               , servicegroup_name) 
(axis2_description_servicegroup_get_ops(srvgrp_desc \
-               , env)->set_name (srvgrp_desc, env, servicegroup_name));
-               
-#define axis2_description_servicegroup_get_name(srvgrp_desc, env) \
-               (axis2_description_servicegroup_get_ops(srvgrp_desc \
-               , env)->get_name(srvgrp_desc, env));
-
-#define axis2_description_servicegroup_add_service(srvgrp_desc, env \
-               , service_desc) 
(axis2_description_servicegroup_get_ops(srvgrp_desc \
-               , env)->add_service (srvgrp_desc, env, service_desc));
-
-#define axis2_description_servicegroup_get_service(srvgrp_desc, env \
-               , service_desc) 
(axis2_description_servicegroup_get_ops(srvgrp_desc \
-               , env)->get_service(srvgrp_desc, env, service_desc));
-               
-#define axis2_description_servicegroup_remove_service(srvgrp_desc, env, 
srvc_name) \
-               (axis2_description_servicegroup_get_ops(srvgrp_desc \
-               , env)->remove_service(srvgrp_desc, env, srvc_name));           
-
-#define axis2_description_servicegroup_add_param(srvgrp_desc, env, param) \
-               (axis2_description_servicegroup_get_ops(srvgrp_desc \
-               , env)->add_param(srvgrp_desc, env, param));
-               
-               
-
-#define axis2_description_servicegroup_get_param(srvgrp_desc, env, name) \
-               (axis2_description_servicegroup_get_ops(srvgrp_desc \
-               , env)->get_param(srvgrp_desc, env, name));
-               
-#define axis2_description_servicegroup_get_params(srvgrp_desc, env) \
-               (axis2_description_servicegroup_get_ops(srvgrp_desc \
-               , env)->get_params(srvgrp_desc, env));
-               
-               
-#define axis2_description_servicegroup_is_param_locked(srvgrp_desc, env \
-               , 
param_name)(axis2_description_servicegroup_get_ops(srvgrp_desc \
-               , env)->is_param_locked(srvgrp_desc, env, param_name));
-               
-/**************************** End of function macros 
**************************/
-/**************************** Function pointers 
*******************************/
-
-/** Deallocate memory
-  * @return status code
-  */
-typedef axis2_status_t (*axis2_description_servicegroup_free_t)
-               (axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env);
+};
 
-/** Set name of the service group_member
-  * @param servicegroup_name
-  * @return status_code
-  */
-typedef axis2_status_t (*axis2_description_servicegroup_set_name_t)
-               (axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-               , axis2_char_t *servicegroup_name);
-               
-/** get the service group name
-  * @return service group name
-  */
-typedef axis2_char_t *(*axis2_description_servicegroup_get_name_t)
-               (axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env);
+/** 
+ * Creates service group struct
+ * @return pointer to newly created service group
+ */
+AXIS2_DECLARE(axis2_svc_grp_t *)
+axis2_svc_grp_create (axis2_env_t **env);
 
-/** Add a service to the serivce group
-  * @param service to be added
-  * @return status code
-  */
-typedef axis2_status_t (*axis2_description_servicegroup_add_service_t)
-               (axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-               , axis2_svc_t *service_desc);
-
-/** Get the service from service group_member
-  * @param service_name
-  * @return service description
-  */
-typedef axis2_svc_t 
-               *(*axis2_description_servicegroup_get_service_t)
-               (axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-               , const axis2_qname_t* service_name);
-
-typedef axis2_status_t (*axis2_description_servicegroup_remove_service_t)
-               (axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-               , const axis2_qname_t *service_name);
-               
-typedef axis2_status_t (*axis2_description_servicegroup_add_param_t)
-               (axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-               , axis2_param_t *param);
-               
+/**************************** Start of function macros 
************************/
 
-typedef axis2_param_t *(*axis2_description_servicegroup_get_param_t)(
-               axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-               , const axis2_char_t *name);
-               
-typedef axis2_hash_t *(*axis2_description_servicegroup_get_params_t)
-               (axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env);
-               
-typedef axis2_bool_t (*axis2_description_servicegroup_is_param_locked_t)
-               (axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env
-               , const axis2_char_t *param_name);
+#define AXIS2_SVC_GRP_FREE(svc_grp, env) (svc_grp->ops->free (svc_grp , env));
+       
+#define AXIS2_SVC_GRP_SET_NAME(svc_grp, env , svc_grp_name) \
+        (svc_grp->ops->set_name (svc_grp, env, svc_grp_name));
                
-/*************************** End of function pointers 
*************************/
-
-struct axis2_description_servicegroup_ops_s
-{
-       axis2_description_servicegroup_free_t free;
-       axis2_description_servicegroup_set_name_t set_name;
-       axis2_description_servicegroup_get_name_t get_name;
-       axis2_description_servicegroup_add_service_t add_service;
-       axis2_description_servicegroup_get_service_t get_service;
-       axis2_description_servicegroup_remove_service_t remove_service;
-       axis2_description_servicegroup_add_param_t add_param;
-       axis2_description_servicegroup_get_param_t get_param;
-       axis2_description_servicegroup_get_params_t get_params;
-       axis2_description_servicegroup_is_param_locked_t is_param_locked;
-};
+#define AXIS2_SVC_GRP_GET_NAME(svc_grp, env) \
+        (svc_grp->ops->get_name(svc_grp, env));
 
-axis2_description_servicegroup_ops_t *axis2_description_servicegroup_get_ops 
-               (axis2_svc_grp_t *srvgrp_desc, axis2_env_t *env);
+#define AXIS2_SVC_GRP_ADD_SVC(svc_grp, env , svc) \
+        (svc_grp->ops->add_svc (svc_grp, env, svc));
 
-axis2_svc_grp_t *axis2_description_servicegroup_create
-               (axis2_env_t *env);
+#define AXIS2_SVC_GRP_GET_SVC(svc_grp, env , svc) \
+        (svc_grp->ops->get_svc(svc_grp, env, svc));
+               
+#define AXIS2_SVC_GRP_REMOVE_SVC(svc_grp, env, srvc_name) \
+               (svc_grp->ops->remove_svc(svc_grp, env, srvc_name));            
+
+#define AXIS2_SVC_GRP_ADD_PARAM(svc_grp, env, param) \
+               (svc_grp->ops->add_param(svc_grp, env, param));
+               
+#define AXIS2_SVC_GRP_GET_PARAM(svc_grp, env, name) \
+               (svc_grp->ops->get_param(svc_grp, env, name));
+               
+#define AXIS2_SVC_GRP_GET_PARAMS(svc_grp, env) \
+        (svc_grp->ops->get_params(svc_grp, env));
+                               
+#define AXIS2_SVC_GRP_IS_PARAM_LOCKED(svc_grp, env , param_name) \
+        (svc_grp->ops->is_param_locked(svc_grp, env, param_name));
+        
+/**************************** End of function macros 
**************************/        
 
 /** @} */
 #ifdef __cplusplus
 }
 #endif
-#endif                          /* AXIS2_DESCRIPTION_SERVICEGROUP_H  */
+#endif                          /* AXIS2_SVC_GRP_H  */


Reply via email to