PageRenderTime 22ms CodeModel.GetById 14ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

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

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