Hi,<br><br>I would also be interested in an android port, and looking through spice-gtk, it does seems much simpler than spicec.<br><br>Best Regards,<br><br>Attila<br><br><div class="gmail_quote">On Fri, Mar 4, 2011 at 9:36 AM, Alon Levy <span dir="ltr">&lt;<a href="mailto:alevy@redhat.com">alevy@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Fri, Mar 04, 2011 at 03:38:51PM +0800, Shuxiang Lim wrote:<br>
&gt; Hi all,<br>
&gt;    I&#39;m trying these days to port spicec into Android.But it&#39;s a rather TOUGH<br>
&gt; way to go because the structure of spicec and android are desperately<br>
&gt; inappropriate:the linux version of spicec is based on the X11,which is not<br>
&gt; available in Android,thus the UI of spicec should be rewritten from<br>
&gt; scratch...More troublesome is that the UI part and data part in current<br>
<br>
</div>Haven&#39;t looked at your proposal below yet, but did you check the spice-gtk<br>
work? maybe it is easier to start from that? are gtk libraries available on<br>
android? not talking about X. spice-gtk has objects for connection and channels<br>
that afaik don&#39;t do any output, that&#39;s separate from the actual widget that<br>
uses X. Also, gtk 3 has backends - did anyone do a backend for android?<br>
<br>
Since going forward we plan to ditch the spicec client, that would be really<br>
preffered. Now that I see what you have planned it sounds good, but better<br>
to use spice-gtk.<br>
<br>
of course that&#39;s not to say we won&#39;t love to see this working anyway :)<br>
<div><div></div><div class="h5"><br>
&gt; spicec is entangled in the hierarchical system in C++! So my plan is this:<br>
&gt; first split the spicec into two parts,data and UI,transform the data part<br>
&gt; into libspicec.so;then rewrite the UI part in JAVA. Besides, I should also<br>
&gt; tinker some problems caused by the Crippled NDK C++ support and the Lamed<br>
&gt; bionic c lib in android .<br>
&gt;    And now the first step is roughly done,hence the change of the spicec<br>
&gt; structure:<br>
&gt;    From<br>
&gt;                                                             |--&gt;playback<br>
&gt; thread<br>
&gt;                                                             |--&gt;cursor<br>
&gt; thread<br>
&gt; spicec:spicec process(application process)--&gt;main thread-&gt;|--&gt;*record thread<br>
&gt; *<br>
&gt;                                                             |--&gt;inputs<br>
&gt; thread<br>
&gt;                                                             |--&gt;display<br>
&gt; thread<br>
&gt; To:<br>
&gt; ===========================&gt;<br>
&gt;                          |--&gt;libspicec.so:application thread--&gt;main<br>
&gt; thread------&gt;|<br>
&gt;                          |<br>
&gt; |<br>
&gt;                          |              |&lt;--display thread&lt;--|<br>
&gt;      |<br>
&gt;                          |         |---&gt;|&lt;--cursor<br>
&gt; thread&lt;---|&lt;------------------|<br>
&gt;                          |         |    |&lt;--inputs thread&lt;---|<br>
&gt; spicec:spicec process---&gt;|         |    |&lt;--playback thread&lt;-|<br>
&gt;                          |         |<br>
&gt;                          |         |<br>
&gt;                          |         |<br>
&gt; &lt;---------------------------------------------|<br>
&gt;                          |<br>
&gt;       |<br>
&gt;                          |<br>
&gt;       |<br>
&gt;                          |--&gt;spicec:platform<br>
&gt; thread------------------------------&gt;|<br>
&gt;<br>
&gt; The hierarchical relationship has been unleashed with one thread(record<br>
&gt; channel) deleted and two new threads (app and platform)  created. The first<br>
&gt; as the &quot;data thread&quot;,the other as the &quot;work thread&quot; which is driven by the<br>
&gt; signals from the first thread as well as its sub threads and requested to do<br>
&gt; the UI-related work:<br>
&gt;<br>
&gt; platform thread:------------&gt;blocked and waiting:--&gt;job<br>
&gt; request-&lt;--------------|<br>
&gt;                                           |           |<br>
&gt;                         |<br>
&gt;                                           ^           |<br>
&gt;                         |<br>
&gt;                                           |<br>
&gt; |                         |<br>
&gt;                                           |&lt;----------|-&lt;-|<br>
&gt;                     |<br>
&gt;                                                       |   |<br>
&gt;                 |<br>
&gt;         platform thread over&lt;----------if(job==die)&lt;--| send req. blocked<br>
&gt; and waiting<br>
&gt;                                               |           ^ |<br>
&gt;     |<br>
&gt;                                               |           | |<br>
&gt;        ^<br>
&gt;                                               |           | |<br>
&gt; _________|_________<br>
&gt;                                               |           | |<br>
&gt; | app/plbk/cusor<br>
&gt; thd<br>
&gt;              |&lt;---job done----dojob()&lt;--else--|           | |-&gt;go on-&gt;|<br>
&gt; __________________<br>
&gt;              |                                            |<br>
&gt;              |-------------------------------&gt;feed back--&gt;|<br>
&gt;<br>
&gt;<br>
&gt; So the next work is to expose the native JNI interface in platform thread to<br>
&gt; the UI written in Android SDK. I try to use the UI<br>
&gt; frame of AndroidVNCViewer in<br>
&gt; <a href="http://code.google.com/p/*android*-*vnc*-viewer/,then" target="_blank">code.google.com/p/*android*-*vnc*-viewer/,then</a> the work of platform<br>
&gt; thread will be replaced by UI but the msg<br>
&gt; communication to libspicec will be remained. That&#39;s the easiest way I can<br>
&gt; envisage except rewriting all parts in spicec from scratch.<br>
&gt; It&#39;s tough too, for I have poor experiance in Java...<br>
&gt;    Anyway, is there any other guy working on this? Is my way feasible??Any<br>
&gt; Ideas or help is appreciated.<br>
<br>
</div></div>See above for ideas, don&#39;t read them as a criticism, I think this is fantastic<br>
what you&#39;ve done so far. I remember someone posting &quot;we are working on andriod<br>
in our spare time&quot; post to spice-devel, please grep the archive.<br>
<br>
Alon<br>
<br>
&gt;    Best regards.<br>
<br>
&gt; _______________________________________________<br>
&gt; Spice-devel mailing list<br>
&gt; <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
&gt; <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
<br>
_______________________________________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
</blockquote></div><br>