FileDocCategorySizeDatePackage
ImsConferenceState.javaAPI DocAndroid 5.1 API6619Thu Mar 12 22:22:42 GMT 2015com.android.ims

ImsConferenceState

public class ImsConferenceState extends Object implements android.os.Parcelable
Provides the conference information (defined in RFC 4575) for IMS conference call.
hide

Fields Summary
public static final String
USER
conference-info : user
public static final String
DISPLAY_TEXT
public static final String
ENDPOINT
public static final String
STATUS
public static final String
STATUS_PENDING
status-type (String) : "pending" : Endpoint is not yet in the session, but it is anticipated that he/she will join in the near future. "dialing-out" : Focus has dialed out to connect the endpoint to the conference, but the endpoint is not yet in the roster (probably being authenticated). "dialing-in" : Endpoint is dialing into the conference, not yet in the roster (probably being authenticated). "alerting" : PSTN alerting or SIP 180 Ringing was returned for the outbound call; endpoint is being alerted. "on-hold" : Active signaling dialog exists between an endpoint and a focus, but endpoint is "on-hold" for this conference, i.e., he/she is neither "hearing" the conference mix nor is his/her media being mixed in the conference. "connected" : Endpoint is a participant in the conference. Depending on the media policies, he/she can send and receive media to and from other participants. "disconnecting" : Focus is in the process of disconnecting the endpoint (e.g. in SIP a DISCONNECT or BYE was sent to the endpoint). "disconnected" : Endpoint is not a participant in the conference, and no active dialog exists between the endpoint and the focus. "muted-via-focus" : Active signaling dialog exists beween an endpoint and a focus and the endpoint can "listen" to the conference, but the endpoint's media is not being mixed into the conference. "connect-fail" : Endpoint fails to join the conference by rejecting the conference call.
public static final String
STATUS_DIALING_OUT
public static final String
STATUS_DIALING_IN
public static final String
STATUS_ALERTING
public static final String
STATUS_ON_HOLD
public static final String
STATUS_CONNECTED
public static final String
STATUS_DISCONNECTING
public static final String
STATUS_DISCONNECTED
public static final String
STATUS_MUTED_VIA_FOCUS
public static final String
STATUS_CONNECT_FAIL
public static final String
SIP_STATUS_CODE
conference-info : SIP status code (integer)
public HashMap
mParticipants
public static final Creator
CREATOR
Constructors Summary
public ImsConferenceState()


      
    
public ImsConferenceState(android.os.Parcel in)

        readFromParcel(in);
    
Methods Summary
public intdescribeContents()

        return 0;
    
public static intgetConnectionStateForStatus(java.lang.String status)
Translates an {@code ImsConferenceState} status type to a telecom connection state.

param
status The status type.
return
The corresponding {@link android.telecom.Connection} state.


                               
         
        if (status.equals(STATUS_PENDING)) {
            return Connection.STATE_INITIALIZING;
        } else if (status.equals(STATUS_DIALING_IN)) {
            return Connection.STATE_RINGING;
        } else if (status.equals(STATUS_ALERTING) ||
                status.equals(STATUS_DIALING_OUT)) {
            return Connection.STATE_DIALING;
        } else if (status.equals(STATUS_ON_HOLD)) {
            return Connection.STATE_HOLDING;
        } else if (status.equals(STATUS_CONNECTED) ||
                status.equals(STATUS_MUTED_VIA_FOCUS) ||
                status.equals(STATUS_DISCONNECTING)) {
            return Connection.STATE_ACTIVE;
        } else if (status.equals(STATUS_DISCONNECTED)) {
            return Connection.STATE_DISCONNECTED;
        }
        return Call.STATE_ACTIVE;
    
private voidreadFromParcel(android.os.Parcel in)

        int size = in.readInt();

        for (int i = 0; i < size; ++i) {
            String user = in.readString();
            Bundle state = in.readParcelable(null);
            mParticipants.put(user, state);
        }
    
public voidwriteToParcel(android.os.Parcel out, int flags)

        out.writeInt(mParticipants.size());

        if (mParticipants.size() > 0) {
            Set<Entry<String, Bundle>> entries = mParticipants.entrySet();

            if (entries != null) {
                Iterator<Entry<String, Bundle>> iterator = entries.iterator();

                while (iterator.hasNext()) {
                    Entry<String, Bundle> entry = iterator.next();

                    out.writeString(entry.getKey());
                    out.writeParcelable(entry.getValue(), 0);
                }
            }
        }