Methods Summary |
---|
public PrimitiveParser | createPrimitiveParser()
if(mDataEncoding == EncodingType.WBXML) {
return new WbxmlPrimitiveParser();
} else if (mDataEncoding == EncodingType.XML) {
return new XmlPrimitiveParser();
} else if (mDataEncoding == EncodingType.SMS) {
return new PtsPrimitiveParser();
}
ImpsLog.log("Unknown DataEncoding: " + mDataEncoding);
return null;
|
public PrimitiveSerializer | createPrimitiveSerializer()
if(mDataEncoding == EncodingType.WBXML) {
return new WbxmlPrimitiveSerializer(mImpsVersion,
mVersionNs, mTransactionNs);
} else if (mDataEncoding == EncodingType.XML) {
return new XmlPrimitiveSerializer(mVersionNs, mTransactionNs);
} else if (mDataEncoding == EncodingType.SMS) {
try {
return new PtsPrimitiveSerializer(mImpsVersion);
} catch (SerializerException e) {
ImpsLog.logError(e);
return null;
}
}
ImpsLog.log("Unknown DataEncoding: " + mDataEncoding);
return null;
|
public com.android.im.imps.ImpsConnectionConfig$CirMethod | getCirChannelBinding()Gets the type of protocol binding for CIR channel.
return mCirChannelBinding;
|
public java.lang.String | getClientId()
return mClientId;
|
public com.android.im.imps.ImpsConnectionConfig$TransportType | getDataChannelBinding()Gets the type of protocol binding for data channel.
return mDataChannelBinding;
|
public java.lang.String | getDefaultDomain()
return mDefaultDomain;
|
public int | getDefaultKeepAliveInterval()
return DEFAULT_KEEPALIVE_SECONDS;
|
public int | getDefaultServerPollMin()
return DEFAULT_MIN_SERVER_POLL;
|
public java.lang.String | getHost()Gets the host name of the server.
return mHost;
|
public com.android.im.imps.ImpsConstants.ImpsVersion | getImpsVersion()
return mImpsVersion;
|
public java.lang.String | getMsisdn()
return mMsisdn;
|
public PasswordDigest | getPasswordDigest()
if (mPasswordDigest != null) {
return mPasswordDigest;
}
if (mCustomPasswordDigest != null) {
try {
mPasswordDigest = new CustomPasswordDigest(mPluginPath, mCustomPasswordDigest);
} catch (ImException e) {
ImpsLog.logError("Can't load custom password digest method", e);
}
}
if (mPasswordDigest == null) {
mPasswordDigest = new StandardPasswordDigest();
}
return mPasswordDigest;
|
public PresenceMapping | getPresenceMapping()
if (mPresenceMapping != null) {
return mPresenceMapping;
}
if (mCustomPresenceMapping != null) {
try {
mPresenceMapping = new CustomPresenceMapping(mPluginPath,
mCustomPresenceMapping);
} catch (ImException e) {
ImpsLog.logError("Failed to load custom presence mapping", e);
}
}
if (mPresenceMapping == null) {
mPresenceMapping = new DefaultPresenceMapping();
}
return mPresenceMapping;
|
public java.lang.String | getPresenceNs()
return mPresenceNs;
|
public long | getPresencePollInterval()
String value = mOthers.get(ImpsConfigNames.PRESENCE_POLLING_INTERVAL);
if (value == null) {
return DEFAULT_PRESENCE_POLL_INTERVAL;
}
try {
return Long.parseLong(value);
} catch (NumberFormatException e) {
return DEFAULT_PRESENCE_POLL_INTERVAL;
}
|
public java.lang.String | getProtocolName()
return "IMPS";
|
public int | getReplyTimeout()Gets the number of milliseconds to wait for a response from the server.
The default value is 45 seconds.
return mReplyTimeout;
|
public java.lang.String | getSmsAddr()
return mOthers.get(ImpsConfigNames.SMS_ADDR);
|
public java.lang.String | getSmsCirAddr()
return mOthers.get(ImpsConfigNames.SMS_CIR_ADDR);
|
public int | getSmsCirPort()
String value = mOthers.get(ImpsConfigNames.SMS_CIR_PORT);
if (value == null) {
return DEFAULT_SMS_CIR_PORT;
}
try {
return Integer.parseInt(value);
} catch (NumberFormatException e) {
return DEFAULT_SMS_CIR_PORT;
}
|
public int | getSmsPort()
String value = mOthers.get(ImpsConfigNames.SMS_PORT);
if (value == null) {
return DEFAULT_SMS_PORT;
}
try {
return Integer.parseInt(value);
} catch (NumberFormatException e) {
return DEFAULT_SMS_PORT;
}
|
public java.lang.String | getTransportContentType()
return mContentType;
|
public int | getUdpPort()Gets the port number for the standalone UDP/IP CIR method. This is only
useful when UDP CIR method is used. The default port number is 3717.
return mUdpPort;
|
private boolean | isTrue(java.lang.String value)
return "true".equalsIgnoreCase(value);
|
public boolean | needDeliveryReport()
return NEED_DELIVERY_REPORT;
|
public void | setHost(java.lang.String host)Sets the host name of the server.
mHost = host;
|
private void | setupVersionStrings()
if (mImpsVersion == ImpsVersion.IMPS_VERSION_11) {
if (mDataEncoding == EncodingType.XML) {
mContentType = "application/vnd.wv.csp.xml";
} else if (mDataEncoding == EncodingType.WBXML) {
mContentType = "application/vnd.wv.csp.wbxml";
} else if (mDataEncoding == EncodingType.SMS) {
mContentType = "application/vnd.wv.csp.sms";
}
mVersionNs = ImpsConstants.VERSION_11_NS;
mTransactionNs = ImpsConstants.TRANSACTION_11_NS;
mPresenceNs = ImpsConstants.PRESENCE_11_NS;
} else if (mImpsVersion == ImpsVersion.IMPS_VERSION_12) {
if (mDataEncoding == EncodingType.XML) {
mContentType = "application/vnd.wv.csp.xml";
} else if (mDataEncoding == EncodingType.WBXML) {
mContentType = "application/vnd.wv.csp.wbxml";
} else if (mDataEncoding == EncodingType.SMS) {
mContentType = "application/vnd.wv.csp.sms";
}
mVersionNs = ImpsConstants.VERSION_12_NS;
mTransactionNs = ImpsConstants.TRANSACTION_12_NS;
mPresenceNs = ImpsConstants.PRESENCE_12_NS;
} else if (mImpsVersion == ImpsVersion.IMPS_VERSION_13){
if (mDataEncoding == EncodingType.XML) {
mContentType = "application/vnd.wv.csp+xml";
} else if (mDataEncoding == EncodingType.WBXML) {
mContentType = "application/vnd.wv.csp+wbxml";
} else if (mDataEncoding == EncodingType.SMS) {
mContentType = "application/vnd.wv.csp.sms";
}
mVersionNs = ImpsConstants.VERSION_13_NS;
mTransactionNs = ImpsConstants.TRANSACTION_13_NS;
mPresenceNs = ImpsConstants.PRESENCE_13_NS;
}
|
public boolean | supportBasicPresenceOnly()XXX: Workaround for the OZ IMPS GTalk server which supports only basic
presence attributes and don't support GetAttributeList.
return mBasicPresenceOnly;
|
public boolean | use4wayLogin()
return mSecureLogin;
|
public boolean | usePrensencePolling()
String value = mOthers.get(ImpsConfigNames.POLL_PRESENCE);
return isTrue(value);
|
public boolean | useSmsAuth()
return isTrue(mOthers.get(ImpsConfigNames.SMS_AUTH));
|