cvs: /php3/functions php3_mcal.c php3_mcal.h

From: Date: Wed, 08 Sep 1999 17:53:05 +0000
Subject: cvs: /php3/functions php3_mcal.c php3_mcal.h
Groups: php.dev 
Request: Send a blank email to php-dev+get-10731@lists.php.net to get a copy of this message
musone Wed Sep 8 13:53:05 1999 EDT Modified files: /php3/functions php3_mcal.c php3_mcal.h Log: add a way to extract the internal event structure in a stream Index: php3/functions/php3_mcal.c diff -u php3/functions/php3_mcal.c:1.20 php3/functions/php3_mcal.c:1.21 --- php3/functions/php3_mcal.c:1.20 Wed Sep 8 12:00:16 1999 +++ php3/functions/php3_mcal.c Wed Sep 8 13:53:04 1999 @@ -116,6 +116,7 @@ PHP_FE(mcal_event_set_recur_monthly_mday,NULL) PHP_FE(mcal_event_set_recur_monthly_wday,NULL) PHP_FE(mcal_event_set_recur_yearly,NULL) +PHP_FE(mcal_fetch_current_stream_event,NULL) {NULL, NULL, NULL} }; @@ -385,6 +386,32 @@ } /* }}} */ + +/* {{{ proto object mcal_fetch_current_stream_event(int stream_id) + Fetch the current event stored in the stream's event structure*/ +void php3_mcal_fetch_current_stream_event(INTERNAL_FUNCTION_PARAMETERS) +{ + pval *streamind; + int ind, ind_type; + pils *mcal_le_struct=NULL; + CALEVENT *myevent; + int myargcount=ARG_COUNT(ht); + + if (myargcount != 1 || getParameters(ht, myargcount, &streamind) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_long(streamind); + ind = streamind->value.lval; + mcal_le_struct = (pils *)php3_list_find(ind, &ind_type); + if (!mcal_le_struct ) { + php3_error(E_WARNING, "Unable to find stream pointer"); + RETURN_FALSE; + } + make_event_object(return_value,mcal_le_struct->event); + +} +/* }}} */ + void make_event_object(pval *mypvalue,CALEVENT *event) Index: php3/functions/php3_mcal.h diff -u php3/functions/php3_mcal.h:1.8 php3/functions/php3_mcal.h:1.9 --- php3/functions/php3_mcal.h:1.8 Wed Sep 8 11:42:42 1999 +++ php3/functions/php3_mcal.h Wed Sep 8 13:53:04 1999 @@ -1,4 +1,4 @@ -/* $Id: php3_mcal.h,v 1.8 1999/09/08 15:42:42 musone Exp $ */ +/* $Id: php3_mcal.h,v 1.9 1999/09/08 17:53:04 musone Exp $ */ #ifndef _INCLUDED_MCAL_H #define _INCLUDED_MCAL_H @@ -65,7 +65,7 @@ void php3_mcal_event_set_recur_monthly_mday(INTERNAL_FUNCTION_PARAMETERS); void php3_mcal_event_set_recur_monthly_wday(INTERNAL_FUNCTION_PARAMETERS); void php3_mcal_event_set_recur_yearly(INTERNAL_FUNCTION_PARAMETERS); - +void php3_mcal_fetch_current_stream_event(INTERNAL_FUNCTION_PARAMETERS); #else

« previous php.dev (#10731) next »