Wrapping up IWEB_GetResponse in a class | developer.brewmp.com Wrapping up IWEB_GetResponse in a class | developer.brewmp.com

Developer

Wrapping up IWEB_GetResponse in a class

Forums:

Hi Guys,

I am fairly new to BREW development, but have developed and appthat uses IWEB_GetResponse. What I would ideally like to do, is wrap it up in a class, so that the app can call into the class from various points. I got it all going for GetReqests, but I had trouble with post requests, because of the number of Parameters that I need to use.

My question is. Is there any way to process a variable argument list parameter from out code?

i.e the ... parameter. is there a

va_list
va_start
etc.

equivalent in BREW?

If not I think I will have to have two methods in the class. one for get requests and one for post requests.

Any help would be greatly appreciated.

ohh also I have read that you need to override new and delete when using c++ in BREW, can anyone help with this too?

Thanks

Adrian

BREW does not provide an alternate implementation of va_list, va_start, etc., but you can use your compiler's version as normal. You may want to consider using IWEB_GetResponseV instead, since this avoids the use of varargs altogether.
You can search the forum for threads on overriding new and delete. Here's an example: http://brewforums.qualcomm.com/showthread.php?t=1502

BREW does not provide an alternate implementation of va_list, va_start, etc., but you can use your compiler's version as normal. You may want to consider using IWEB_GetResponseV instead, since this avoids the use of varargs altogether.
You can search the forum for threads on overriding new and delete. Here's an example: http://brewforums.qualcomm.com/showthread.php?t=1502

Hi Cirion
Thanks for the reply I will look into using IWEB_GetResponseV
trying to use the compilers version of va_list, va_start scares me.
Using a command line compiler is scary enough!
Do you know of any good resources for newbies on that score?
Adrian

Hi Cirion
Thanks for the reply I will look into using IWEB_GetResponseV
trying to use the compilers version of va_list, va_start scares me.
Using a command line compiler is scary enough!
Do you know of any good resources for newbies on that score?
Adrian

You can safely use va_list, va_arg in BREW, works perfectly fine in both ADS 1.2, RVDS3.1 compilers, works even in device.

You can safely use va_list, va_arg in BREW, works perfectly fine in both ADS 1.2, RVDS3.1 compilers, works even in device.