/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

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