[maemo-developers] Function to check presents of WiFi connection

From: Michael Stepanov michael at stepanoff.org
Date: Sun Nov 11 13:53:05 EET 2007
Maybe you have some example of that functionality?

On 11/7/07, Jussi Kukkonen <jhkukkon at cc.hut.fi> wrote:
>
> Michael Stepanov wrote:
> > Hi,
> >
> > I'm not Maemo guru. So, that's why my question may sound stupid a bit. I
> > need to check WiFi connection before run my application. Is there some
> > function in the Maemo SDk to do that or it's better to use command line
> WiFi
> > utility?
>
> I assume you just want to know if there is an internet connection (not
> necessarily wifi)?  If you are using C, libconic is the place you should
> be looking in:
>
> http://maemo.org/development/documentation/how-tos/3-x/howto_connectivity_guide_bora.html#LibConIC
> http://maemo.org/api_refs/3.0/connectivity/libconic/index.html
>
>
> If I remember correctly it goes like this (not exactly a one-liner):
>
> * create object with con_ic_connection_new()
> * connect to the connection event signal
> * run con_ic_connection_connect() with parameter
>    CON_IC_CONNECT_FLAG_AUTOMATICALLY_TRIGGERED
> * your signal handler will get a en event that
>    has connection status.
>
> If you want to constantly monitor changes instead of just checking once,
> set automatic-connection-events to true. IIRC one of the event objects
> also lets you check if the connection is a WLAN if you really are
> interested in that.
>
> HTH,
> -Jussi
>
> --
> Jussi Kukkonen
> http://koti.welho.com/jkukkone/
>



-- 
Cheers,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20071111/87e29f4c/attachment.htm 
More information about the maemo-developers mailing list