Exemple #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
     });
 }
 internal MDataValueNative ToNative()
 {
     return(new MDataValueNative
     {
         ContentPtr = BindingUtils.CopyFromByteList(Content),
         ContentLen = (UIntPtr)(Content?.Count ?? 0),
         EntryVersion = EntryVersion
     });
 }
 /// <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
     });
 }
 /// <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;
 }
 /// <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
     });
 }
Exemple #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
     });
 }
Exemple #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
     });
 }
 /// <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);
 }
 /// <summary>
 /// Free the container pointer.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref ContainersPtr, ref ContainersLen);
 }
 /// <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);
 }
 /// <summary>
 /// Free bootstrap config pointer.
 /// </summary>
 internal void Free()
 {
     AccessContainerEntry.Free();
     BindingUtils.FreeList(ref BootstrapConfigPtr, ref BootstrapConfigLen);
 }
 /// <summary>
 /// Free mutable data pointer.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref MDataPtr, ref MDataLen);
 }
Exemple #13
0
 /// <summary>
 /// Free the pointer to Mutable Data key.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref KeyPtr, ref KeyLen);
 }
 /// <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;
 }
Exemple #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);
 }
 /// <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);
 }
 /// <summary>
 /// Free user metadata pointer.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref UserMetadataPtr, ref UserMetadataLen);
 }
 public UnregisteredIpcMsg(uint reqId, IntPtr serialisedCfgPtr, UIntPtr serialisedCfgLen)
 {
     ReqId         = reqId;
     SerialisedCfg = BindingUtils.CopyToByteList(serialisedCfgPtr, (int)serialisedCfgLen);
 }
 /// <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)
     });
 }
 /// <summary>
 /// Free the pointer to mutable data key.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref ValPtr, ref ValLen);
 }
 /// <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);
 }
 /// <summary>
 /// Free mutable data value (content) pointer.
 /// </summary>
 internal void Free()
 {
     BindingUtils.FreeList(ref ContentPtr, ref ContentLen);
 }
Exemple #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)
     });
 }