Beispiel #1
0
 public ulong MgrGetMemorySize()
 {
     if (this.mVersionMgr == IntPtr.Zero)
     {
         return(0uL);
     }
     return(VersionMgr.GetMemorySize(this.mVersionMgr));
 }
Beispiel #2
0
 public void DeleteCppVersionManager()
 {
     if (this.mVersionMgr != IntPtr.Zero)
     {
         VersionMgr.ReleaseVersionManager(this.mVersionMgr);
         this.mVersionMgr = IntPtr.Zero;
     }
 }
Beispiel #3
0
 public uint MgrGetActionDownloadSpeed()
 {
     if (this.mVersionMgr == IntPtr.Zero)
     {
         return(0u);
     }
     return(VersionMgr.GetActionDownloadSpeed(this.mVersionMgr));
 }
Beispiel #4
0
 public short MgrGetCurDataVersion()
 {
     if (this.mVersionMgr == IntPtr.Zero)
     {
         return(0);
     }
     return(VersionMgr.GetCurDataVersion(this.mVersionMgr));
 }
Beispiel #5
0
 public uint MgrGetVersionMgrLastError()
 {
     if (this.mVersionMgr == IntPtr.Zero)
     {
         return(1u);
     }
     return(VersionMgr.GetVersionMgrLastError(this.mVersionMgr));
 }
Beispiel #6
0
 public void MgrCancelUpdate()
 {
     if (this.mVersionMgr == IntPtr.Zero)
     {
         return;
     }
     VersionMgr.CancelUpdate(this.mVersionMgr);
 }
Beispiel #7
0
 public bool MgrPoll()
 {
     if (this.mVersionMgr == IntPtr.Zero)
     {
         return(false);
     }
     VersionMgr.PoolVersionManager(this.mVersionMgr);
     return(true);
 }
Beispiel #8
0
        public bool MgrInitVersionManager(IIPSMobileVersionCallBack callBack, uint bufferSize, byte[] configBuffer)
        {
            if (this.mVersionMgr == IntPtr.Zero)
            {
                return(false);
            }
            GCHandle gCHandle      = GCHandle.Alloc(configBuffer, 3);
            IntPtr   configBuffer2 = gCHandle.AddrOfPinnedObject();

            gCHandle.Free();
            return(VersionMgr.InitVersionMgr(this.mVersionMgr, callBack.mCallBack, bufferSize, configBuffer2) > 0);
        }
Beispiel #9
0
 public void DeleteVersionMgr()
 {
     if (this.vMgr != null)
     {
         this.vMgr.DeleteCppVersionManager();
         this.vMgr = null;
     }
     if (this.mCallback != null)
     {
         this.mCallback.DeleteCppVersionCallBack();
         this.mCallback = null;
     }
 }
Beispiel #10
0
        public bool MgrSetNextStage(bool goonWork)
        {
            if (this.mVersionMgr == IntPtr.Zero)
            {
                return(false);
            }
            byte goonWork2 = 0;

            if (goonWork)
            {
                goonWork2 = 1;
            }
            return(VersionMgr.SetNextStage(this.mVersionMgr, goonWork2) > 0);
        }
Beispiel #11
0
 public IIPSMobileVersionMgrInterface CreateVersionMgr(IIPSMobileVersionCallBackInterface CallbackImp, string config)
 {
     if (this.vMgr == null)
     {
         this.vMgr = new VersionMgr();
         this.vMgr.CreateCppVersionManager();
         this.mCallback = new IIPSMobileVersionCallBack(CallbackImp);
         this.mCallback.CreateCppVersionInfoCallBack();
         if (!this.vMgr.MgrInitVersionManager(this.mCallback, (uint)config.Length, Encoding.ASCII.GetBytes(config)))
         {
             this.mLastErr = this.vMgr.MgrGetVersionMgrLastError();
             return(null);
         }
     }
     return(this.vMgr);
 }
        public IIPSMobileVersionMgrInterface CreateVersionMgr(IIPSMobileVersionCallBackInterface CallbackImp, string config)
        {
            if (vMgr != null)
            {
                return(vMgr);
            }
            vMgr = new VersionMgr();
            vMgr.CreateCppVersionManager();
            mCallback = new IIPSMobileVersionCallBack(CallbackImp);
            mCallback.CreateCppVersionInfoCallBack();
            bool ret = vMgr.MgrInitVersionManager(mCallback, (uint)config.Length, System.Text.Encoding.ASCII.GetBytes(config));

            if (!ret)
            {
                mLastErr = vMgr.MgrGetVersionMgrLastError();
                return(null);
            }
            else
            {
                return(vMgr);
            }
        }
Beispiel #13
0
 public bool MgrUnitVersionManager()
 {
     return(!(this.mVersionMgr == IntPtr.Zero) && VersionMgr.UnitVersionMgr(this.mVersionMgr) > 0);
 }
Beispiel #14
0
 public void CreateCppVersionManager()
 {
     this.mVersionMgr = VersionMgr.CreateVersionManager();
 }
Beispiel #15
0
 public bool MgrCheckAppUpdate()
 {
     return(!(this.mVersionMgr == IntPtr.Zero) && VersionMgr.CheckAppUpdate(this.mVersionMgr) > 0);
 }