3 Copyright (C) 2010 Belledonne Communications, Grenoble, France
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 package org.linphone.core;
21 * Object that represents a SIP address.
22 * The LinphoneAddress is an opaque object to represents SIP addresses, ie the content of SIP's 'from' and 'to' headers.
23 * A SIP address is made of display name, username, domain name, port, and various uri headers (such as tags).
24 * It looks like 'Alice <sip:alice@example.net>'. The LinphoneAddress has methods to extract and manipulate all parts of the address.
25 * When some part of the address (for example the username) is empty, the accessor methods return null.
26 * <br> Can be instanciated using both {@link LinphoneCoreFactory#createLinphoneAddress(String, String, String)} or {@link LinphoneCoreFactory#createLinphoneAddress(String)}
27 * @author jehanmonnier
30 public interface LinphoneAddress {
33 * @return null if not set
35 public String getDisplayName();
38 * @return null if not set
40 public String getUserName();
43 * @return null if not set
45 public String getDomain();
46 public String getPort();
47 public int getPortInt();
52 public void setDisplayName(String name);
53 public void setUserName(String username);
54 public void setDomain(String domain);
55 public void setPort(String port);
56 public void setPortInt(int port);
61 * @return the address as a string.
63 public String asString();
66 * @return the address without display name as a string.
68 public String asStringUriOnly();
71 * same as {@link #asString()}
74 public String toString();