com.nokia.mid.voip
Interface VoipSettings


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 VoipSettingsStateListener with the VoipSettings.
 boolean writeVoipSettings(java.lang.String voip_xml)
          Writes VoIP settings to the device.
 

Method Detail

writeVoipSettings

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.

Parameters:
voip_xml - voip settings to be written in XML format
Returns:
true if writing is successful, false if MIDlet already has settings written

deleteVoipSettings

void deleteVoipSettings()

Deletes VoIP settings from the device.

Application can delete only its own settings.


setVoipSettingsStateListener

void setVoipSettingsStateListener(VoipSettingsStateListener settingsListener)
Associates 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.

Parameters:
settingsListener - an instance of VoipSettingsStateListener, or null to remove the currently-active listener.


Copyright © 2013 Nokia Corporation. All rights reserved.

Nokia is registered trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Oracle Corporation. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. This document is confidential information of Nokia Corporation.

Disclaimer
The information in this document is provided "as is," with no warranties whatsoever, including any warranty of merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specification, or sample. Furthermore, information provided in this document is preliminary, and may be changed substantially prior to final release.

Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to this document and implementation of any information presented in this document.

Nokia Corporation retains the right to make changes to this document at any time, without notice.

License
Subject to above disclaimer, a license is hereby granted to use this documentation solely under existing Limited License Agreement and non-disclosure agreement between the companies for the agreed application development for S40 Nokia phones. No other licenses e.g. to any intellectual property rights are granted herein. Any use of the screen shots of this documentation, including any icons thereof, is subject to Nokia's prior written approval.