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; import; import; import; import; ... 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


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
true if writing is successful, false if MIDlet already has settings written


void deleteVoipSettings()

Deletes VoIP settings from the device.

Application can delete only its own settings.


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.

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.

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.

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.