PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/CPToneGenPkg/CPToneGenPkg.java

http://mobicents.googlecode.com/
Java | 50 lines | 15 code | 11 blank | 24 comment | 0 complexity | b2176fe4259235d371718b292507248b MD5 | raw file
 1package javax.megaco.pkg.CPToneGenPkg;
 2
 3import javax.megaco.pkg.MegacoPkg;
 4import javax.megaco.pkg.PkgConsts;
 5
 6/**
 7 * The MEGACO Call Progress Tone Generator Package inherits all methods of the
 8 * Package, but overrides the getPkgId and getPkgName to define packageid
 9 * corresponding to the Call Progress Tone Generator Package. This class also
10 * overrides the getExtendedPkgIds to define that this package extends MEGACO
11 * Tone Generator Package.
12 */
13public class CPToneGenPkg extends MegacoPkg {
14
15	private int[] extendedPkgIds = new int[] { PkgConsts.TONE_GEN_PACKAGE };
16
17	
18	
19	public CPToneGenPkg() {
20		super();
21		
22	}
23
24	/**
25	 * This method gets the package ids of all the package which the package had
26	 * directly or indirectly extended. Package ids are defined in
27	 * {@link PkgConsts}.
28	 * 
29	 * @return Since this packge extends MEGACO Tone Generator package, this
30	 *         shall return value {@link PkgConsts.TONE_GEN_PACKAGE}.
31	 */
32	public int[] getExtendedPkgIds() {
33
34		return extendedPkgIds;
35	}
36
37	/**
38	 * This method return the package Id of the MEGACO package for which the
39	 * object is created. For Call Progress Tone Generator Package constant
40	 * value {@link PkgConsts.CALL_PROG_TONE_GEN_PACKAGE} shall be returned.
41	 * 
42	 * @return Constant value {@link PkgConsts.CALL_PROG_TONE_GEN_PACKAGE}
43	 *         indicating DTMF Generator Package.
44	 */
45	public int getPkgId() {
46		// FIXME: jdoc says: DTMF_GEN_PACKAGE
47		return PkgConsts.CALL_PROG_TONE_GEN_PACKAGE;
48	}
49
50}