Пример #1
0
        public unsafe GLib.Credentials ReceiveCredentials(GLib.Cancellable cancellable)
        {
            IntPtr error   = IntPtr.Zero;
            IntPtr raw_ret = g_unix_connection_receive_credentials(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);

            GLib.Credentials ret = GLib.Object.GetObject(raw_ret) as GLib.Credentials;
            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }
            return(ret);
        }
Пример #2
0
        public unsafe GLib.Credentials ReceiveCredentialsFinish(GLib.IAsyncResult result)
        {
            IntPtr error   = IntPtr.Zero;
            IntPtr raw_ret = g_unix_connection_receive_credentials_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);

            GLib.Credentials ret = GLib.Object.GetObject(raw_ret) as GLib.Credentials;
            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }
            return(ret);
        }
Пример #3
0
        public unsafe bool IsSameUser(GLib.Credentials other_credentials)
        {
            IntPtr error   = IntPtr.Zero;
            bool   raw_ret = g_credentials_is_same_user(Handle, other_credentials == null ? IntPtr.Zero : other_credentials.Handle, out error);
            bool   ret     = raw_ret;

            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }
            return(ret);
        }
Пример #4
0
 public UnixCredentialsMessage(GLib.Credentials credentials) : base(IntPtr.Zero)
 {
     if (GetType() != typeof(UnixCredentialsMessage))
     {
         var vals  = new List <GLib.Value> ();
         var names = new List <string> ();
         if (credentials != null)
         {
             names.Add("credentials");
             vals.Add(new GLib.Value(credentials));
         }
         CreateNativeObject(names.ToArray(), vals.ToArray());
         return;
     }
     Raw = g_unix_credentials_message_new_with_credentials(credentials == null ? IntPtr.Zero : credentials.Handle);
 }