01: /**
02: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
03: * Unpublished - rights reserved under the Copyright Laws of the United States.
04: * Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
05: * Copyright © 2005 BEA Systems, Inc. All rights reserved.
06: *
07: * Use is subject to license terms.
08: *
09: * This distribution may include materials developed by third parties.
10: *
11: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12: *
13: * Module Name : JSIP Specification
14: * File Name : CallInfoHeader.java
15: * Author : Phelim O'Doherty
16: *
17: * HISTORY
18: * Version Date Author Comments
19: * 1.1 08/10/2002 Phelim O'Doherty Initial version
20: *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21: */package javax.sip.header;
22:
23: import java.text.ParseException;
24: import javax.sip.address.URI;
25:
26: /**
27: * The Call-Info header field provides additional information about the
28: * caller or callee, depending on whether it is found in a request or
29: * response. The purpose of the URI is described by the "purpose"
30: * parameter. The "icon" purpose designates an image suitable as an
31: * iconic representation of the caller or callee. The "info" purpose
32: * describes the caller or callee in general, for example, through a web
33: * page. The "card" purpose provides a business card, for example, in
34: * vCard or LDIF formats.
35: * <p>
36: * Use of the Call-Info header field can pose a security risk. If a
37: * callee fetches the URIs provided by a malicious caller, the callee
38: * may be at risk for displaying inappropriate or offensive content,
39: * dangerous or illegal content, and so on. Therefore, it is
40: * RECOMMENDED that a User Agent only render the information in the Call-Info
41: * header field if it can verify the authenticity of the element that
42: * originated the header field and trusts that element. This need not
43: * be the peer User Agent; a proxy can insert this header field into requests.
44: * <p>
45: * For Example:<br>
46: * <code>Call-Info: http://jcp.org/duke/photo.jpg;<br>
47: * purpose=icon, http://jcp.org/duke/; purpose=info</code>
48: *
49: * @author BEA Systems, NIST
50: * @version 1.2
51: *
52: */
53:
54: public interface CallInfoHeader extends Parameters, Header {
55:
56: /**
57: * Sets the Information parameter of this CallInfoHeader. The Information
58: * describes the caller or callee.
59: *
60: * @param info the new URI value of the location of the information.
61: */
62: public void setInfo(URI info);
63:
64: /**
65: * Gets the URI that represents the location of the info of the caller
66: * or callee.
67: *
68: * @return the location of the info of this CallInfoHeader, returns null
69: * if no info is present.
70: */
71: public URI getInfo();
72:
73: /**
74: * Sets the purpose parameter of the info of this CallInfoHeader.
75: *
76: * @param purpose - the new string value of the purpose of this info.
77: * @throws ParseException which signals that an error has been reached
78: * unexpectedly while parsing the purpose value.
79: */
80: public void setPurpose(String purpose) throws ParseException;
81:
82: /**
83: * Gets the purpose of the information supplied in this CallInfoHeader.
84: *
85: * @return the sting value of the purpose of the info, returns null
86: * if no purpose is present.
87: */
88: public String getPurpose();
89:
90: /**
91: * Name of CallInfoHeader
92: */
93: public final static String NAME = "Call-Info";
94: }
|