Exemplo n.º 1
0
            internal static unsafe bool Invoke(IntPtr obj, EMagicLeapPrivilege Privilege)
            {
                long *p = stackalloc long[] { 0L, 0L };
                byte *b = (byte *)p;

                *(b + 0) = (byte)Privilege;
                Main.GetProcessEvent(obj, RequestPrivilege_ptr, new IntPtr(p));;
                return(*((bool *)(b + 1)));
            }
        }
Exemplo n.º 2
0
            internal static unsafe bool Invoke(IntPtr obj, EMagicLeapPrivilege Privilege, byte ResultDelegate /*TODO: delegate FPrivilegeRequestDelegate */)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *(b + 0) = (byte)Privilege;
                throw new NotImplementedException(); //TODO: delegate FPrivilegeRequestDelegate ResultDelegate
                Main.GetProcessEvent(obj, RequestPrivilegeAsync_ptr, new IntPtr(p));;
                //TODO: delegate FPrivilegeRequestDelegate ResultDelegate
                return(*((bool *)(b + 24)));
            }
        }
Exemplo n.º 3
0
 ///<summary>Request the specified privilege asynchronously.</summary>
 ///<remarks>
 ///This may possibly solicit consent from the end-user. Result will be delivered
 ///to the specified delegate.
 ///@param Privilege The privilege to request.
 ///@param ResultDelegate Callback which reports the result of the request.
 ///@return True if the privilege request was successfully dispatched, false otherwise.
 ///</remarks>
 public bool RequestPrivilegeAsync(EMagicLeapPrivilege Privilege, byte ResultDelegate /*TODO: delegate FPrivilegeRequestDelegate */) =>
 MagicLeapPrivileges_methods.RequestPrivilegeAsync_method.Invoke(ObjPointer, Privilege, ResultDelegate);
Exemplo n.º 4
0
 ///<summary>Request the specified privilege.</summary>
 ///<remarks>
 ///This may possibly solicit consent from the end-user; if so it will block.
 ///@param Privilege The privilege to request.
 ///@return True if the privilege is granted, false otherwise.
 ///</remarks>
 public bool RequestPrivilege(EMagicLeapPrivilege Privilege) =>
 MagicLeapPrivileges_methods.RequestPrivilege_method.Invoke(ObjPointer, Privilege);
Exemplo n.º 5
0
 ///<summary>Check whether the application has the specified privilege.</summary>
 ///<remarks>
 ///This does not solicit consent from the end-user and is non-blocking.
 ///@param Privilege The privilege to check.
 ///@return True if the privilege is granted, false otherwise.
 ///</remarks>
 public bool CheckPrivilege(EMagicLeapPrivilege Privilege) =>
 MagicLeapPrivileges_methods.CheckPrivilege_method.Invoke(ObjPointer, Privilege);