Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 45780 invoked from network); 20 Nov 2008 06:14:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Nov 2008 06:14:32 -0000 Received: (qmail 55030 invoked by uid 500); 20 Nov 2008 06:14:40 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 54902 invoked by uid 500); 20 Nov 2008 06:14:40 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 54893 invoked by uid 500); 20 Nov 2008 06:14:40 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 54890 invoked by uid 99); 20 Nov 2008 06:14:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Nov 2008 22:14:40 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2008 06:13:26 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 59C25238887D; Wed, 19 Nov 2008 22:14:11 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r719171 - in /webservices/axis2/trunk/c: include/axis2_conf_ctx.h src/core/context/conf_ctx.c Date: Thu, 20 Nov 2008 06:14:11 -0000 To: axis2-cvs@ws.apache.org From: shankar@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081120061411.59C25238887D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: shankar Date: Wed Nov 19 22:14:10 2008 New Revision: 719171 URL: http://svn.apache.org/viewvc?rev=719171&view=rev Log: applying patch of AXIS2C-1292 Modified: webservices/axis2/trunk/c/include/axis2_conf_ctx.h webservices/axis2/trunk/c/src/core/context/conf_ctx.c Modified: webservices/axis2/trunk/c/include/axis2_conf_ctx.h URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_conf_ctx.h?rev=719171&r1=719170&r2=719171&view=diff ============================================================================== --- webservices/axis2/trunk/c/include/axis2_conf_ctx.h (original) +++ webservices/axis2/trunk/c/include/axis2_conf_ctx.h Wed Nov 19 22:14:10 2008 @@ -289,6 +289,35 @@ const axutil_env_t * env, axis2_msg_ctx_t * msg_ctx); + /** + * Sets a property with the given key. + * @param ctx pointer to context struct + * @param env pointer to environment struct + * @param key key string to store the property with + * @param value pointer to property to be stored, context assumes the + * ownership of the property + * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE + */ + AXIS2_EXTERN axis2_status_t AXIS2_CALL + axis2_conf_ctx_set_property( + axis2_conf_ctx_t *conf_ctx, + const axutil_env_t * env, + const axis2_char_t * key, + axutil_property_t * value); + + /** + * Gets the property with the given key. + * @param ctx pointer to context struct + * @param env pointer to environment struct + * @param key key string + * @return pointer to property struct corresponding to the given key + */ + AXIS2_EXTERN axutil_property_t *AXIS2_CALL + axis2_conf_ctx_get_property( + const axis2_conf_ctx_t * conf_ctx, + const axutil_env_t * env, + const axis2_char_t * key); + /** @} */ #ifdef __cplusplus Modified: webservices/axis2/trunk/c/src/core/context/conf_ctx.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/context/conf_ctx.c?rev=719171&r1=719170&r2=719171&view=diff ============================================================================== --- webservices/axis2/trunk/c/src/core/context/conf_ctx.c (original) +++ webservices/axis2/trunk/c/src/core/context/conf_ctx.c Wed Nov 19 22:14:10 2008 @@ -571,3 +571,38 @@ return svc_grp_ctx; } +AXIS2_EXTERN axis2_status_t AXIS2_CALL +axis2_conf_ctx_set_property( + axis2_conf_ctx_t *conf_ctx, + const axutil_env_t * env, + const axis2_char_t * key, + axutil_property_t * value) +{ + axis2_status_t status = AXIS2_FAILURE; + AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FAILURE); + AXIS2_PARAM_CHECK(env->error, key, AXIS2_FAILURE); + AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE); + + axutil_thread_mutex_lock(conf_ctx->mutex); + status = axis2_ctx_set_property(conf_ctx->base, env, key, value); + axutil_thread_mutex_unlock(conf_ctx->mutex); + + return status; +} + +AXIS2_EXTERN axutil_property_t *AXIS2_CALL +axis2_conf_ctx_get_property( + const axis2_conf_ctx_t * conf_ctx, + const axutil_env_t * env, + const axis2_char_t * key) +{ + axutil_property_t* property = NULL; + AXIS2_PARAM_CHECK(env->error, conf_ctx, NULL); + AXIS2_PARAM_CHECK(env->error, key, NULL); + + axutil_thread_mutex_lock(conf_ctx->mutex); + property = axis2_ctx_get_property(conf_ctx->base, env, key); + axutil_thread_mutex_unlock(conf_ctx->mutex); + + return property; +}