mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 00:50:47 +00:00
format proxy code, allow to change swf on the fly
This commit is contained in:
@@ -27,6 +27,8 @@ import com.jpexs.decompiler.flash.action.ActionList;
|
||||
*/
|
||||
public interface SWFDecompilerListener {
|
||||
|
||||
byte[] proxyFileCatched(byte[] data);
|
||||
|
||||
void swfParsed(SWF swf);
|
||||
|
||||
void actionListParsed(ActionList actions, SWF swf);
|
||||
|
||||
@@ -80,6 +80,22 @@ public class SWFDecompilerPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] fireProxyFileCatched(byte[] data) {
|
||||
byte[] result = null;
|
||||
for (SWFDecompilerListener listener : listeners) {
|
||||
try {
|
||||
byte[] newResult = listener.proxyFileCatched(data);
|
||||
if (newResult != null) {
|
||||
result = newResult;
|
||||
data = newResult;
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
logger.log(Level.SEVERE, "Failed to call plugin method proxyFileCatched.", e);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static boolean fireSwfParsed(SWF swf) {
|
||||
for (SWFDecompilerListener listener : listeners) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user