Exemple #1
0
        private static void OnDecodeIpcReqShareMDataCb(IntPtr userData, uint reqId, IntPtr authReq, IntPtr metadataPtr, UIntPtr metadataLen)
        {
            var tcs                  = BindingUtils.FromHandlePtr <TaskCompletionSource <IpcReq> >(userData);
            var shareMdReq           = new ShareMDataReq(Marshal.PtrToStructure <ShareMDataReqNative>(authReq));
            var metadataResponseList = BindingUtils.CopyToObjectList <MetadataResponse>(metadataPtr, (int)metadataLen);

            tcs.SetResult(new ShareMDataIpcReq(reqId, shareMdReq, metadataResponseList));
        }
Exemple #2
0
        public Task <string> EncodeShareMDataRespAsync(IntPtr auth, ref ShareMDataReq req, uint reqId, bool isGranted)
        {
            var reqNative = req.ToNative();

            var(ret, userData) = BindingUtils.PrepareTask <string>();
            EncodeShareMDataRespNative(auth, ref reqNative, reqId, isGranted, userData, DelegateOnFfiResultStringCb);
            reqNative.Free();
            return(ret);
        }
Exemple #3
0
 public ShareMDataIpcReq(uint reqId, ShareMDataReq shareMDataReq, List <MetadataResponse> metadataResponseList)
 {
     ReqId            = reqId;
     ShareMDataReq    = shareMDataReq;
     MetadataResponse = metadataResponseList;
 }
Exemple #4
0
 public ShareMDataIpcReq(uint reqId, ShareMDataReq shareMDataReq, MetadataResponse metadataResponse)
 {
     ReqId            = reqId;
     ShareMDataReq    = shareMDataReq;
     MetadataResponse = metadataResponse;
 }