Guest User

Untitled

a guest
Apr 20th, 2017
557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.81 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace PluginSystem
  8. {
  9.     public class ChunkInfo
  10.     {
  11.         public string id;
  12.         public string toc;
  13.         public string bundle;
  14.         public byte[] sha1;
  15.         public ChunkInfo(string _id, string _toc, string _bundle, byte[] _sha1)
  16.         {
  17.             id = _id;
  18.             toc = _toc;
  19.             bundle = _bundle;
  20.             sha1 = _sha1;
  21.         }
  22.     }
  23.  
  24.     public class DataInfo
  25.     {
  26.         public int type; //0=ebx
  27.         public string path;
  28.         public string toc;
  29.         public string bundle;
  30.         public byte[] sha1;
  31.         public byte[] idata;
  32.         public DataInfo(int _type, string _path, string _toc, string _bundle, byte[] _sha1, byte[] _idata)
  33.         {
  34.             type = _type;
  35.             path = _path;
  36.             toc = _toc;
  37.             bundle = _bundle;
  38.             sha1 = _sha1;
  39.             idata = _idata;
  40.         }
  41.     }
  42.  
  43.     public interface IPlugin
  44.     {
  45.         IPluginHost Host { get; set; }
  46.         string Name { get; }
  47.         void Do();
  48.         void RunModJob(byte[] payload);
  49.     }
  50.  
  51.     public interface IPluginHost
  52.     {
  53.         List<string> getTOCFiles();
  54.         List<string> getTOCFileLabels();
  55.         List<string> getBundleNames(string toc);
  56.         List<DataInfo> getAllEBX(string toc, string bundle);
  57.         List<DataInfo> getAllRES(string toc, string bundle);
  58.         List<ChunkInfo> getAllTocCHUNKs(string toc);
  59.         List<ChunkInfo> getAllBundleCHUNKs(string toc, string bundle);
  60.         byte[] getDataBySha1(byte[] sha1);
  61.         int setDataBySha1(byte[] data, byte[] sha1, string toc);
  62.         void setAutoPatching(bool value);
  63.         void AddModJob(string description, byte[] payload);
  64.     }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment