PageRenderTime 112ms CodeModel.GetById 60ms app.highlight 4ms RepoModel.GetById 26ms app.codeStats 1ms

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