You are viewing a plain text version of this content. The canonical link for it is here.
Posted to savan-dev@ws.apache.org by da...@apache.org on 2009/03/06 12:11:39 UTC

svn commit: r750844 - in /webservices/savan/trunk/c/include: savan_constants.h savan_filter.h savan_filter_mod.h savan_subscriber.h savan_util.h

Author: damitha
Date: Fri Mar  6 11:11:37 2009
New Revision: 750844

URL: http://svn.apache.org/viewvc?rev=750844&view=rev
Log: (empty)

Added:
    webservices/savan/trunk/c/include/savan_filter_mod.h   (props changed)
      - copied unchanged from r750714, webservices/savan/trunk/c/include/savan_filter.h
Removed:
    webservices/savan/trunk/c/include/savan_filter.h
Modified:
    webservices/savan/trunk/c/include/savan_constants.h
    webservices/savan/trunk/c/include/savan_subscriber.h
    webservices/savan/trunk/c/include/savan_util.h

Modified: webservices/savan/trunk/c/include/savan_constants.h
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/include/savan_constants.h?rev=750844&r1=750843&r2=750844&view=diff
==============================================================================
--- webservices/savan/trunk/c/include/savan_constants.h (original)
+++ webservices/savan/trunk/c/include/savan_constants.h Fri Mar  6 11:11:37 2009
@@ -86,7 +86,8 @@
 #define ELEM_NAME_REMOVE_TOPIC "RemoveTopic"
 #define DEFAULT_DELIVERY_MODE "http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push"
 #define XPATH_FILTER_DIALECT "http://www.w3.org/TR/1999/REC-xpath-19991116"
-#define DEFAULT_FILTER_DIALECT "http://synapse.apache.org/eventing/dialect/topicFilter"
+#define SYNAPSE_FILTER_DIALECT "http://synapse.apache.org/eventing/dialect/topicFilter"
+#define DEFAULT_FILTER_DIALECT "http://www.w3.org/TR/1999/REC-xpath-19991116"
 
 /* Eventing element names */
 #define ELEM_NAME_SUBSCRIBE             "Subscribe"
@@ -135,6 +136,7 @@
 #define SAVAN_FILTER_DIALECT "Dialect"
 #define SAVAN_SUBSCRIPTION_MANAGER "subscription"
 #define SAVAN_STORAGE_MANAGER "storage_mgr"
+#define SAVAN_FILTER "filter"
 #define SAVAN_SQLITE  "sqlite"
 #define SAVAN_INMEMORY_STORAGE  "inmemory"
 #define SAVAN_SERVICE_STORAGE  "service"

