<br><br><div><span class="gmail_quote">On 7/19/07, <b class="gmail_sendername">Jim McDonald</b> &lt;<a href="mailto:Jim@devzero.net">Jim@devzero.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<a href="mailto:kero@chello.nl">kero@chello.nl</a> wrote:<br>&gt; OK, first time you mentioned Firefox, I thought you meant browser and/or GUI stuff. But you focus on extensions/plugins :)<br>&gt;<br>Sorry yep was thinking of the design philosophy rather than the
<br>specifics.&nbsp;&nbsp;If I look at my own install I have four of five extensions<br>(out of a few thousand) that I use and their cumulative impact is to<br>make Firefox far more useful *to me* than any other browser out there on
<br>the market.<br>&gt; Any place where you can hook in little snippets of code will do. I think I&#39;ll play with a few &quot;modules&quot; I can see interact here (addressbook, agenda, IM client (mostly its away settings); I&#39;ll mock them for starters) and how to aggregate the &quot;decisions&quot; from those &quot;modules&quot; on what to do with an incoming call/SMS/... I will use dbus, but that says nothing about the actual format/info sent over that bus. I&#39;ll be off-line over the weekend, but with some luck, I&#39;ll have a bit of code (
i.e. showing format/info) to show Sun or Mon.<br>&gt;<br>Yep I think I&#39;ll see if I can grab some time over the weekend to put<br>together some words and diagrams explaining what I&#39;m thinking about and<br>how it would fit in to the general &#39;phone framework.
<br><br>Cheers,<br>Jim.</blockquote><div><br>ok, but here&#39;s the thing with having full plugin framework: what if two
plugins take mutually exclusive actions (I.E. one plugin has a
whitelist, it tries to answer the phone because it&#39;s the girlfriend,
but the other plugin attempts to send the call to voicemail because
your gps says you&#39;re in a movie theatre) who should win?&nbsp; I think we
need to take one step beyond independent plugins:<br><br>When the&nbsp; event is fired, it notifies all the plugins that the event has fired.<br>each plugin checks what it thinks should happen, if it&#39;s an event that does not require &quot;taking over&quot; the call, it performs it&#39;s action and exits with a priority 0 (or &lt;0... it&#39;s more &quot;unixy&quot;) if the plugin thinks it should have control of the call, it returns with a positive value.
<br>once all plugins have performed their checks (these should be FAST!!! DO NOT CODE CRAZY ACTIONS HERE!!!) each plugin&#39;s score is weighted (whitelists are modified *2... movie theatre is modified *1.5), weights being user configurable, then whichever plugin has the highest total score gets control of the call... it can then take whatever actions it needs to.
<br><br>There should be a couple of callback functions for those crazy actions that would take too long to run during the check ones I see are:<br>setCallBackAfterCall() -- fires a handler after the call has been finished (
I.E. after you hang up, or after the call is rejected).&nbsp; This is where the &quot;send text message&quot; would be processed, since we want to wait until the network is available again<br>setCallBackAfterProcess() -- fires a handler after someone &quot;wins&quot; the call... this is where you&#39;d put things that aren&#39;t network dependent, and can happen while the call is getting processed (
I.E. while you&#39;re talking to someone)<br><br>I&#39;m kind of at a loss in how to create a really nice gui for this kind of stuff... and events aren&#39;t limited to just incoming calls of course... but yeah, it gives us a really nice way to handle calls
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">_______________________________________________<br>OpenMoko community mailing list
<br><a href="mailto:community@lists.openmoko.org">community@lists.openmoko.org</a><br><a href="http://lists.openmoko.org/mailman/listinfo/community">http://lists.openmoko.org/mailman/listinfo/community</a><br></blockquote>
</div><br><br clear="all"><br>-- <br>Jeff<br>ASU Alumni 07<br>Go Devils!!!<br>O|||||||O