2 p2pproxy Copyright (C) 2007 Jehan Monnier ()
4 P2pProxyInstance.java --
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 package org.linphone.p2pproxy.api;
22 import org.zoolu.sip.provider.SipProvider;
24 public interface P2pProxyInstance {
25 public static int BASE_HTTP = 30700;
26 public static int BASE_TCP = 9701;
28 public enum Mode {relay, edge, auto,seeding_server};
30 * @return Returns the Mode.
32 public abstract Mode getMode();
37 public abstract void setMode(Mode aMode);
40 * @return Returns the mIndex.
42 public abstract int getIndex();
45 * @param index The mIndex to set.
47 public abstract void setIndex(int index);
49 public abstract void start() throws Exception;
50 public abstract void stop() throws Exception;
52 public abstract boolean isStarted() throws P2pProxyException;
54 public abstract SipProvider getSipClientProvider();
56 public abstract String getSipClientName();
58 public int getNumberOfconnectedPeers();
60 public Object getOpaqueNetworkManager();
62 public void setPrivateHostAdress(String anAddress);
64 public void setPublicHostAdress(String anAddress);
66 public abstract P2pProxyNetworkProbe getManager();
68 public abstract P2pProxyRtpRelayManagement getRtpRelayManager();
70 public void setRelayCapacity(int aCapacity);
72 public void setProperty(String key,String value) throws P2pProxyException;
74 public int getAdvertisementDiscoveryTimeout();