Editing Documentation/Maemo 5 Developer Guide/Using Connectivity Components/Maemo Connectivity

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.

Warning: This page is 62 kilobytes long; some browsers may have problems editing pages approaching or longer than 32kb. Please consider breaking the page into smaller sections.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 980: Line 980:
===== strong_bt_req =====
===== strong_bt_req =====
-
;Parameters
+
:Parameters
-
: <ol><li>string  Bluetooth address of the device to pair with</li><li>boolean  <code>TRUE</code> if strong authentication enabled, <code>FALSE</code> if strong authentication is disabled</li></ol>
+
: <ol><li>string  Bluetooth address of the device to pair with</li><li>boolean  <code>TRUE</code> if strong authentication enabled, <code>FALSE</code> if strong authentication is disabled
;Return Parameters
;Return Parameters
: none
: none
Line 989: Line 989:
: Requests strong (16 digit) BT PIN dialog for a BT device
: Requests strong (16 digit) BT PIN dialog for a BT device
-
===== show_sim_pin_dlg =====
+
<div class="graybox">
-
;Parameters
+
-
: <ol><li>string  Bluetooth address of the device used with SAP</li><li>boolean  <code>TRUE</code> if PIN was incorrect and retry dialog should be displayed before asking PIN. <code>FALSE</code> if this is the first PIN request.</li></ol>
+
Method:           show_sim_pin_dlg
-
;Return Parameters
+
Parameters:        1. string  Bluetooth address of the device used with SAP
-
: none
+
                    2. boolean  TRUE if PIN was incorrect and retry dialog
-
;Errors
+
                                should be displayed before asking PIN. FALSE
-
: <code>com.nokia.icd_ui.error.flight_mode</code>: Flight mode enabled, dialog not shown
+
                                if this is the first PIN request.
-
;Description
+
-
: Shows SIM PIN dialog
+
Return Parameters: none
 +
Errors:           com.nokia.icd_ui.error.flight_mode:
 +
                    Flight mode enabled, dialog not shown
 +
 +
Description:       Shows SIM PIN dialog
-
The code example for the application to show the connect dialog using <code>show_conn_dlg</code> is following. Note the use of the macro.
+
</div>
-
<source lang="c">
 
-
#include <osso-ic-ui-dbus.h>
 
-
/* ... */
 
-
/* in our code somewhere, where we need the Connect Dialog*/
 
-
DBusMessage *uimsg;
 
-
/* construct the message for Connect Dialog request*/
 
-
uimsg =
 
-
  dbus_message_new_method_call(ICD_UI_DBUS_SERVICE,
 
-
                            ICD_UI_DBUS_PATH,
 
-
                          ICD_UI_DBUS_INTERFACE,
 
-
                        /*macro for show_conn_dlg */
 
-
                              ICD_UI_SHOW_CONNDLG_REQ);
 
-
/* send the message */
 
-
reply =
 
-
  dbus_connection_send_with_reply_and_block(connection,
 
-
                                    uimsg,
 
-
                                  reply_timeout,
 
-
                                  &error);
 
-
if (reply == NULL) {
 
-
    DLOG_ERR("Failed to show connect dialog: %s", uierror.message);
 
-
    dbus_error_free(&uierror);
 
-
}
 
-
dbus_message_unref(uimsg);
 
-
dbus_message_unref(reply);
 
-
/* ... */
 
-
</source>
 
-
==== D-Bus signals ====
+
The code example for the application to show the connect dialog using show_conn_dlg is following. Note the use of the macro.
-
The signals emitted from <code>com.nokia.icd_ui</code> interface are listed below.
+
<tt><span>'''<span><font color="#000080"><nowiki>#include</nowiki></font></span>'''</span> <span><font color="#FF0000">&lt;osso-ic-ui-dbus.h&gt;</font></span>
 +
<span>''<span><font color="#9A1900">/* ... */</font></span>''</span>
 +
<span>''<span><font color="#9A1900">/* in our code somewhere, where we need the Connect Dialog*/</font></span>''</span>
 +
DBusMessage <span><font color="#990000"><nowiki>*</nowiki></font></span>uimsg<span><font color="#990000"><nowiki>;</nowiki></font></span>
 +
<span>''<span><font color="#9A1900">/* construct the message for Connect Dialog request*/</font></span>''</span>
 +
uimsg <span><font color="#990000"><nowiki>=</nowiki></font></span>
 +
  <span>'''<span><font color="#000000">dbus_message_new_method_call</font></span>'''</span><span><font color="#990000">(</font></span>ICD_UI_DBUS_SERVICE<span><font color="#990000">,</font></span>
 +
                              ICD_UI_DBUS_PATH<span><font color="#990000">,</font></span>
 +
                            ICD_UI_DBUS_INTERFACE<span><font color="#990000">,</font></span>
 +
                          <span>''<span><font color="#9A1900">/*macro for show_conn_dlg */</font></span>''</span>
 +
                                ICD_UI_SHOW_CONNDLG_REQ<span><font color="#990000">);</font></span>
 +
