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); }
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); }
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); }
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); }
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); }
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)); }
public IIPSPufferPluginCallBack(IIPSMobilePufferCallbackInterface imp) { pManagedObject = GCHandle.ToIntPtr(GCHandle.Alloc(imp, GCHandleType.Normal)); }