mirror of https://github.com/sipwise/jitsi.git
Corresponds to commit jitsi/libjitsi@263cc1e53e4d2ebd3f4762c42b2c27462b4d830csmack4
parent
662fcc824c
commit
3c4c8d5254
@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
|
||||
*
|
||||
* Distributable under LGPL license.
|
||||
* See terms of license at gnu.org.
|
||||
*/
|
||||
package net.java.sip.communicator.service.protocol.event;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* The <tt>CallPeerSecurityFailedEvent</tt> is triggered whenever
|
||||
* a problem has occurred during call security process.
|
||||
*
|
||||
* @author Yana Stamcheva
|
||||
* @author Werner Dittmann
|
||||
*/
|
||||
public class CallPeerSecurityMessageEvent
|
||||
extends EventObject
|
||||
{
|
||||
/**
|
||||
* Serial version UID.
|
||||
*/
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* The internationalized message associated with this event.
|
||||
*/
|
||||
private final String eventI18nMessage;
|
||||
|
||||
/**
|
||||
* The message associated with this event.
|
||||
*/
|
||||
private final String eventMessage;
|
||||
|
||||
/**
|
||||
* The severity of the security message event.
|
||||
*/
|
||||
private final int eventSeverity;
|
||||
|
||||
/**
|
||||
* Creates a <tt>CallPeerSecurityFailedEvent</tt> by specifying the
|
||||
* call peer, event type and message associated with this event.
|
||||
*
|
||||
* @param source the object on which the event initially occurred
|
||||
* @param eventMessage the message associated with this event.
|
||||
* @param i18nMessage the internationalized message associated with this
|
||||
* event that could be shown to the user.
|
||||
* @param eventSeverity severity level.
|
||||
*/
|
||||
public CallPeerSecurityMessageEvent(
|
||||
Object source,
|
||||
String eventMessage,
|
||||
String i18nMessage,
|
||||
int eventSeverity)
|
||||
{
|
||||
super(source);
|
||||
|
||||
this.eventMessage = eventMessage;
|
||||
this.eventI18nMessage = i18nMessage;
|
||||
this.eventSeverity = eventSeverity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message associated with this event.
|
||||
*
|
||||
* @return the message associated with this event.
|
||||
*/
|
||||
public String getMessage()
|
||||
{
|
||||
return eventMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the internationalized message associated with this event.
|
||||
*
|
||||
* @return the internationalized message associated with this event.
|
||||
*/
|
||||
public String getI18nMessage()
|
||||
{
|
||||
return eventI18nMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the event severity.
|
||||
*
|
||||
* @return the eventSeverity
|
||||
*/
|
||||
public int getEventSeverity()
|
||||
{
|
||||
return eventSeverity;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
|
||||
*
|
||||
* Distributable under LGPL license.
|
||||
* See terms of license at gnu.org.
|
||||
*/
|
||||
package net.java.sip.communicator.service.protocol.event;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Parent class for SecurityOn and SecurityOff events.
|
||||
*
|
||||
* @author Yana Stamcheva
|
||||
*/
|
||||
public abstract class CallPeerSecurityStatusEvent
|
||||
extends EventObject
|
||||
{
|
||||
/**
|
||||
* Serial version UID.
|
||||
*/
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* Constant value defining that security is enabled.
|
||||
*/
|
||||
public static final int AUDIO_SESSION = 1;
|
||||
|
||||
/**
|
||||
* Constant value defining that security is disabled.
|
||||
*/
|
||||
public static final int VIDEO_SESSION = 2;
|
||||
|
||||
/**
|
||||
* Session type of the event {@link #AUDIO_SESSION} or
|
||||
* {@link #VIDEO_SESSION}.
|
||||
*/
|
||||
private final int sessionType;
|
||||
|
||||
/**
|
||||
* Constructor required by the EventObject.
|
||||
*
|
||||
* @param source the source object for this event.
|
||||
* @param sessionType either <code>AUDIO_SESSION</code> or
|
||||
* <code>VIDEO_SESSION</code> to indicate the type of the
|
||||
* session
|
||||
*/
|
||||
public CallPeerSecurityStatusEvent(Object source, int sessionType)
|
||||
{
|
||||
super(source);
|
||||
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the type of the session, either AUDIO_SESSION or VIDEO_SESSION.
|
||||
*
|
||||
* @return the type of the session, either AUDIO_SESSION or VIDEO_SESSION.
|
||||
*/
|
||||
public int getSessionType()
|
||||
{
|
||||
return sessionType;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue