/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

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