<span>''<span><font color="#9A1900">/* send the message */</font></span>''</span>
 +
reply <span><font color="#990000"><nowiki>=</nowiki></font></span>
 +
  <span>'''<span><font color="#000000">dbus_connection_send_with_reply_and_block</font></span>'''</span><span><font color="#990000">(</font></span>connection<span><font color="#990000">,</font></span>
 +
                                    uimsg<span><font color="#990000">,</font></span>
 +
                                    reply_timeout<span><font color="#990000">,</font></span>
 +
                                    <span><font color="#990000">&amp;</font></span>error<span><font color="#990000">);</font></span>
 +
<span>'''<span><font color="#0000FF">if</font></span>'''</span> <span><font color="#990000">(</font></span>reply <span><font color="#990000"><nowiki>==</nowiki></font></span> NULL<span><font color="#990000">)</font></span> <span><font color="#FF0000">{</font></span>
 +
    <span>'''<span><font color="#000000">DLOG_ERR</font></span>'''</span><span><font color="#990000">(</font></span><span><font color="#FF0000">"Failed to show connect dialog: %s"</font></span><span><font color="#990000">,</font></span> uierror<span><font color="#990000">.</font></span>message<span><font color="#990000">);</font></span>
 +
    <span>'''<span><font color="#000000">dbus_error_free</font></span>'''</span><span><font color="#990000">(&amp;</font></span>uierror<span><font color="#990000">);</font></span>
 +
<span><font color="#FF0000">}</font></span>
 +
<span>'''<span><font color="#000000">dbus_message_unref</font></span>'''</span><span><font color="#990000">(</font></span>uimsg<span><font color="#990000">);</font></span>
 +
<span>'''<span><font color="#000000">dbus_message_unref</font></span>'''</span><span><font color="#990000">(</font></span>reply<span><font color="#990000">);</font></span>
 +
<span>''<span><font color="#9A1900">/* ... */</font></span>''</span></tt>
-
===== disconnect =====
+
The signals emitted from com.nokia.icd_ui interface are listed below.
-
;Parameters
 
-
: <ol><li>boolean  <code>TRUE</code> if "disconnect" pressed, <code>FALSE</code> if "cancel"</li></ol>
 
-
;Description
 
-
: Signal emitted from UI when disconnect dialog has been closed.
 
 +
<div class="graybox">
-
===== retry =====
+
 +
Signal:        disconnect
 +
Parameters:    1. boolean  TRUE if "disconnect" pressed, FALSE if "cancel"
 +
 +
Description:  Signal emitted from UI when disconnect dialog has been closed.
-
;Parameters
+
</div>
-
: <ol><li>string  The IAP that is to be retried</li><li>boolean  <code>TRUE</code> if "retry" pressed, <code>FALSE</code> if "cancel"</li></ol>
+
-
;Description
+
-
: Signal emitted from UI when the retry dialog has been closed.
+
-
===== change =====
 
-
;Parameters
+
<div class="graybox">
-
: <ol><li>string  Old IAP to change from</li><li>string  New IAP to change to</li><li>boolean  Change to the new IAP If <code>TRUE</code>, keep old if <code>FALSE</code></li></ol>
+
-
;Description
+
-
: Signal emitted from UI when change connection dialog has been closed.
+
-
===== passwd =====
+
 +
Signal:        retry
 +
Parameters:    1. string  The IAP that is to be retried
 +
                2. boolean  TRUE if "retry" pressed, FALSE if "cancel"
 +
 +
Description:  Signal emitted from UI when the retry dialog has been closed.
-
;Parameters
+
</div>
-
: <ol><li>string  Username supplied or modified by the user</li><li>string  Password supplied or modified by the user</li><li>string  IAP name</li><li>boolean  <code>TRUE</code> if "ok" pressed, <code>FALSE</code> if "cancel"</li></ol>
+
-
;Description
+
-
: Signal emitted from UI when the username/password dialog has been closed
+
 +
<br /><br />
-
===== gtc_response =====
+
<div class="graybox">
-
;Parameters
+
-
: <ol><li>string  Response to the given challenge or empty string if cancelled</li><li>boolean  <code>TRUE</code> if "ok" pressed, <code>FALSE</code> if "cancel"</li></ol>
+
Signal:        change
-
;Description
+
Parameters:   1. string  Old IAP to change from
-
: Signal emitted from UI when the EAP GTC challenge dialog has been closed.
+
                2. string New IAP to change to
 +
                3. boolean  Change to the new IAP If TRUE, keep old if FALSE
 +
 +
