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

http://mobicents.googlecode.com/ · Java · 99 lines · 31 code · 13 blank · 55 comment · 0 complexity · 021dbe4b6bc6baf30bde2025d0b192f3 MD5 · raw file

  1. package javax.megaco.pkg.ToneGenPkg;
  2. import javax.megaco.message.DescriptorType;
  3. import javax.megaco.pkg.ParamValueType;
  4. import javax.megaco.pkg.PkgConsts;
  5. import javax.megaco.pkg.PkgItemParam;
  6. /**
  7. * The MEGACO parameter class for the Tonelist Parameter is associated with Play
  8. * Tone signal of Tone Generator Package. This class defines all the static
  9. * information for this parameter.
  10. */
  11. public class ToneGenParamTl extends PkgItemParam {
  12. /**
  13. * Identifies Tone List parameter of the MEGACO Tone Generator Package. Its
  14. * value shall be set equal to 0x0001.
  15. */
  16. public static final int TONE_GEN_PARAM_IND = 0x0001;
  17. protected int[] paramsItemIds = null;
  18. /**
  19. * Constructs a parameter class for Tone Generator package that specifies
  20. * the parameter as tone list.
  21. */
  22. public ToneGenParamTl() {
  23. super();
  24. super.paramId = TONE_GEN_PARAM_IND;
  25. super.itemValueType = ParamValueType.M_STRING;
  26. super.paramsDescriptorIds = new int[] { DescriptorType.M_SIGNAL_DESC };
  27. this.paramsItemIds = new int[] { ToneGenPlayToneSignal.TONE_GEN_PLAY_TONE_SIGNAL };
  28. }
  29. /**
  30. * The method can be used to get the parameter identifier as defined in the
  31. * MEGACO packages. The implementation of this method in this class returns
  32. * Id of Tone List parameter.
  33. *
  34. * @return paramId - Returns param id as {@link TONE_GEN_PARAM_IND}.
  35. */
  36. public int getParamId() {
  37. return super.paramId;
  38. }
  39. /**
  40. * The method can be used to get the type of the parameter as defined in the
  41. * MEGACO packages. These could be one of string or enumerated value or
  42. * integer or double value or boolean.
  43. *
  44. * @return It returns {@link ParamValueType.M_STRING}
  45. * indicating that the parameter is a string.
  46. */
  47. public int getParamValueType() {
  48. return super.itemValueType;
  49. }
  50. /**
  51. * The method can be used to get the item ids corresponding to the
  52. * parameters to which the parameter can be set. This method specifies the
  53. * valid item (event/signal) ids to which the parameter can belong to.
  54. *
  55. * @return The integer value corresponding to Play Tone. Thus this shall
  56. * return {@link ContRspSignal.TONE_GEN_PLAY_TONE_SIGNAL}.
  57. */
  58. public int[] getParamsItemIds() {
  59. return this.paramsItemIds;
  60. }
  61. /**
  62. * The method can be used to get the package id corresponding to the to
  63. * which the parameter can be set. This method specifies the package for
  64. * which the parameter is valid. Even though the parameter may be set for an
  65. * item, but the parameter may not be valid for package to which the item
  66. * belongs, but may be valid for a package which has extended this package.
  67. *
  68. * @return This shall return {@link PkgConsts.TONE_GEN_PACKAGE} as the
  69. * integer value. The integer values are defined in
  70. * {@link PkgConsts}.
  71. */
  72. public int getParamsPkgId() {
  73. return PkgConsts.TONE_GEN_PACKAGE;
  74. }
  75. /**
  76. * The method can be used to get the descriptor ids corresponding to the
  77. * parameters to which the parameter can be set.
  78. *
  79. * @return This parameter can be present in Signal descriptor. It shall thus
  80. * return a value {@link DescriptorType.M_SIGNAL_DESC} as a part of
  81. * integer vector.
  82. */
  83. public int[] getParamsDescriptorIds() {
  84. return super.paramsDescriptorIds;
  85. }
  86. }