# HG changeset patch # User Da Risk # Date 1238710432 -7200 # Node ID c91278dda16610e45f15b1e9b34771cef91c3dc7 # Parent d1a5bb00aaebe0b230cbc200e600f3793bf70816 La facade et la connexion permette de recuperer une instance de ChatManager diff -r d1a5bb00aaeb -r c91278dda166 Beem-ecipse-formatter.xml --- a/Beem-ecipse-formatter.xml Thu Apr 02 19:03:08 2009 +0200 +++ b/Beem-ecipse-formatter.xml Fri Apr 03 00:13:52 2009 +0200 @@ -19,7 +19,7 @@ - + @@ -37,7 +37,7 @@ - + @@ -69,8 +69,8 @@ - - + + @@ -139,7 +139,7 @@ - + @@ -157,7 +157,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -230,7 +230,7 @@ - + diff -r d1a5bb00aaeb -r c91278dda166 src/com/beem/project/beem/jingle/Caller.java --- a/src/com/beem/project/beem/jingle/Caller.java Thu Apr 02 19:03:08 2009 +0200 +++ b/src/com/beem/project/beem/jingle/Caller.java Fri Apr 03 00:13:52 2009 +0200 @@ -1,22 +1,16 @@ package com.beem.project.beem.jingle; import java.net.UnknownHostException; - import java.util.ArrayList; import java.util.List; - import org.jivesoftware.smack.ConnectionConfiguration; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; - import org.jivesoftware.smackx.jingle.JingleManager; import org.jivesoftware.smackx.jingle.JingleSession; - import org.jivesoftware.smackx.jingle.listeners.JingleSessionListener; - import org.jivesoftware.smackx.jingle.media.JingleMediaManager; import org.jivesoftware.smackx.jingle.media.PayloadType; - import org.jivesoftware.smackx.jingle.nat.BasicTransportManager; import org.jivesoftware.smackx.jingle.nat.TransportCandidate; diff -r d1a5bb00aaeb -r c91278dda166 src/com/beem/project/beem/service/XMPPConnectionAdapter.java --- a/src/com/beem/project/beem/service/XMPPConnectionAdapter.java Thu Apr 02 19:03:08 2009 +0200 +++ b/src/com/beem/project/beem/service/XMPPConnectionAdapter.java Fri Apr 03 00:13:52 2009 +0200 @@ -15,6 +15,7 @@ import android.util.Log; import com.beem.project.beem.BeemException; import com.beem.project.beem.service.aidl.IBeemConnectionListener; +import com.beem.project.beem.service.aidl.IChatManager; import com.beem.project.beem.service.aidl.IRoster; import com.beem.project.beem.service.aidl.IXmppConnection; @@ -26,6 +27,7 @@ private static final String TAG = "XMPPConnectionAdapter"; private XMPPConnection mAdaptee; + private IChatManager mChatManager; private BeemException mLastException; private String mLogin; private String mPassword; @@ -76,6 +78,7 @@ mAdaptee.connect(); mAdaptee.addConnectionListener(mConListener); mAdaptee.login(mLogin, mPassword, "BEEM"); + mChatManager = new BeemChatManager(mAdaptee.getChatManager()); // TODO find why this cause a null pointer exception // this.initFeatures(); // pour declarer les features xmpp qu'on supporte mLastException = null; @@ -147,6 +150,14 @@ if (listen != null) mRemoteConnListeners.unregister(listen); } + + /** + * {@inheritDoc} + */ + @Override + public IChatManager getChatManager() throws RemoteException { + return mChatManager; + } /** * Trigger Connection event. diff -r d1a5bb00aaeb -r c91278dda166 src/com/beem/project/beem/service/XMPPFacade.java --- a/src/com/beem/project/beem/service/XMPPFacade.java Thu Apr 02 19:03:08 2009 +0200 +++ b/src/com/beem/project/beem/service/XMPPFacade.java Fri Apr 03 00:13:52 2009 +0200 @@ -1,6 +1,7 @@ package com.beem.project.beem.service; import android.os.RemoteException; +import com.beem.project.beem.service.aidl.IChatManager; import com.beem.project.beem.service.aidl.IRoster; import com.beem.project.beem.service.aidl.IXmppConnection; import com.beem.project.beem.service.aidl.IXMPPFacade; @@ -65,4 +66,12 @@ return mConnexion.getRoster(); } + /** + * {@inheritDoc} + */ + @Override + public IChatManager getChatManager() throws RemoteException { + return mConnexion.getChatManager(); + } + } diff -r d1a5bb00aaeb -r c91278dda166 src/com/beem/project/beem/service/aidl/IXMPPFacade.aidl --- a/src/com/beem/project/beem/service/aidl/IXMPPFacade.aidl Thu Apr 02 19:03:08 2009 +0200 +++ b/src/com/beem/project/beem/service/aidl/IXMPPFacade.aidl Fri Apr 03 00:13:52 2009 +0200 @@ -2,6 +2,7 @@ import com.beem.project.beem.service.aidl.IXmppConnection; import com.beem.project.beem.service.aidl.IRoster; +import com.beem.project.beem.service.aidl.IChatManager; interface IXMPPFacade { @@ -15,4 +16,6 @@ void disconnect(); + IChatManager getChatManager(); + } diff -r d1a5bb00aaeb -r c91278dda166 src/com/beem/project/beem/service/aidl/IXmppConnection.aidl --- a/src/com/beem/project/beem/service/aidl/IXmppConnection.aidl Thu Apr 02 19:03:08 2009 +0200 +++ b/src/com/beem/project/beem/service/aidl/IXmppConnection.aidl Fri Apr 03 00:13:52 2009 +0200 @@ -2,6 +2,7 @@ import com.beem.project.beem.service.aidl.IRoster; import com.beem.project.beem.service.aidl.IBeemConnectionListener; +import com.beem.project.beem.service.aidl.IChatManager; interface IXmppConnection { @@ -16,5 +17,5 @@ void addConnectionListener(in IBeemConnectionListener listen); void removeConnectionListener(in IBeemConnectionListener listen); - // IChatManager getChatManager(); + IChatManager getChatManager(); } \ No newline at end of file