Skip to content

Commit 7e3b13f

Browse files
committed
MeetMeTalkingRequestEvent.java: Using @AsteriskMapping instead of creating a new event class
1 parent a7d8938 commit 7e3b13f

File tree

3 files changed

+28
-65
lines changed

3 files changed

+28
-65
lines changed

src/main/java/org/asteriskjava/manager/AbstractManagerEventListener.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ public void handleEvent(MeetMeTalkingEvent event) {
171171
public void handleEvent(MeetMeTalkingRequestEvent event) {
172172
}
173173

174-
public void handleEvent(MeetMeTalkRequestEvent event) {
175-
}
176-
177174
public void handleEvent(MonitorStartEvent event) {
178175
}
179176

src/main/java/org/asteriskjava/manager/event/MeetMeTalkRequestEvent.java

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/main/java/org/asteriskjava/manager/event/MeetMeTalkingRequestEvent.java

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,31 @@
1616
*/
1717
package org.asteriskjava.manager.event;
1818

19+
import org.asteriskjava.manager.AsteriskMapping;
20+
1921
/**
20-
* A MeetMeTalkingEvent is triggered when a muted user requests talking in a meet me
21-
* conference.<p>
22-
* To enable talker detection you must pass the option 'T' to the MeetMe application.<p>
23-
* It is implemented in <code>apps/app_meetme.c</code><p>
24-
* Available since Asterisk 1.6
25-
*
26-
* @deprecated You want {@link MeetMeTalkRequestEvent} instead.
22+
* A MeetMeTalkRequestEvent is triggered when a muted user requests talking in
23+
* a MeetMe conference.
2724
*
2825
* @author srt
2926
* @version $Id$
3027
* @since 1.0.0
3128
*/
29+
@AsteriskMapping("MeetMeTalkRequest")
3230
public class MeetMeTalkingRequestEvent extends AbstractMeetMeEvent {
3331
/**
3432
* Serializable version identifier.
3533
*/
36-
private static final long serialVersionUID = 0L;
34+
private static final long serialVersionUID = 1L;
3735

3836
private Boolean status;
37+
private Integer duration;
3938

4039
/**
41-
* @param source
40+
* Constructs a MeetMeTalkingRequestEvent
41+
*
42+
* @param source The object on which the Event initially occurred.
43+
* @throws IllegalArgumentException if source is null.
4244
*/
4345
public MeetMeTalkingRequestEvent(Object source) {
4446
super(source);
@@ -47,10 +49,24 @@ public MeetMeTalkingRequestEvent(Object source) {
4749
// see http://bugs.digium.com/view.php?id=9418
4850

4951
/**
50-
* Returns whether the user has started or stopped requesting talking.
52+
* The length of time (in seconds) that the MeetMe user has been in the
53+
* conference at the time of this event
54+
*
55+
* @return the number of seconds this user has been in the conference.
56+
*/
57+
public Integer getDuration() {
58+
return duration;
59+
}
60+
61+
public void setDuration(Integer duration) {
62+
this.duration = duration;
63+
}
64+
65+
/**
66+
* Returns whether the user has started or stopped requesting talking
5167
*
52-
* @return <code>true</code> if ther user has started requesting talking,
53-
* <code>false</code> if the user has stopped requesting talking.
68+
* @return {@code true} if the user has started requesting talking,
69+
* {@code false} if the user has stopped requesting talking.
5470
*/
5571
public Boolean getStatus() {
5672
return status;

0 commit comments

Comments
 (0)