Renames occurrences of callParticipant to callPeer so that it would better reflect our new Call architecture that also includes conferencing and ConferenceMembers

cusax-fix
Emil Ivov 17 years ago
parent 87cb0535e4
commit 8e3d66492c

@ -97,13 +97,6 @@ public class OperationSetBasicInstantMessagingJabberImpl
*/
private static final String CLOSE_BODY_TAG = "</body>";
/**
* Contains the time of the last mail result set that we've received from
* the server. We use this time when sending new queries to the server so
* that it won't return messages that we've already shown to our user.
*/
private long lastResultTime = -1;
/**
* Creates an instance of this operation set.
* @param provider a reference to the <tt>ProtocolProviderServiceImpl</tt>
@ -654,12 +647,21 @@ public boolean accept(Packet packet)
private void subscribeForGmailNotifications()
{
// first check support for the notification service
boolean notificationsAreSupported = ServiceDiscoveryManager
.getInstanceFor(jabberProvider.getConnection())
.includesFeature(NewMailNotificationIQ.NAMESPACE);
boolean notificationsAreSupported = jabberProvider.isFeatureSupported(
jabberProvider.getAccountID().getService(),
NewMailNotificationIQ.NAMESPACE);
if (!notificationsAreSupported)
{
logger.debug(jabberProvider.getAccountID().getService()
+" does not seem to provide a GMail notification "
+" service so we won't be trying to subscribe for it");
return;
}
logger.debug(jabberProvider.getAccountID().getService()
+" seems to provide a GMail notification "
+" service so we will try to subscribe for it");
ProviderManager providerManager = ProviderManager.getInstance();
providerManager.addIQProvider(

@ -21,7 +21,7 @@
/**
* The Jabber protocol extension of the <tt>AbstractFileTransfer</tt>.
*
*
* @author Yana Stamcheva
*/
public class OutgoingFileTransferJabberImpl
@ -84,9 +84,9 @@ public OutgoingFileTransferJabberImpl(
&& ((ThumbnailedFile) file).getThumbnailData().length > 0)
{
if (protocolProvider.isFeatureListSupported(
protocolProvider.getFullJid(receiver),
new String[]{"urn:xmpp:thumbs:0",
"urn:xmpp:bob"}))
protocolProvider.getFullJid(receiver),
new String[]{"urn:xmpp:thumbs:0",
"urn:xmpp:bob"}))
{
protocolProvider.getConnection().addPacketWriterInterceptor(
this,
@ -105,7 +105,7 @@ public void cancel()
/**
* Returns the number of bytes already sent to the recipient.
*
*
* @return the number of bytes already sent to the recipient.
*/
public long getTransferedBytes()
@ -162,7 +162,7 @@ public void removeThumbnailRequestListener()
/**
* Listens for all <tt>StreamInitiation</tt> packets and adds a thumbnail
* to them if a thumbnailed file is supported.
*
*
* @see PacketInterceptor#interceptPacket(Packet)
*/
public void interceptPacket(Packet packet)

@ -644,11 +644,11 @@ protected void initialize(String screenname,
OperationSetInstantMessageTransform messageTransform
= new OperationSetInstantMessageTransformImpl();
supportedOperationSets.put(
OperationSetInstantMessageTransform.class.getName(),
messageTransform);
// Include features we're supporting in plus of the four that
// included by smack itself:
// http://jabber.org/protocol/si/profile/file-transfer
@ -867,14 +867,16 @@ JabberStatusEnum getJabberStatusEnum()
}
/**
* Checks if the given list of <tt>features</tt> is supported by the given
* jabber id.
* Determines if the given list of <tt>features</tt> is supported by the
* specified jabber id.
*
* @param jid the jabber id for which to check
* @param features the list of features to check for
*
* @return <code>true</code> if the list of features is supported, otherwise
* returns <code>false</code>
*/
boolean isFeatureListSupported(String jid, String[] features)
public boolean isFeatureListSupported(String jid, String[] features)
{
boolean isFeatureListSupported = true;
@ -903,10 +905,26 @@ boolean isFeatureListSupported(String jid, String[] features)
return isFeatureListSupported;
}
/**
* Determines if the given list of <tt>features</tt> is supported by the
* specified jabber id.
*
* @param jid the jabber id that we'd like to get information about
* @param feature the feature to check for
*
* @return <tt>true</tt> if the list of features is supported, otherwise
* returns <tt>false</tt>
*/
public boolean isFeatureSupported(String jid, String feature)
{
return isFeatureListSupported(jid, new String[]{feature});
}
/**
* Returns the full jabber id (jid) corresponding to the given contact.
*
* @param contact the contact, for which we're looking for a jid
* @return the jid
* @return the jid of the specified contact;
*/
String getFullJid(Contact contact)
{

@ -54,8 +54,38 @@ public IQ parseIQ(final XmlPullParser parser) throws Exception
parser.getAttributeValue("", "total-estimate")));
mailboxIQ.setUrl(parser.getAttributeValue("", "url"));
int eventType = parser.next();
String name = parser.getName();
boolean done = false;
while(!done)
{
int eventType = parser.next();
if (eventType == XmlPullParser.START_TAG)
{
String name = parser.getName();
if(parser.getName().equals("mail-thread-info"))
{
}
}
else if (eventType == XmlPullParser.END_TAG)
{
if (parser.getName().equals("field"))
{
done = true;
}
}
else
{
if(logger.isTraceEnabled())
{
logger.trace("xml parser returned eventType=" + eventType);
logger.trace("parser="+parser);
}
}
}
int eventType = 1;
String name = null;
if (eventType == XmlPullParser.START_TAG)
{
if ("mail-thread-info".equals(name))

Loading…
Cancel
Save