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

http://mobicents.googlecode.com/ · Java · 41 lines · 11 code · 8 blank · 22 comment · 0 complexity · ef539abbe693cd070f78361f3618c8a3 MD5 · raw file

  1. package javax.megaco.pkg.DTMFDetPkg;
  2. import javax.megaco.pkg.PkgConsts;
  3. /**
  4. * The MEGACO DTMF Detect Package inherits all methods of the Package, but
  5. * overrides the getPkgId and getPkgName to define packageid corresponding to
  6. * the DTMF Detect Package. This class also overrides the getExtendedPkgIds to
  7. * define that this package extends MEGACO Tone Detect package.
  8. */
  9. public class DTMFDetPkg extends javax.megaco.pkg.MegacoPkg {
  10. private int[] extendedPkgIds = new int[] { PkgConsts.TONE_DET_PACKAGE };
  11. /**
  12. * This method gets the package ids of all the package which the package had
  13. * directly or indirectly extended. Package ids are defined in
  14. * {@link PkgConsts}.
  15. *
  16. * @return Since this packge extends MEGACO Tone Detect package, this shall
  17. * return value {@link PkgConsts.TONE_DET_PACKAGE}.
  18. */
  19. public int[] getExtendedPkgIds() {
  20. return extendedPkgIds;
  21. }
  22. /**
  23. * This method return the package Id of the MEGACO package for which the
  24. * object is created. For DTMF Detection Package constant value
  25. * {@link PkgConsts.DTMF_DET_PACKAGE} shall be returned.
  26. *
  27. * @return Constant value {@link PkgConsts.DTMF_DET_PACKAGE} indicating DTMF
  28. * Detection Package.
  29. */
  30. public int getPkgId() {
  31. return PkgConsts.DTMF_DET_PACKAGE;
  32. }
  33. }