Loading voip/java/android/net/sip/ISipSession.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ import android.net.sip.ISipSessionListener; import android.net.sip.SipProfile; /** * A SIP session that is associated with a SIP dialog or a transaction * (e.g., registration) not within a dialog. * A SIP session that is associated with a SIP dialog or a transaction that is * not within a dialog. * @hide */ interface ISipSession { Loading voip/java/android/net/sip/SipAudioCall.java +6 −6 Original line number Diff line number Diff line Loading @@ -96,8 +96,8 @@ public interface SipAudioCall { } /** * The adapter class for {@link SipAudioCall#Listener}. The default * implementation of all callback methods is no-op. * The adapter class for {@link Listener}. The default implementation of * all callback methods is no-op. */ public class Adapter implements Listener { protected void onChanged(SipAudioCall call) { Loading Loading @@ -134,7 +134,7 @@ public interface SipAudioCall { /** * Sets the listener to listen to the audio call events. The method calls * {@link #setListener(Listener, false)}. * {@code setListener(listener, false)}. * * @param listener to listen to the audio call events of this object * @see #setListener(Listener, boolean) Loading Loading @@ -178,8 +178,8 @@ public interface SipAudioCall { void endCall() throws SipException; /** * Puts a call on hold. When succeeds, * {@link #Listener#onCallHeld(SipAudioCall)} is called. * Puts a call on hold. When succeeds, {@link Listener#onCallHeld} is * called. */ void holdCall() throws SipException; Loading @@ -188,7 +188,7 @@ public interface SipAudioCall { /** * Continues a call that's on hold. When succeeds, * {@link #Listener#onCallEstablished(SipAudioCall)} is called. * {@link Listener#onCallEstablished} is called. */ void continueCall() throws SipException; Loading voip/java/android/net/sip/SipErrorCode.java +4 −4 Original line number Diff line number Diff line Loading @@ -18,10 +18,10 @@ package android.net.sip; /** * Defines error code returned in * {@link SipRegistrationListener#onRegistrationFailed(String, String, String)}, * {@link ISipSessionListener#onError(ISipSession, String, String)}, * {@link ISipSessionListener#onCallChangeFailed(ISipSession, String, String)} and * {@link ISipSessionListener#onRegistrationFailed(ISipSession, String, String)}. * {@link SipRegistrationListener#onRegistrationFailed}, * {@link ISipSessionListener#onError}, * {@link ISipSessionListener#onCallChangeFailed} and * {@link ISipSessionListener#onRegistrationFailed}. * @hide */ public enum SipErrorCode { Loading voip/java/android/net/sip/SipException.java +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.net.sip; /** * General SIP-related exception class. * @hide */ public class SipException extends Exception { Loading voip/java/android/net/sip/SipManager.java +19 −27 Original line number Diff line number Diff line Loading @@ -28,25 +28,22 @@ import java.text.ParseException; /** * The class provides API for various SIP related tasks. Specifically, the API * allows the application to: * allows an application to: * <ul> * <li>register a {@link SipProfile} to have the background SIP service listen * to incoming calls and broadcast them with registered command string. See * {@link #open(SipProfile, String, SipRegistrationListener)}, * {@link #open(SipProfile)}, {@link #close(String)}, * {@link #isOpened(String)} and {@link isRegistered(String)}. It also * facilitates handling of the incoming call broadcast intent. See * {@link #isIncomingCallIntent(Intent)}, {@link #getCallId(Intent)}, * {@link #getOfferSessionDescription(Intent)} and * {@link #takeAudioCall(Context, Intent, SipAudioCall.Listener)}.</li> * {@link #open(SipProfile)}, {@link #close}, {@link #isOpened} and * {@link #isRegistered}. It also facilitates handling of the incoming call * broadcast intent. See * {@link #isIncomingCallIntent}, {@link #getCallId}, * {@link #getOfferSessionDescription} and {@link #takeAudioCall}.</li> * <li>make/take SIP-based audio calls. See * {@link #makeAudioCall(Context, SipProfile, SipProfile, SipAudioCall.Listener)} * and {@link #takeAudioCall(Context, Intent, SipAudioCall.Listener}.</li> * {@link #makeAudioCall} and {@link #takeAudioCall}.</li> * <li>register/unregister with a SIP service provider. See * {@link #register(SipProfile, int, ISipSessionListener)} and * {@link #unregister(SipProfile, ISipSessionListener)}.</li> * {@link #register} and {@link #unregister}.</li> * <li>process SIP events directly with a {@link ISipSession} created by * {@link createSipSession(SipProfile, ISipSessionListener)}.</li> * {@link #createSipSession}.</li> * </ul> * @hide */ Loading Loading @@ -113,8 +110,7 @@ public class SipManager { /** * Opens the profile for making calls and/or receiving calls. Subsequent * SIP calls can be made through the default phone UI. The caller may also * make subsequent calls through * {@link #makeAudioCall(Context, String, String, SipAudioCall.Listener)}. * make subsequent calls through {@link #makeAudioCall}. * If the receiving-call option is enabled in the profile, the SIP service * will register the profile to the corresponding server periodically in * order to receive calls from the server. Loading @@ -134,8 +130,7 @@ public class SipManager { /** * Opens the profile for making calls and/or receiving calls. Subsequent * SIP calls can be made through the default phone UI. The caller may also * make subsequent calls through * {@link #makeAudioCall(Context, String, String, SipAudioCall.Listener)}. * make subsequent calls through {@link #makeAudioCall}. * If the receiving-call option is enabled in the profile, the SIP service * will register the profile to the corresponding server periodically in * order to receive calls from the server. Loading @@ -160,9 +155,7 @@ public class SipManager { /** * Sets the listener to listen to registration events. No effect if the * profile has not been opened to receive calls * (see {@link #open(SipProfile, String, SipRegistrationListener)} and * {@link #open(SipProfile)}). * profile has not been opened to receive calls (see {@link #open}). * * @param localProfileUri the URI of the profile * @param listener to listen to registration events; can be null Loading Loading @@ -283,7 +276,7 @@ public class SipManager { /** * Creates a {@link SipAudioCall} to take an incoming call. Before the call * is returned, the listener will receive a * {@link SipAudioCall#Listener.onRinging(SipAudioCall, SipProfile)} * {@link SipAudioCall.Listener#onRinging} * callback. * * @param context context to create a {@link SipAudioCall} object Loading Loading @@ -377,12 +370,11 @@ public class SipManager { /** * Registers the profile to the corresponding server for receiving calls. * {@link #open(SipProfile, String, SipRegistrationListener)} is still * needed to be called at least once in order for the SIP service to * broadcast an intent when an incoming call is received. * {@link #open} is still needed to be called at least once in order for * the SIP service to broadcast an intent when an incoming call is received. * * @param localProfile the SIP profile to register with * @param expiryTime registration expiration time (in second) * @param expiryTime registration expiration time (in seconds) * @param listener to listen to the registration events * @throws SipException if calling the SIP service results in an error */ Loading Loading @@ -419,9 +411,9 @@ public class SipManager { /** * Gets the {@link ISipSession} that handles the incoming call. For audio * calls, consider to use {@link SipAudioCall} to handle the incoming call. * See {@link #takeAudioCall(Context, Intent, SipAudioCall.Listener)}. * Note that the method may be called only once for the same intent. For * subsequent calls on the same intent, the method returns null. * See {@link #takeAudioCall}. Note that the method may be called only once * for the same intent. For subsequent calls on the same intent, the method * returns null. * * @param incomingCallIntent the incoming call broadcast intent * @return the session object that handles the incoming call Loading Loading
voip/java/android/net/sip/ISipSession.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ import android.net.sip.ISipSessionListener; import android.net.sip.SipProfile; /** * A SIP session that is associated with a SIP dialog or a transaction * (e.g., registration) not within a dialog. * A SIP session that is associated with a SIP dialog or a transaction that is * not within a dialog. * @hide */ interface ISipSession { Loading
voip/java/android/net/sip/SipAudioCall.java +6 −6 Original line number Diff line number Diff line Loading @@ -96,8 +96,8 @@ public interface SipAudioCall { } /** * The adapter class for {@link SipAudioCall#Listener}. The default * implementation of all callback methods is no-op. * The adapter class for {@link Listener}. The default implementation of * all callback methods is no-op. */ public class Adapter implements Listener { protected void onChanged(SipAudioCall call) { Loading Loading @@ -134,7 +134,7 @@ public interface SipAudioCall { /** * Sets the listener to listen to the audio call events. The method calls * {@link #setListener(Listener, false)}. * {@code setListener(listener, false)}. * * @param listener to listen to the audio call events of this object * @see #setListener(Listener, boolean) Loading Loading @@ -178,8 +178,8 @@ public interface SipAudioCall { void endCall() throws SipException; /** * Puts a call on hold. When succeeds, * {@link #Listener#onCallHeld(SipAudioCall)} is called. * Puts a call on hold. When succeeds, {@link Listener#onCallHeld} is * called. */ void holdCall() throws SipException; Loading @@ -188,7 +188,7 @@ public interface SipAudioCall { /** * Continues a call that's on hold. When succeeds, * {@link #Listener#onCallEstablished(SipAudioCall)} is called. * {@link Listener#onCallEstablished} is called. */ void continueCall() throws SipException; Loading
voip/java/android/net/sip/SipErrorCode.java +4 −4 Original line number Diff line number Diff line Loading @@ -18,10 +18,10 @@ package android.net.sip; /** * Defines error code returned in * {@link SipRegistrationListener#onRegistrationFailed(String, String, String)}, * {@link ISipSessionListener#onError(ISipSession, String, String)}, * {@link ISipSessionListener#onCallChangeFailed(ISipSession, String, String)} and * {@link ISipSessionListener#onRegistrationFailed(ISipSession, String, String)}. * {@link SipRegistrationListener#onRegistrationFailed}, * {@link ISipSessionListener#onError}, * {@link ISipSessionListener#onCallChangeFailed} and * {@link ISipSessionListener#onRegistrationFailed}. * @hide */ public enum SipErrorCode { Loading
voip/java/android/net/sip/SipException.java +1 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.net.sip; /** * General SIP-related exception class. * @hide */ public class SipException extends Exception { Loading
voip/java/android/net/sip/SipManager.java +19 −27 Original line number Diff line number Diff line Loading @@ -28,25 +28,22 @@ import java.text.ParseException; /** * The class provides API for various SIP related tasks. Specifically, the API * allows the application to: * allows an application to: * <ul> * <li>register a {@link SipProfile} to have the background SIP service listen * to incoming calls and broadcast them with registered command string. See * {@link #open(SipProfile, String, SipRegistrationListener)}, * {@link #open(SipProfile)}, {@link #close(String)}, * {@link #isOpened(String)} and {@link isRegistered(String)}. It also * facilitates handling of the incoming call broadcast intent. See * {@link #isIncomingCallIntent(Intent)}, {@link #getCallId(Intent)}, * {@link #getOfferSessionDescription(Intent)} and * {@link #takeAudioCall(Context, Intent, SipAudioCall.Listener)}.</li> * {@link #open(SipProfile)}, {@link #close}, {@link #isOpened} and * {@link #isRegistered}. It also facilitates handling of the incoming call * broadcast intent. See * {@link #isIncomingCallIntent}, {@link #getCallId}, * {@link #getOfferSessionDescription} and {@link #takeAudioCall}.</li> * <li>make/take SIP-based audio calls. See * {@link #makeAudioCall(Context, SipProfile, SipProfile, SipAudioCall.Listener)} * and {@link #takeAudioCall(Context, Intent, SipAudioCall.Listener}.</li> * {@link #makeAudioCall} and {@link #takeAudioCall}.</li> * <li>register/unregister with a SIP service provider. See * {@link #register(SipProfile, int, ISipSessionListener)} and * {@link #unregister(SipProfile, ISipSessionListener)}.</li> * {@link #register} and {@link #unregister}.</li> * <li>process SIP events directly with a {@link ISipSession} created by * {@link createSipSession(SipProfile, ISipSessionListener)}.</li> * {@link #createSipSession}.</li> * </ul> * @hide */ Loading Loading @@ -113,8 +110,7 @@ public class SipManager { /** * Opens the profile for making calls and/or receiving calls. Subsequent * SIP calls can be made through the default phone UI. The caller may also * make subsequent calls through * {@link #makeAudioCall(Context, String, String, SipAudioCall.Listener)}. * make subsequent calls through {@link #makeAudioCall}. * If the receiving-call option is enabled in the profile, the SIP service * will register the profile to the corresponding server periodically in * order to receive calls from the server. Loading @@ -134,8 +130,7 @@ public class SipManager { /** * Opens the profile for making calls and/or receiving calls. Subsequent * SIP calls can be made through the default phone UI. The caller may also * make subsequent calls through * {@link #makeAudioCall(Context, String, String, SipAudioCall.Listener)}. * make subsequent calls through {@link #makeAudioCall}. * If the receiving-call option is enabled in the profile, the SIP service * will register the profile to the corresponding server periodically in * order to receive calls from the server. Loading @@ -160,9 +155,7 @@ public class SipManager { /** * Sets the listener to listen to registration events. No effect if the * profile has not been opened to receive calls * (see {@link #open(SipProfile, String, SipRegistrationListener)} and * {@link #open(SipProfile)}). * profile has not been opened to receive calls (see {@link #open}). * * @param localProfileUri the URI of the profile * @param listener to listen to registration events; can be null Loading Loading @@ -283,7 +276,7 @@ public class SipManager { /** * Creates a {@link SipAudioCall} to take an incoming call. Before the call * is returned, the listener will receive a * {@link SipAudioCall#Listener.onRinging(SipAudioCall, SipProfile)} * {@link SipAudioCall.Listener#onRinging} * callback. * * @param context context to create a {@link SipAudioCall} object Loading Loading @@ -377,12 +370,11 @@ public class SipManager { /** * Registers the profile to the corresponding server for receiving calls. * {@link #open(SipProfile, String, SipRegistrationListener)} is still * needed to be called at least once in order for the SIP service to * broadcast an intent when an incoming call is received. * {@link #open} is still needed to be called at least once in order for * the SIP service to broadcast an intent when an incoming call is received. * * @param localProfile the SIP profile to register with * @param expiryTime registration expiration time (in second) * @param expiryTime registration expiration time (in seconds) * @param listener to listen to the registration events * @throws SipException if calling the SIP service results in an error */ Loading Loading @@ -419,9 +411,9 @@ public class SipManager { /** * Gets the {@link ISipSession} that handles the incoming call. For audio * calls, consider to use {@link SipAudioCall} to handle the incoming call. * See {@link #takeAudioCall(Context, Intent, SipAudioCall.Listener)}. * Note that the method may be called only once for the same intent. For * subsequent calls on the same intent, the method returns null. * See {@link #takeAudioCall}. Note that the method may be called only once * for the same intent. For subsequent calls on the same intent, the method * returns null. * * @param incomingCallIntent the incoming call broadcast intent * @return the session object that handles the incoming call Loading