]> sjero.net Git - linphone/blob - p2pproxy/src/org/linphone/p2pproxy/api/P2pProxyInstance.java
f325156bb4cd51880e99e0dfe3ebf513ce6fea41
[linphone] / p2pproxy / src / org / linphone / p2pproxy / api / P2pProxyInstance.java
1 /*
2 p2pproxy Copyright (C) 2007  Jehan Monnier ()
3
4 P2pProxyInstance.java -- 
5
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.
10
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.
15
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.
19 */
20 package org.linphone.p2pproxy.api;
21
22 import org.zoolu.sip.provider.SipProvider;
23
24 public interface P2pProxyInstance {
25    public static int BASE_HTTP = 30700;
26    public static int BASE_TCP = 9701;
27     
28    public enum Mode {relay, edge, auto,seeding_server};
29    /**
30     * @return Returns the Mode.
31     */
32    public abstract Mode getMode();
33
34    /**
35     * @param aModet.
36     */
37    public abstract void setMode(Mode aMode);
38
39    /**
40     * @return Returns the mIndex.
41     */
42    public abstract int getIndex();
43
44    /**
45     * @param index The mIndex to set.
46     */
47    public abstract void setIndex(int index);
48
49    public abstract void start() throws Exception;
50    public abstract void stop() throws Exception;
51    
52    public abstract boolean isStarted() throws P2pProxyException; 
53    
54    public abstract SipProvider getSipClientProvider();
55    
56    public abstract String getSipClientName();
57    
58    public int getNumberOfconnectedPeers();
59    
60    public Object getOpaqueNetworkManager();
61    
62    public void setPrivateHostAdress(String anAddress);
63    
64    public void setPublicHostAdress(String anAddress);
65
66    public abstract P2pProxyNetworkProbe getManager();
67    
68    public abstract P2pProxyRtpRelayManagement getRtpRelayManager();
69    
70    public void setRelayCapacity(int aCapacity);
71    
72    public void setProperty(String key,String value) throws P2pProxyException;
73    
74    public int getAdvertisementDiscoveryTimeout();
75    
76 }