Move security events back from libjitsi as they are solely used here.

Corresponds to commit jitsi/libjitsi@263cc1e53e4d2ebd3f4762c42b2c27462b4d830c
smack4
Ingo Bauersachs 10 years ago
parent 662fcc824c
commit 3c4c8d5254

@ -40,7 +40,6 @@
import net.java.sip.communicator.util.skin.*;
import org.jitsi.service.neomedia.*;
import org.jitsi.service.protocol.event.*;
import org.jitsi.util.swing.*;
/**

@ -35,7 +35,6 @@
import org.jitsi.service.configuration.*;
import org.jitsi.service.neomedia.*;
import org.jitsi.service.protocol.event.*;
import org.jitsi.service.resources.*;
import org.jitsi.util.event.*;

@ -30,7 +30,6 @@
import net.java.sip.communicator.util.skin.*;
import org.jitsi.service.neomedia.*;
import org.jitsi.service.protocol.event.*;
/**
* The basic panel used to render any conference participant. Meant to be

@ -28,8 +28,6 @@
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.skin.*;
import org.jitsi.service.protocol.event.*;
/**
* Depicts a specific <tt>CallPeer</tt> who is a focus of a telephony conference
* and the <tt>ConferenceMember</tt>s whom the specified <tt>CallPeer</tt> is

@ -36,7 +36,6 @@
import net.java.sip.communicator.util.call.CallPeerAdapter;
import org.jitsi.service.neomedia.*;
import org.jitsi.service.protocol.event.*;
import org.jitsi.service.resources.*;
/**

@ -73,7 +73,6 @@ Import-Package: com.apple.eawt,
org.jitsi.service.neomedia.format,
org.jitsi.service.neomedia.recording,
org.jitsi.service.protocol,
org.jitsi.service.protocol.event,
org.jitsi.service.resources,
org.jitsi.util,
org.jitsi.util.event,

@ -25,7 +25,6 @@
import net.java.sip.communicator.impl.protocol.jabber.extensions.jingle.ContentPacketExtension.SendersEnum;
import net.java.sip.communicator.impl.protocol.jabber.jinglesdp.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.media.*;
import net.java.sip.communicator.util.*;
import org.jitsi.service.neomedia.*;

@ -31,8 +31,8 @@
import org.apache.commons.lang3.*;
import org.jitsi.service.neomedia.*;
import org.jitsi.service.neomedia.event.*;
import org.jitsi.service.neomedia.recording.*;
import org.jitsi.service.protocol.event.*;
import org.jitsi.service.resources.*;
import org.osgi.framework.*;
@ -1649,17 +1649,17 @@ public void securityMessageRecieved(CallPeerSecurityMessageEvent ev)
switch (ev.getEventSeverity())
{
// Don't play alert sound for Info or warning.
case CallPeerSecurityMessageEvent.INFORMATION:
case SrtpListener.INFORMATION:
messageTitleKey = "service.gui.SECURITY_INFO";
break;
case CallPeerSecurityMessageEvent.WARNING:
case SrtpListener.WARNING:
messageTitleKey = "service.gui.SECURITY_WARNING";
break;
// Security cannot be established! Play an alert sound.
case CallPeerSecurityMessageEvent.SEVERE:
case CallPeerSecurityMessageEvent.ERROR:
case SrtpListener.SEVERE:
case SrtpListener.ERROR:
messageTitleKey = "service.gui.SECURITY_ERROR";
fireNotification(CALL_SECURITY_ERROR);
break;

@ -15,7 +15,6 @@ Import-Package: javax.imageio,
net.java.sip.communicator.plugin.desktoputil,
org.jitsi.service.neomedia,
org.jitsi.service.neomedia.recording,
org.jitsi.service.protocol.event,
org.jitsi.service.resources,
org.osgi.framework,
org.apache.commons.lang3

@ -23,7 +23,6 @@
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.*;
import org.jitsi.service.protocol.event.*;
import org.jitsi.util.event.*;
/**

@ -23,8 +23,6 @@
import net.java.sip.communicator.service.protocol.event.*;
import org.jitsi.service.protocol.event.*;
/**
* The CallPeer is an interface that represents peers in a call.
* Users of the UIService need to implement this interface (or one of its

@ -19,8 +19,6 @@
import java.util.*;
import org.jitsi.service.protocol.event.*;
/**
* CallPeerSecurityListener interface extends EventListener. This is the
* listener interface used to handle an event related with a change in security

@ -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;
}
}

@ -20,7 +20,6 @@
import net.java.sip.communicator.service.protocol.*;
import org.jitsi.service.neomedia.*;
import org.jitsi.service.protocol.event.*;
/**
* The <tt>CallPeerSecurityNegotiationStartedEvent</tt> is triggered whenever a

@ -19,8 +19,6 @@
import net.java.sip.communicator.service.protocol.*;
import org.jitsi.service.protocol.event.*;
/**
* The <tt>CallPeerSecurityAuthenticationEvent</tt> is triggered whenever
* a the security strings are received in a secure call.

@ -20,7 +20,6 @@
import net.java.sip.communicator.service.protocol.*;
import org.jitsi.service.neomedia.*;
import org.jitsi.service.protocol.event.*;
/**
* The <tt>CallPeerSecurityOnEvent</tt> is triggered whenever a

@ -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;
}
}

@ -19,8 +19,6 @@
import net.java.sip.communicator.service.protocol.*;
import org.jitsi.service.protocol.event.*;
/**
* The <tt>CallPeerSecurityTimeoutEvent</tt> is triggered whenever a
* communication with a given peer cannot be established, the peer

@ -26,7 +26,6 @@
import org.jitsi.service.neomedia.*;
import org.jitsi.service.neomedia.event.*;
import org.jitsi.service.protocol.event.*;
/**
* A utility class implementing media control code shared between current

@ -12,7 +12,6 @@ Import-Package: net.java.sip.communicator.service.credentialsstorage,
org.jitsi.service.neomedia,
org.jitsi.service.neomedia.codec,
org.jitsi.service.neomedia.recording,
org.jitsi.service.protocol.event,
org.jitsi.service.resources,
org.jitsi.util,
org.jitsi.util.event,

@ -23,8 +23,6 @@
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import org.jitsi.service.protocol.event.*;
/**
* <tt>CallPeerAdapter</tt> implements common <tt>CallPeer</tt> related
* listeners in order to facilitate the task of implementing

@ -14,7 +14,6 @@ Import-Package: junit.framework,
net.java.sip.communicator.impl.protocol.mock,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event,
org.jitsi.service.protocol.event,
org.osgi.framework,
org.w3c.dom,
javax.xml.parsers,

@ -13,5 +13,5 @@ Import-Package: net.java.sip.communicator.service.contactlist,
org.jitsi.service.configuration,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.icqconstants,
net.java.sip.communicator.service.protocol.event,org.jitsi.service.protocol.event,
net.java.sip.communicator.service.protocol.event,
net.java.sip.communicator.impl.protocol.mock

@ -15,7 +15,7 @@ Import-Package: junit.framework,
net.java.sip.communicator.service.metahistory,
net.java.sip.communicator.impl.protocol.mock,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event,org.jitsi.service.protocol.event,
net.java.sip.communicator.service.protocol.event,
org.osgi.framework,
org.w3c.dom,
javax.xml.parsers,

@ -12,7 +12,7 @@ Import-Package: junit.framework,
net.java.sip.communicator.service.msghistory,
net.java.sip.communicator.impl.protocol.mock,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event,org.jitsi.service.protocol.event,
net.java.sip.communicator.service.protocol.event,
com.google.common.xml,
com.google.common.escape,
org.osgi.framework,

@ -10,4 +10,4 @@ Import-Package: org.jitsi.service.configuration,
net.java.sip.communicator.util,
net.java.sip.communicator.service.dns,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event,org.jitsi.service.protocol.event
net.java.sip.communicator.service.protocol.event

@ -13,5 +13,5 @@ Import-Package: junit.framework,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.icqconstants,
net.java.sip.communicator.service.protocol.aimconstants,
net.java.sip.communicator.service.protocol.event,org.jitsi.service.protocol.event,
net.java.sip.communicator.service.protocol.event,
org.jitsi.service.fileaccess

@ -15,5 +15,5 @@ Import-Package: org.jitsi.service.configuration,
net.java.sip.communicator.service.dns,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.jabberconstants,
net.java.sip.communicator.service.protocol.event,org.jitsi.service.protocol.event,
net.java.sip.communicator.service.protocol.event,
org.jitsi.service.fileaccess

@ -15,7 +15,7 @@ Import-Package: org.jitsi.service.configuration,
org.jitsi.util.xml,
net.java.sip.communicator.service.dns,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event,org.jitsi.service.protocol.event,
net.java.sip.communicator.service.protocol.event,
net.java.sip.communicator.impl.protocol.sip,
net.java.sip.communicator.impl.protocol.sip.net,
net.java.sip.communicator.impl.protocol.sip.xcap,

@ -13,5 +13,5 @@ Import-Package: org.jitsi.service.configuration,
net.java.sip.communicator.service.dns,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.yahooconstants,
net.java.sip.communicator.service.protocol.event,org.jitsi.service.protocol.event,
net.java.sip.communicator.service.protocol.event,
org.jitsi.service.fileaccess

@ -10,7 +10,7 @@ Import-Package: org.osgi.framework,
org.jitsi.service.configuration,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.icqconstants,
net.java.sip.communicator.service.protocol.event,org.jitsi.service.protocol.event,
net.java.sip.communicator.service.protocol.event,
net.java.sip.communicator.service.contactlist,
net.java.sip.communicator.service.contactlist.event,
net.java.sip.communicator.service.gui,

Loading…
Cancel
Save