Propchange: webservices/savan/trunk/c/include/savan_filter_mod.h
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: webservices/savan/trunk/c/include/savan_subscriber.h
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/include/savan_subscriber.h?rev=750844&r1=750843&r2=750844&view=diff
==============================================================================
--- webservices/savan/trunk/c/include/savan_subscriber.h (original)
+++ webservices/savan/trunk/c/include/savan_subscriber.h Fri Mar  6 11:11:37 2009
@@ -37,6 +37,7 @@
 {
 #endif
 
+    struct savan_filter_mod;
     typedef struct savan_subscriber_t savan_subscriber_t;
 
 	/* Set the filter dialect
@@ -72,32 +73,6 @@
     	savan_subscriber_t *subscriber,
     	const axutil_env_t *env);
 
-	/*
- 	* Set the filter template into the subscriber.
- 	* @param subscriber pointer to the subscriber
- 	* @param env pointer to env
- 	* @param xslt template pointer to the stylesheet
- 	*/
-
-	AXIS2_EXTERN axis2_status_t AXIS2_CALL
-	savan_subscriber_set_filter_template(
-    	savan_subscriber_t *subscriber,
-    	const axutil_env_t *env,
-    	void* xslt_filter_template);
-
-	/*
- 	* Get the filter template from the subscriber.
- 	* needs to cast into a xsltStylesheepPtr
- 	* @param subscriber pointer to the subscriber
- 	* @param env pointer to env
- 	* @param xslt template pointer to the stylesheet
- 	*/
-
-	AXIS2_EXTERN void* AXIS2_CALL
-	savan_subscriber_get_filter_template(
-    	savan_subscriber_t *subscriber,
-    	const axutil_env_t *env);
-
     /**
      * Retrive subscriber id.
      * @param subscriber pointer to subscriber
@@ -236,6 +211,7 @@
     savan_subscriber_publish(
         savan_subscriber_t *subscriber,
         const axutil_env_t *env,
+        struct savan_filter_mod *filtermod,
         axiom_node_t *payload);
 
     /**
@@ -293,17 +269,6 @@
         savan_subscriber_t *subscriber,
         const axutil_env_t *env);*/
     
-    axis2_status_t AXIS2_CALL
-    savan_subscriber_set_filter_template_path(
-        savan_subscriber_t *subscriber,
-        const axutil_env_t *env,
-        axis2_char_t *path);
-
-    axis2_char_t *AXIS2_CALL
-    savan_subscriber_get_filter_template_path(
-        savan_subscriber_t *subscriber,
-        const axutil_env_t *env);
-
     /*AXIS2_EXTERN axis2_status_t AXIS2_CALL
     savan_subscriber_set_topic_url(
         savan_subscriber_t *subscriber,

Modified: webservices/savan/trunk/c/include/savan_util.h
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/include/savan_util.h?rev=750844&r1=750843&r2=750844&view=diff
==============================================================================
--- webservices/savan/trunk/c/include/savan_util.h (original)
+++ webservices/savan/trunk/c/include/savan_util.h Fri Mar  6 11:11:37 2009
@@ -30,6 +30,7 @@
 #include <savan_subscriber.h>
 #include <savan_sub_processor.h>
 #include <savan_storage_mgr.h>
+#include <savan_filter_mod.h>
 #include <axiom_node.h>
 #include <axiom_element.h>
 
@@ -103,38 +104,6 @@
 		axis2_char_t * reason,
 		axis2_char_t * detail);
 
-	/**
- 	* Apply the filter against the subscriber
- 	* @param subscriber, pointer to the subscriber
- 	* @param env, pointer to the environment
- 	* @param payload, pointer to the payload.
- 	* returns filtered payload. 
- 	* If filtered payload is not NULL send it to the sink.
- 	* Else nothing is sent.
- 	*/ 
-
-	axiom_node_t *AXIS2_CALL
-	savan_util_apply_filter(
-    	savan_subscriber_t *subscriber,
-    	const axutil_env_t *env,
-    	axiom_node_t *payload);
-
-	/**
- 	* Set the filter template for the subscriber
- 	* for filtering.
- 	* @param subscriber pointer to the subscriber
- 	* @param sub_processor, pointer to the sub_processor
- 	* @param env, pointer to the environment.
- 	* returns success, if operation is successful.
- 	*/
-
-    #ifdef SAVAN_FILTERING
-    axis2_status_t AXIS2_CALL
-    savan_util_set_filter_template_for_subscriber(
-        savan_subscriber_t *subscriber,
-        const axutil_env_t *env);
-    #endif
-
     savan_message_types_t AXIS2_CALL
     savan_util_get_message_type(
         axis2_msg_ctx_t *msg_ctx,
@@ -375,7 +344,8 @@
      * available as a message context property. Otherwise create it and set as message context
      * property.
      * @param env environment object
-     * @param msg_ctx message context instance
+     * @param conf_ctx configuration context instance
+     * @param conf Axis2 main configuration instance
      * @return storage manager
      */
     AXIS2_EXTERN savan_storage_mgr_t * AXIS2_CALL
@@ -383,6 +353,20 @@
         const axutil_env_t *env,
         axis2_conf_ctx_t *conf_ctx,
         axis2_conf_t *conf);
+
+    /**
+     * Retrieve filter handler. If it is already created for this request scope then it should be 
+     * available as a message context property. Otherwise create it and set as message context
+     * property.
+     * @param env environment object
+     * @param conf Axis2 main configuration instance
+     * @return filter handler
+     */
+    AXIS2_EXTERN savan_filter_mod_t * AXIS2_CALL
+    savan_util_get_filter_module(
+        const axutil_env_t *env,
+        axis2_conf_t *conf);
+
 /** @} */
 #ifdef __cplusplus
 }