Description:   Signal emitted from UI when change connection dialog has
 +
                been closed.
-
===== mschap_change =====
+
</div>
-
;Parameters
 
-
: <ol><li>string  Supplied username</li><li>string  The new password or empty string if cancelled</li><li>string  IAP name</li><li>boolean  <code>TRUE</code> if "ok" pressed, <code>FALSE</code> if "cancel"</li></ol>
 
-
;Description
 
-
: Signal emitted from UI when the MSCHAPv2 password has been changed
 
-
===== private_key_passwd =====
+
<div class="graybox">
-
;Parameters
+
-
: <ol><li>byte array Certificate ID</li><li>string  Password for the private key or empty string if none</li><li>boolean  <code>TRUE</code> if "ok" pressed, <code>FALSE</code> if "cancel"</li>
+
Signal:       passwd
-
;Description
+
  Parameters:    1. string  Username supplied or modified by the user
-
: Signal emitted from UI when the private key password dialog has been closed
+
                2. string  Password supplied or modified by the user
 +
                3. string IAP name
 +
                4. boolean  TRUE if "ok" pressed, FALSE if "cancel"
 +
 +
Description:   Signal emitted from UI when the username/password dialog has
 +
                been closed
-
===== server_cert =====
+
</div>
-
;Parameters
 
-
: <ol><li>boolean  <code>TRUE</code> if strong PIN entered, <code>FALSE</code> if strong PIN dialog was canceled</li></ol>
 
-
;Description
 
-
: Signal emitted from UI when the server certificate error dialog has been closed
 
-
===== strong_bt =====
+
<div class="graybox">
-
;Parameters
+
-
: <ol><li>boolean  <code>TRUE</code> if strong PIN entered, <code>FALSE</code> if strong PIN dialog was cancelled</li></ol>
+
Signal:       gtc_response
-
;Description
+
Parameters:    1. string  Response to the given challenge or empty string
-
: Signal emitted from UI when the strong (16 digit) BT PIN has been entered
+
                            if cancelled
 +
                2. boolean  TRUE if "ok" pressed, FALSE if "cancel"
 +
 +
Description:   Signal emitted from UI when the EAP GTC challenge dialog has
 +
                been closed.
-
===== sim_pin =====
+
</div>
-
;Parameters
+
 
-
: <ol><li>string  SIM PIN code or empty string if  cancelled</li><li>boolean  <code>TRUE</code> if "ok" pressed, <code>FALSE</code> if "cancel"</li></ol>
+
<div class="graybox">
-
;Description
+
 
-
: Signal emitted from UI when the SIM PIN has been entered.
+
 +
Signal:        mschap_change
 +
Parameters:    1. string  Supplied username
 +
                2. string  The new password or empty string if cancelled
 +
                3. string  IAP name
 +
                4. boolean  TRUE if "ok" pressed, FALSE if "cancel"
 +
 +
Description:   Signal emitted from UI when the MSCHAPv2 password has been
 +
                changed
 +
 
 +
</div>
 +
 
 +
 
 +
<div class="graybox">
 +
 
 +
 +
Signal:        private_key_passwd
 +
Parameters:    1. byte array  Certificate ID
 +
                2. string  Password for the private key or empty string if none
 +
                3. boolean TRUE if "ok" pressed, FALSE if "cancel"
 +
 +
Description:  Signal emitted from UI when the private key password dialog
 +
                has been closed
 +
 
 +
</div>
 +
 
 +
 
 +
<div class="graybox">
 +
 
 +
 +
Signal:        server_cert
 +
Parameters:    1. boolean  TRUE if strong PIN entered, FALSE if strong
 +
                            PIN dialog was canceled
 +
 +
Description:  Signal emitted from UI when the server certificate error
 +
                dialog has been closed
 +
 
 +
</div>
 +
 
 +
<br /><br />
 +
 
 +
<div class="graybox">
 +
 
 +
 +
Signal:        strong_bt
 +
Parameters:    1. boolean  TRUE if strong PIN entered, FALSE if strong
 +
                            PIN dialog was cancelled
 +
 +
Description:  Signal emitted from UI when the strong (16 digit) BT PIN
 +
                has been entered
 +
 
 +
</div>
 +
 
 +
 
 +
<div class="graybox">
 +
 
 +
 +
Signal:        sim_pin
 +
Parameters:    1. string  SIM PIN code or empty string if  cancelled
 +
                2. boolean  TRUE if "ok" pressed, FALSE if "cancel"
 +
 +
Description:   Signal emitted from UI when the SIM PIN has been entered.
 +
 
 +
</div>
===Bluetooth D-Bus UI dialogs ===
===Bluetooth D-Bus UI dialogs ===

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)