1/*
2* Conditions Of Use
3*
4* This software was developed by employees of the National Institute of
5* Standards and Technology (NIST), an agency of the Federal Government
6* and others.
7* Pursuant to title 15 Untied States Code Section 105, works of NIST
8* employees are not subject to copyright protection in the United States
9* and are considered to be in the public domain.  As a result, a formal
10* license is not needed to use the software.
11*
12* This software is provided by NIST as a service and is expressly
13* provided "AS IS."  NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
14* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
15* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
16* AND DATA ACCURACY.  NIST does not warrant or make any representations
17* regarding the use of the software or the results thereof, including but
18* not limited to the correctness, accuracy, reliability or usefulness of
19* the software.
20*
21* Permission to use this software is contingent upon your acceptance
22* of the terms of this agreement
23*
24* .
25*
26*/
27/*******************************************
28 * PRODUCT OF PT INOVACAO - EST DEPARTMENT *
29 *******************************************/
30
31package gov.nist.javax.sip.header.ims;
32
33import gov.nist.core.NameValue;
34
35import javax.sip.header.Header;
36import javax.sip.header.Parameters;
37import java.text.ParseException;
38import java.util.ArrayList;
39import java.util.ListIterator;
40
41
42/**
43 * P-Charging-Function-Addresses header -
44 * Private Header: RFC 3455.
45 *
46 * There is a need to inform each SIP proxy involved in a transaction about the common
47 * charging functional entities to receive the generated charging records or charging events.
48 * <ul>
49 * <li>
50 *   - CCF is used for off-line charging (e.g., for postpaid account charging).
51 * <li>
52 *   - ECF is used for on-line charging (e.g., for pre-paid account charging).
53 * </ul>
54 * Only one instance of the header MUST be present in a particular request or response.
55 *
56 * <pre>
57 * P-Charging-Addr = "P-Charging-Function-Addresses" HCOLON
58 *          charge-addr-params
59 *          *(SEMI charge-addr-params)
60 * charge-addr-params   = ccf / ecf / generic-param
61 * ccf              = "ccf" EQUAL gen-value
62 * ecf              = "ecf" EQUAL gen-value
63 *
64 * gen-value    = token / host / quoted-string
65 *
66 * host             =  hostname / IPv4address / IPv6reference
67 * hostname         =  *( domainlabel "." ) toplabel [ "." ]
68 * domainlabel      =  alphanum / alphanum *( alphanum / "-" ) alphanum
69 * toplabel         =  ALPHA / ALPHA *( alphanum / "-" ) alphanum
70 *
71 *
72 * example:
73 *  P-Charging-Function-Addresses: ccf=192.1.1.1; ccf=192.1.1.2;
74 *  ecf=192.1.1.3; ecf=192.1.1.4
75 * </pre>
76 *
77 * @author ALEXANDRE MIGUEL SILVA SANTOS - Nú 10045401
78 */
79
80
81
82public interface PChargingFunctionAddressesHeader extends Parameters, Header {
83
84    /**
85     * Name of PChargingFunctionAddressesHeader
86     */
87    public final static String NAME = "P-Charging-Function-Addresses";
88
89
90    /**
91     * <p>Set the Charging Collection Function (CCF) Address</p>
92     * @param ccfAddress - the address to set in the CCF parameter
93     * @throws ParseException
94     */
95    public void setChargingCollectionFunctionAddress(String ccfAddress) throws ParseException;
96
97    /**
98     * <p>Add another Charging Collection Function (CCF) Address to this header</p>
99     * @param ccfAddress - the address to set in the CCF parameter
100     * @throws ParseException
101     */
102    public void addChargingCollectionFunctionAddress(String ccfAddress) throws ParseException;
103
104    /**
105     * <p>Remove a Charging Collection Function (CCF) Address set in this header</p>
106     * @param ccfAddress - the address in the CCF parameter to remove
107     * @throws ParseException if the address was not removed
108     */
109    public void removeChargingCollectionFunctionAddress(String ccfAddress) throws ParseException;
110
111    /**
112     * <p>Get all the Charging Collection Function (CCF) Addresses set in this header</p>
113     * @return ListIterator that constains all CCF addresses of this header
114     */
115    public ListIterator getChargingCollectionFunctionAddresses();
116
117    /**
118     * <p>Set the Event Charging Function (ECF) Address</p>
119     * @param ecfAddress - the address to set in the ECF parameter
120     * @throws ParseException
121     */
122    public void setEventChargingFunctionAddress(String ecfAddress)throws ParseException;
123
124    /**
125     * <p>Add another Event Charging Function (ECF) Address to this header</p>
126     * @param ecfAddress - the address to set in the ECF parameter
127     * @throws ParseException
128     */
129    public void addEventChargingFunctionAddress(String ecfAddress) throws ParseException;
130
131    /**
132     * <p>Remove a Event Charging Function (ECF) Address set in this header</p>
133     * @param ecfAddress - the address in the ECF parameter to remove
134     * @throws ParseException if the address was not removed
135     */
136    public void removeEventChargingFunctionAddress(String ecfAddress) throws ParseException;
137
138    /**
139     * <p>Get all the Event Charging Function (ECF) Addresses set in this header</p>
140     * @return ListIterator that constains all CCF addresses of this header
141     */
142    public ListIterator getEventChargingFunctionAddresses();
143
144}
145