示例#1
0
 /// <summary>
 /// Returns native access container entry.
 /// </summary>
 /// <returns></returns>
 internal AccessContainerEntryNative ToNative()
 {
     return(new AccessContainerEntryNative
     {
         ContainersPtr = BindingUtils.CopyFromObjectList(Containers),
         ContainersLen = (UIntPtr)(Containers?.Count ?? 0),
         ContainersCap = UIntPtr.Zero
     });
 }
示例#2
0
 internal MDataValueNative ToNative()
 {
     return(new MDataValueNative
     {
         ContentPtr = BindingUtils.CopyFromByteList(Content),
         ContentLen = (UIntPtr)(Content?.Count ?? 0),
         EntryVersion = EntryVersion
     });
 }
示例#3
0
 /// <summary>
 /// Returns native container request.
 /// </summary>
 /// <returns></returns>
 internal ContainersReqNative ToNative()
 {
     return(new ContainersReqNative
     {
         App = App,
         ContainersPtr = BindingUtils.CopyFromObjectList(Containers),
         ContainersLen = (UIntPtr)(Containers?.Count ?? 0),
         ContainersCap = UIntPtr.Zero
     });
 }
示例#4
0
 /// <summary>
 /// Initialise a new file object from native NFS file.
 /// </summary>
 /// <param name="native"></param>
 internal File(FileNative native)
 {
     Size         = native.Size;
     CreatedSec   = native.CreatedSec;
     CreatedNsec  = native.CreatedNsec;
     ModifiedSec  = native.ModifiedSec;
     ModifiedNsec = native.ModifiedNsec;
     UserMetadata = BindingUtils.CopyToByteList(native.UserMetadataPtr, (int)native.UserMetadataLen);
     DataMapName  = native.DataMapName;
 }
示例#5
0
 /// <summary>
 /// Returns ShareMDataReqNative
 /// </summary>
 /// <returns></returns>
 internal ShareMDataReqNative ToNative()
 {
     return(new ShareMDataReqNative
     {
         App = App,
         MDataPtr = BindingUtils.CopyFromObjectList(MData),
         MDataLen = (UIntPtr)(MData?.Count ?? 0),
         MDataCap = UIntPtr.Zero
     });
 }
示例#6
0
 internal AuthGrantedNative ToNative()
 {
     return(new AuthGrantedNative {
         AppKeys = AppKeys,
         AccessContainerInfo = AccessContainerInfo,
         AccessContainerEntry = AccessContainerEntry.ToNative(),
         BootstrapConfigPtr = BindingUtils.CopyFromByteList(BootstrapConfig),
         BootstrapConfigLen = (UIntPtr)(BootstrapConfig?.Count ?? 0),
         BootstrapConfigCap = UIntPtr.Zero
     });
 }
示例#7
0
 internal FileNative ToNative()
 {
     return(new FileNative {
         Size = Size,
         CreatedSec = CreatedSec,
         CreatedNsec = CreatedNsec,
         ModifiedSec = ModifiedSec,
         ModifiedNsec = ModifiedNsec,
         UserMetadataPtr = BindingUtils.CopyFromByteList(UserMetadata),
         UserMetadataLen = (UIntPtr)(UserMetadata?.Count ?? 0),
         UserMetadataCap = UIntPtr.Zero,
         DataMapName = DataMapName
     });
 }
示例#8
0
 /// <summary>
 /// Initialise new mutable data key from native key.
 /// </summary>
 /// <param name="native"></param>
 internal MDataKey(MDataKeyNative native)
 {
     Val = BindingUtils.CopyToByteList(native.ValPtr, (int)native.ValLen);
 }
示例#9
0
 /// <summary>
 /// Free the container pointer.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref ContainersPtr, ref ContainersLen);
 }
示例#10
0
 /// <summary>
 /// Initialise a new access container entry object from native access container entry
 /// </summary>
 /// <param name="native"></param>
 internal AccessContainerEntry(AccessContainerEntryNative native)
 {
     Containers = BindingUtils.CopyToObjectList <ContainerInfo>(native.ContainersPtr, (int)native.ContainersLen);
 }
示例#11
0
 /// <summary>
 /// Free bootstrap config pointer.
 /// </summary>
 internal void Free()
 {
     AccessContainerEntry.Free();
     BindingUtils.FreeList(ref BootstrapConfigPtr, ref BootstrapConfigLen);
 }
示例#12
0
 /// <summary>
 /// Free mutable data pointer.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref MDataPtr, ref MDataLen);
 }
示例#13
0
 /// <summary>
 /// Free the pointer to Mutable Data key.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref KeyPtr, ref KeyLen);
 }
示例#14
0
 /// <summary>
 /// Initialise new mutable data value
 /// </summary>
 /// <param name="native"></param>
 internal MDataValue(MDataValueNative native)
 {
     Content      = BindingUtils.CopyToByteList(native.ContentPtr, (int)native.ContentLen);
     EntryVersion = native.EntryVersion;
 }
示例#15
0
 /// <summary>
 /// Initialise new Mutable Data key from native key.
 /// </summary>
 /// <param name="native"></param>
 internal MDataKey(MDataKeyNative native)
 {
     Key = BindingUtils.CopyToByteList(native.KeyPtr, (int)native.KeyLen);
 }
示例#16
0
 /// <summary>
 /// Initialise a new container request object from native container request.
 /// </summary>
 /// <param name="native"></param>
 internal ContainersReq(ContainersReqNative native)
 {
     App        = native.App;
     Containers = BindingUtils.CopyToObjectList <ContainerPermissions>(native.ContainersPtr, (int)native.ContainersLen);
 }
示例#17
0
 /// <summary>
 /// Free user metadata pointer.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref UserMetadataPtr, ref UserMetadataLen);
 }
示例#18
0
 public UnregisteredIpcMsg(uint reqId, IntPtr serialisedCfgPtr, UIntPtr serialisedCfgLen)
 {
     ReqId         = reqId;
     SerialisedCfg = BindingUtils.CopyToByteList(serialisedCfgPtr, (int)serialisedCfgLen);
 }
示例#19
0
 /// <summary>
 /// Returns a native mutable data key.
 /// </summary>
 /// <returns></returns>
 internal MDataKeyNative ToNative()
 {
     return(new MDataKeyNative {
         ValPtr = BindingUtils.CopyFromByteList(Val), ValLen = (UIntPtr)(Val?.Count ?? 0)
     });
 }
示例#20
0
 /// <summary>
 /// Free the pointer to mutable data key.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref ValPtr, ref ValLen);
 }
示例#21
0
 /// <summary>
 /// Initialise a new mutable data share request object from native request.
 /// </summary>
 /// <param name="native"></param>
 internal ShareMDataReq(ShareMDataReqNative native)
 {
     App   = native.App;
     MData = BindingUtils.CopyToObjectList <ShareMData>(native.MDataPtr, (int)native.MDataLen);
 }
示例#22
0
 /// <summary>
 /// Free mutable data value (content) pointer.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref ContentPtr, ref ContentLen);
 }
示例#23
0
 /// <summary>
 /// Returns a native Mutable Data key.
 /// </summary>
 /// <returns></returns>
 internal MDataKeyNative ToNative()
 {
     return(new MDataKeyNative {
         KeyPtr = BindingUtils.CopyFromByteList(Key), KeyLen = (UIntPtr)(Key?.Count ?? 0)
     });
 }