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

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

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