Hi Samisa, Sorry for not describing those functions. Ideally when a user will provide a callback function and a callback_ctx in which the necessary information is kept in between caching. For example when we are writing to a file we open the file only once and keep on appending when we call the callback function. So the file handler should be kept inside this callback_ctx. Since the current implementation is yet to provide this callback functionality, for the time being I have put the caching function inside mime_parser. So if any one is interested now he can keep those function headers and just replace the implementation with his caching logic. I also changed the caching function name to axis2_caching_callback . Following is a description of what each function do.
init_handler - This will create a caching source and return a void* to that. axis2_caching_callback - This will do the caching using the created source above. close_handler - This will close the caching source. In the current implementation I have wrapped fopen, fwrite and fclose with the above 3 functions. Thanks, -Manjula. On Tue, 2008-05-13 at 03:05 +0600, Samisa Abeysinghe wrote: > Manjula Peiris wrote: > > Hi all, > > > > I have created a branch [1] and committed the mtom caching stuff. when > > you run the simple axis2 server with the mtom sample you will see a temp > > file created. That is the cached file created from the mime_parser. For > > the time being I have added 3 functions in the > > axiom/src/attachments/mime_parser.c to do the caching. They are , > > > > void *init_handler() > > axis2_status_t close_handler(void *handler) > > static axis2_status_t axiom_mime_parser_cache( > > const axutil_env_t *env, > > axis2_char_t *buf, > > int buf_len, > > void *handler) > > > > What does each of these functions do? What does init handler and close > handler do? Why can't I just use the callback? I home > axiom_mime_parser_cache is the callback. Why not change the name to > axiom_mime_fluch_callback, because that is what the callback does. > > Thanks, > Samisa.... > > These will be replaced with user provided callbacks in the future. There > > are some bugs need to be fixed in the implementation. I will merge it to > > the trunk as soon as it becomes stable. > > > > [1]https://svn.apache.org/repos/asf/webservices/axis2/branches/c/post_1_4_mtom/c > > > > Thanks, > > -Manjula. > > > > > > > > On Sat, 2008-05-10 at 06:35 +0530, Kaushalye Kapuruge wrote: > > > >> Manjula Peiris wrote: > >> > >>> Hi devs, > >>> > >>> I have implemented a caching technique [1] for MTOM. I had to completely > >>> rewrite the current mime_parser logic. The implementation also has a new > >>> searching technique which efficiently uses memory. There are some bugs > >>> need to be fixed in the new implementation and it also need to be > >>> tested. Some API additions may need to be done in order to put this > >>> implementation to the current Axis2/C trunk. I will discuss those in > >>> this list. Since we now have a stable MTOM implementation I propose we > >>> will put these new stuff in a scratch area > >>> > >> +1 > >> -Kau > >> > >>> and continue with the further > >>> development. > >>> > >>> Thoughts please ? > >>> > >>> > >>> [1] https://issues.apache.org/jira/browse/AXIS2C-672 > >>> > >>> Thanks, > >>> -Manjula. > >>> > >>> > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >>> > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > ------------------------------------------------------------------------ > > > > > > No virus found in this incoming message. > > Checked by AVG. > > Version: 8.0.100 / Virus Database: 269.23.14/1425 - Release Date: 5/9/2008 > > 12:38 PM > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
