Dec/080
0.3 Release More Updates
I have updated my patch for my 0.3 release after Brad’s suggestions. My patch can be found here. The major difference was adding a proper channel for the Tel Protocol Handler. Previously I was just returning early with NS_OK. After Brad’s suggestion I have returned a channel. The tricky part was since my tel: link required my module to be called I could not call the channel like the other protocols:
let channel = ios.newChannel("tel:"+phoneNumber, null, null);
return channel;
This would result in my code creating an infinite loop. So after talking to Mark Finkle about it I implemented a BogusChannel, like the one Chatzilla uses to handle irc:// links. The code can be found here. I adapted that code to return a bogus channel. When this channel is returned the cpp code calls asyncOpen which then loads my module code.
I found this addition to be interesting, since it involved more thinking on my part. I think the patch is much better after Brad’s suggestions, code review for the win!
Dec/080
0.3 Release Patch Updated
After mfinkle’s drive by comments, I have updated my bug to include a revised patch. I was able to make use of the preprocessor instructions in the JS file after his suggestions of making the following changes to the makefile:
Remove this:
EXTRA_COMPONENTS = nsTelProtocolHandler.js
Add this:
EXTRA_PP_COMPONENTS = nsTelProtocolHandler.js ifdef WINCE DEFINES += -DWINCE=$(WINCE) endif
This allows the JavaScript file to preprocessed by the build system, also I added the DEFINES because WINCE was not defined in the JS.
Looking forward to more comments from mfinkle and blassey to do whatever is needed so this thing can land.
Dec/080
0.3 Release: tel link support in Fennec for Windows Mobile
After a lot of late nights and hacking about I finally got my 0.3 in order. It feels really good to have it working and I really need to thank mfinkle, blassey, wolfe and dougt, they were always there to answer my questions and point out my rookie mistakes. Here are some screenshots of it in action:

Clicking a tel: link in Fennec

Making a phone call after clicking tel: link
I definitely feel a greater level of familiarity with : hg, the build system, the emulator, debugging in VS. I think this was a good starting off point for my entry into the mobile community. The bug was small in terms of implementation, but also allowed me to learn a lot about creating and editing code in the mobile tree. During the last week I haven’t posted anything on my progress because my breakthroughs always seemed to come at the early hours of the morning and I didn’t have the energy to blog about, however I will report on it now (since my last 0.3 blog post):
My first problem was my XPCOM component was not loading. Eventually I discovered that adding the new phone directory to the components directory’s makefile allowed my component to be successfully load and registered.
Once my component was loaded I had major problems trying to load the phone.dll (from Windows Mobile SDK) so I could call PhoneMakeCall. After much bashing my head against the wall I asked the question could the phone.dll (which was my XPCOM component name) collide with phone.dll in the Windows SDK, the answer was YES! The reason blassey suggested was that the minimo code that I was porting was statically linked as such the name collision was never a problem, however Fennec is dynamically linked so therein was the problem. So I renamed my component mozphone and all was right in the world! After solving this problem I was elated, from there I had very few difficulties (extremely slow mobile emulator aside).
My patch is up on the bug and I think it is what mfinkle was expecting. However I am returning a null channel in the nsTelProtocolHandler.js as per mfinkle’s suggestion, but he was unsure if this could cause a problem. Also I wished to use #ifdef WINCE around my block in nsTelProtocolHandler but I was getting errors with that bit, even though mfinkle said it should be enabled by the build system for JavaScript. I will wait on my review to see how these issues are received and make any changes necessary.
I’m looking forward to next semester and tackling something a little more involved, GPS or Camera projects await!