/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

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