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

http://mobicents.googlecode.com/ · Java · 68 lines · 21 code · 11 blank · 36 comment · 0 complexity · 00cbe6ac3a5c63fe2c06ab3d33f2f8ec MD5 · raw file

  1. package javax.megaco.pkg.CPToneDetPkg;
  2. import javax.megaco.pkg.MegacoPkg;
  3. import javax.megaco.pkg.PkgEventItem;
  4. /**
  5. * The MEGACO Caller Waiting Tone event class extends the PkgEventItem class.
  6. * This is a final class. This class defines Caller Waiting Tone event of MEGACO
  7. * Call Progress Tone Detect package. The methods shall define that this event
  8. * item belongs to the Call Progress Tone Detect package.
  9. */
  10. public final class CPToneDetCrEvt extends PkgEventItem {
  11. /**
  12. * Identifies Caller Waiting Tone event of the MEGACO Call Progress Tone
  13. * Detect Package. Its value shall be set equal to 0x0038.
  14. */
  15. public static final int CP_TONE_DET_CR_EVENT = 0x0038;
  16. private CPToneDetPkg itemsPackageId = new CPToneDetPkg();
  17. /**
  18. * Constructs a Jain MEGACO Object representing event Item of the MEGACO
  19. * Package for event Caller Waiting Tone and Package as Call Progress Tone
  20. * Detect.
  21. */
  22. public CPToneDetCrEvt() {
  23. super();
  24. super.itemId = CP_TONE_DET_CR_EVENT;
  25. super.eventId = CP_TONE_DET_CR_EVENT;
  26. }
  27. /**
  28. * This method is used to get the event identifier from an Event Item
  29. * object. The implementations of this method in this class returns the id
  30. * of the Caller Waiting event of Call Progress Tone Detect Package.
  31. *
  32. * @return It shall return {@link CP_TONE_DET_CR_EVENT}.
  33. */
  34. public int getEventId() {
  35. return super.eventId;
  36. }
  37. /**
  38. * This method is used to get the item identifier from an Item object. The
  39. * implementations of this method in this class returns the id of the Caller
  40. * Waiting event of Call Progress Tone Detect Package.
  41. *
  42. * @return It shall return {@link CP_TONE_DET_CR_EVENT}.
  43. */
  44. public int getItemId() {
  45. return super.itemId;
  46. }
  47. /**
  48. * This method gets the package to which the item belongs. Since the Caller
  49. * Waiting Tone event is defined in the Call Progress Tone Detect Package of
  50. * MEGACO protocol, this method returns the CPToneDetPkg class object.
  51. *
  52. * @return
  53. */
  54. public MegacoPkg getItemsPackageId() {
  55. return itemsPackageId;
  56. }
  57. }