@@ -0,0 +1,1320 @@
+package net.java.sip.communicator.service.protocol;%0A%0Aimport java.util.*;%0A%0Apublic class OperationSetInstantMessageTransformImpl implements%0A%09%09OperationSetInstantMessageTransform %7B%0A%0A%09public final Map%3CInteger, Vector%3CTransformLayer%3E%3E transformLayers = new Hashtable%3CInteger, Vector%3CTransformLayer%3E%3E();%0A%0A%09private static final int defaultPriority = 1;%0A%0A%09public void addTransformLayer(TransformLayer transformLayer) %7B%0A%09%09this.addTransformLayer(defaultPriority, transformLayer);%0A%09%7D%0A%0A%09public void addTransformLayer(int priority, TransformLayer transformLayer) %7B%0A%09%09synchronized (transformLayers) %7B%0A%09%09%09if (!transformLayers.containsKey(defaultPriority))%0A%09%09%09%09transformLayers.put(defaultPriority,%0A%09%09%09%09%09%09new Vector%3CTransformLayer%3E());%0A%0A%09%09%09transformLayers.get(defaultPriority).add(transformLayer);%0A%09%09%7D%0A%09%7D%0A%0A%09public boolean containsLayer(TransformLayer layer) %7B%0A%09%09synchronized (transformLayers) %7B%0A%09%09%09for (Map.Entry%3CInteger, Vector%3CTransformLayer%3E%3E entry : transformLayers%0A%09%09%09%09%09.entrySet()) %7B%0A%09%09%09%09if (entry.getValue().contains(layer))%0A%09%09%09%09%09return true;%0A%09%09%09%7D%0A%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A%0A%09public void removeTransformLayer(TransformLayer transformLayer) %7B%0A%09%09synchronized (transformLayers) %7B%0A%09%09%09for (Map.Entry%3CInteger, Vector%3CTransformLayer%3E%3E entry : transformLayers%0A%09%09%09%09%09.entrySet()) %7B%0A%09%09%09%09entry.getValue().remove(transformLayer);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Integrate the second big patch for OTR. With this patch all the required GSoC functions are available. Third commit.