Ejemplo n.º 1
0
        public bool UpdateProgram(Guid guid, ProgramSet.Config config, UInt64 expiration = 0)
        {
            List <byte[]> args = new List <byte[]>();

            args.Add(PutGuid(guid));
            args.Add(PutConfig(config));
            args.Add(PutUInt64(expiration));
            List <byte[]> ret = RemoteExec("UpdateProgram", args);

            return(ret != null?GetBool(ret[0]) : false);
        }
Ejemplo n.º 2
0
        public bool UpdateProgram(Guid guid, ProgramSet.Config config, UInt64 expiration = 0)
        {
            ProgramSet progs;

            if (!ProgramSets.TryGetValue(guid, out progs))
            {
                return(false);
            }
            progs.config = config;

            App.engine.FirewallManager.ApplyRules(progs, expiration);

            Changed?.Invoke(this, new ListEvent()
            {
                guid = progs.guid
            });

            return(true);
        }
Ejemplo n.º 3
0
 public bool UpdateProgram(Guid guid, ProgramSet.Config config, UInt64 expiration = 0)
 {
     return(RemoteExec("UpdateProgram", new object[3] {
         guid, config, expiration
     }, false));
 }
Ejemplo n.º 4
0
 protected byte[] PutConfig(ProgramSet.Config config)
 {
     return(PutXmlObj(config));
 }