| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface VoipSettings
Represents an interface to VoIP Settings
Applications cannot instantiate VoIP Settings directly.
 Instead, VoipManager is used to obtain VoIP Settings
 instance.
After obtaining a reference to a VoIP Settings using
 VoipManager, applications can use method
 writeVoipSettings to write its own settings to device
 and method deleteVoipSettings to delete its own
 settings from device
Method setVoipSettingsStateListener should be used to get
 state change updates of VoIP Settings.
An example:
import com.nokia.mid.voip.VoipManager; import com.nokia.mid.voip.VoipSettings; import com.nokia.mid.voip.VoipSettingsStateListener; import com.nokia.mid.voip.VoipStates; import com.nokia.mid.voip.VoipCauses; ... public void writeSettings( String xml_doc ){ VoipSettings mySettings = VoipManager.createVoipSettingsInstance(); // Create listener for settings VoipSettingsStateListener settingsListener = new VoipSettingsStateListener(){ public void voipSettingsUpdated( int state, int cause ) { switch(state) { case VoipStates.SETTINGS_ERROR: // Writing the settings failed settingsError( cause ); break; case VoipStates.SETTINGS_ONLINE: // Settings are online. Now we can create and receive calls! settingsOnline(); break; case VoipStates.SETTINGS_OFFLINE: // Settings are offline settingsOffline( cause ); break; } } }; // Set settings state listener mySettings.setVoipSettingsStateListener( settingsListener ); // Write our service provisioning settings to phone mySettings.writeVoipSettings( xml_doc );
| Method Summary | |
|---|---|
|  void | deleteVoipSettings()Deletes VoIP settings from the device. | 
|  void | setVoipSettingsStateListener(VoipSettingsStateListener settingsListener)Associates VoipSettingsStateListenerwith the VoipSettings. | 
|  boolean | writeVoipSettings(java.lang.String voip_xml)Writes VoIP settings to the device. | 
| Method Detail | 
|---|
boolean writeVoipSettings(java.lang.String voip_xml)
Writes VoIP settings to the device.
In order to detect success of the writing and subsequently state changes of
 settings states, the state listener should be set first via setVoipSettingsStateListener.
If writeVoipSettings method returns false, there are already settings written for
 this midlet. If new settings are needed to write, the midlet must delete earlier settings first.
The final success of writing settings is indicated via state listener.
voip_xml - voip settings to be written in XML format
void deleteVoipSettings()
Deletes VoIP settings from the device.
Application can delete only its own settings.
void setVoipSettingsStateListener(VoipSettingsStateListener settingsListener)
VoipSettingsStateListener with the VoipSettings.
 The listener should be activated to listen needed states of the
 VoIP settings. Setting a listener replaces any existing listener (i.e. only
 one listener can be registered to each VoipSettings instance). To remove
 the currently active listener, a null parameter must be given.
settingsListener - an instance of VoipSettingsStateListener, or null to remove the
            currently-active listener.| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||