Example #1
0
        public static void OnInitReturn(System.IntPtr callback, bool isSuccess, System.UInt32 errorCode)
        {
            GCHandle handle = GCHandle.FromIntPtr(callback);

            mImpCB = (IIPSMobilePufferCallbackInterface)handle.Target;
            mImpCB.OnPufferInitReturn(isSuccess, errorCode);
        }
Example #2
0
        public static void OnInitProgress(System.IntPtr callback, System.UInt32 stage, System.UInt32 nowSize, System.UInt32 totalSize)
        {
            GCHandle handle = GCHandle.FromIntPtr(callback);

            mImpCB = (IIPSMobilePufferCallbackInterface)handle.Target;
            mImpCB.OnPufferInitProgress(stage, nowSize, totalSize);
        }
Example #3
0
        public static void OnDownloadBatchProgress(System.IntPtr callback, System.UInt64 batchTaskId, System.UInt64 nowSize, System.UInt64 totalSize)
        {
            GCHandle handle = GCHandle.FromIntPtr(callback);

            mImpCB = (IIPSMobilePufferCallbackInterface)handle.Target;
            mImpCB.OnPufferDownloadBatchProgress(batchTaskId, nowSize, totalSize);
        }
Example #4
0
        public static void OnDownloadBatchReturn(System.IntPtr callback, System.UInt64 batchTaskId, System.UInt32 fileid, bool isSuccess, System.UInt32 errorCode, System.UInt32 batchType, string strRet)
        {
            GCHandle handle = GCHandle.FromIntPtr(callback);

            mImpCB = (IIPSMobilePufferCallbackInterface)handle.Target;
            mImpCB.OnPufferDownloadBatchReturn(batchTaskId, fileid, isSuccess, errorCode, batchType, strRet);
        }
Example #5
0
        public static void OnDownloadReturn(System.IntPtr callback, System.UInt64 taskId, System.UInt32 fileid, bool isSuccess, System.UInt32 errorCode)
        {
            GCHandle handle = GCHandle.FromIntPtr(callback);

            mImpCB = (IIPSMobilePufferCallbackInterface)handle.Target;
            mImpCB.OnPufferDownloadReturn(taskId, fileid, isSuccess, errorCode);
        }
Example #6
0
        public bool PufferPluginInit(IIPSMobilePufferCallbackInterface cb, string config)
        {
            mCallback = new IIPSPufferPluginCallBack(cb);
            mCallback.CreateCppPufferCallBack();
            if (mCppPufferMgr == System.IntPtr.Zero)
            {
                return(false);
            }
            byte[]   configBuffer = System.Text.Encoding.ASCII.GetBytes(config);
            GCHandle pinnedArray  = GCHandle.Alloc(configBuffer, GCHandleType.Pinned);

            System.IntPtr configPointer = pinnedArray.AddrOfPinnedObject();
            pinnedArray.Free();
            return(InitPufferManager(mCppPufferMgr, mCallback.mCallBack, (System.UInt32)config.Length, configPointer));
        }
Example #7
0
 public IIPSPufferPluginCallBack(IIPSMobilePufferCallbackInterface imp)
 {
     pManagedObject = GCHandle.ToIntPtr(GCHandle.Alloc(imp, GCHandleType.Normal));
 }