mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 08:39:20 +00:00
fix compilation issue
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@24 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
01408ff07f
commit
d9fdab37f1
2 changed files with 17 additions and 5 deletions
|
|
@ -37,7 +37,7 @@ public class JxtaNetworkResources {
|
|||
private final P2pUserRegistrationAdvertisement mP2pUserRegistrationAdvertisement;
|
||||
private final static long EXPIRATION= 120000;
|
||||
|
||||
JxtaNetworkResources (SipURL aUserName, JxtaNetworkManager aJxtaNetworkManager,SipURL aRegistrarAddress) {
|
||||
JxtaNetworkResources (String aUserName, JxtaNetworkManager aJxtaNetworkManager,String aRegistrarAddress) {
|
||||
mJxtaNetworkManager = aJxtaNetworkManager;
|
||||
mP2pUserRegistrationAdvertisement = (P2pUserRegistrationAdvertisement) AdvertisementFactory.newAdvertisement(P2pUserProfileAdvertisement.getAdvertisementType());
|
||||
mP2pUserRegistrationAdvertisement.setID(IDFactory.newCodatID(mJxtaNetworkManager.getPeerGroup().getPeerGroupID(), aUserName.toString().getBytes()));
|
||||
|
|
|
|||
|
|
@ -20,14 +20,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
package org.linphone.p2pproxy.core.sipproxy.superpeers;
|
||||
|
||||
import org.linphone.p2pproxy.api.P2pProxyException;
|
||||
import org.linphone.p2pproxy.core.JxtaNetworkManager;
|
||||
import org.linphone.p2pproxy.core.sipproxy.RegistrationHandler;
|
||||
import org.linphone.p2pproxy.core.sipproxy.SipProxy;
|
||||
import org.linphone.p2pproxy.core.sipproxy.SipProxyRegistrar.Registration;
|
||||
import org.zoolu.sip.address.SipURL;
|
||||
import org.zoolu.sip.message.Message;
|
||||
import org.zoolu.sip.provider.SipProvider;
|
||||
|
||||
public class SuperPeerProxy implements SipProxy, RegistrationHandler {
|
||||
|
||||
private final JxtaNetworkManager mJxtaNetworkManager;
|
||||
private final String mRegistrarAddress;
|
||||
|
||||
SuperPeerProxy(JxtaNetworkManager aJxtaNetworkManager, String aRegistrarAddress) {
|
||||
mJxtaNetworkManager = aJxtaNetworkManager;
|
||||
mRegistrarAddress = aRegistrarAddress;
|
||||
}
|
||||
public void proxyRequest(SipProvider provider, Message message) throws P2pProxyException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
|
@ -38,9 +46,13 @@ public class SuperPeerProxy implements SipProxy, RegistrationHandler {
|
|||
|
||||
}
|
||||
|
||||
public void updateRegistration(Registration registration, Message registrationMessage) throws P2pProxyException {
|
||||
// TODO Auto-generated method stub
|
||||
public void updateRegistration(Registration aRegistration, Message aRegistrationMessage) throws P2pProxyException {
|
||||
if (aRegistration.NetResources == null) {
|
||||
// new registration, create adv
|
||||
JxtaNetworkResources lRegistration = new JxtaNetworkResources(aRegistration.From, mJxtaNetworkManager,mRegistrarAddress);
|
||||
aRegistration.NetResources = lRegistration;
|
||||
}
|
||||
|
||||
((JxtaNetworkResources) aRegistration.NetResources).publish(aRegistration.Expiration);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue