On Mon, Mar 23, 2009 at 05:53:51PM +0800, Ryan Li wrote: > Hello everyone, > > It seems that there's currently no tools for sms parsing, so I hacked > out one within two months. Haven't checked through the code of barry, I > wrote this parser from scratch. The code surely looks ugly and clumsy, > since it's the first time that I wrote something that I think is a bit > useful(don't mention the damn school homework).
Hi Ryan, Welcome to Barry! I just got a chance to look at your code in detail today, and thanks very much. I like to see people using Barry in ways I didn't expect originally. :-) This would ideally be a record parser in the Barry library, and since you've already done the reverse engineering and proof of concept, it's just a matter of doing the porting. I notice that your code is licensed under GPL v3. Barry is licensed under "GPL v2 and any later version". As a library, this makes it compatible with a slightly wider number of application licenses. But it also means that we can't include your code directly into the library without changing our license as well. I could drop your code in the contrib/ directory though. Would you be willing to relicense your code and documentation under GPL v2 and later? If so, I'd like to apply your bb_sms_format.txt file as a documentation patch right away, and we can work together on porting the record parsing code to the Barry library. > Feedback is greatly welcomed and when this program becomes a little more > mature I hope I could have it integrated back into btool. More > information can be found in the readme file. Here's a little feedback from reading the code: - I see you make use of custom bit stream code, and then parse the streams using a series of if statements. The way Barry does parsing like this is to use a set of structs that match the data layout as closely as possible. This is a challenge sometimes, but a series of if statements should translate fairly well into a struct. - you have custom code to convert from UCS2 to UTF8 manually... in Barry, we use the iconv library, and we have a class wrapper to do the work... this conversion is optional and configurable in Barry as well... see the IConverter class - some of the manual memory handling should probably be changed to std::string or Barry's Data class That said, I've run the code, and it works as advertised. :-) Thanks again, - Chris ------------------------------------------------------------------------------ _______________________________________________ Barry-devel mailing list Barry-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/barry-devel