Esempio n. 1
0
File: Global.cs Progetto: MrJoe/lat
		public static IntPtr FindNetworkPassword(string user, string domain, string server, string objekt, string protocol, string authtype, uint port, GnomeKeyring.OperationGetListCallback cb) {
			IntPtr user_as_native = GLib.Marshaller.StringToPtrGStrdup (user);
			IntPtr domain_as_native = GLib.Marshaller.StringToPtrGStrdup (domain);
			IntPtr server_as_native = GLib.Marshaller.StringToPtrGStrdup (server);
			IntPtr objekt_as_native = GLib.Marshaller.StringToPtrGStrdup (objekt);
			IntPtr protocol_as_native = GLib.Marshaller.StringToPtrGStrdup (protocol);
			IntPtr authtype_as_native = GLib.Marshaller.StringToPtrGStrdup (authtype);
			GnomeKeyringSharp.OperationGetListCallbackWrapper cb_wrapper;
			IntPtr data;
			GLib.DestroyNotify destroy_data;
			if (cb == null) {
				cb_wrapper = null;
				data = IntPtr.Zero;
				destroy_data = null;
			} else {
				cb_wrapper = new GnomeKeyringSharp.OperationGetListCallbackWrapper (cb);
				data = (IntPtr) GCHandle.Alloc (cb_wrapper);
				destroy_data = GLib.DestroyHelper.NotifyHandler;
			}
			IntPtr raw_ret = gnome_keyring_find_network_password(user_as_native, domain_as_native, server_as_native, objekt_as_native, protocol_as_native, authtype_as_native, port, cb_wrapper.NativeDelegate, data, destroy_data);
			IntPtr ret = raw_ret;
			GLib.Marshaller.Free (user_as_native);
			GLib.Marshaller.Free (domain_as_native);
			GLib.Marshaller.Free (server_as_native);
			GLib.Marshaller.Free (objekt_as_native);
			GLib.Marshaller.Free (protocol_as_native);
			GLib.Marshaller.Free (authtype_as_native);
			return ret;
		}
Esempio n. 2
0
File: Global.cs Progetto: MrJoe/lat
        public static IntPtr FindItems(GnomeKeyring.ItemType type, Attribute[] attributes, GnomeKeyring.OperationGetListCallback cb)
        {
            IntPtr native_attributes = toGArray(attributes);

            GnomeKeyringSharp.OperationGetListCallbackWrapper cb_wrapper;
            IntPtr data;

            GLib.DestroyNotify destroy_data;
            if (cb == null)
            {
                cb_wrapper   = null;
                data         = IntPtr.Zero;
                destroy_data = null;
            }
            else
            {
                cb_wrapper   = new GnomeKeyringSharp.OperationGetListCallbackWrapper(cb);
                data         = (IntPtr)GCHandle.Alloc(cb_wrapper);
                destroy_data = GLib.DestroyHelper.NotifyHandler;
            }
            IntPtr raw_ret = gnome_keyring_find_items((int)type, native_attributes, cb_wrapper.NativeDelegate, data, destroy_data);
            IntPtr ret     = raw_ret;

            // the array is copied as part of the synchronous part of the call
            g_array_free(native_attributes, true);
            native_attributes = IntPtr.Zero;
            return(ret);
        }
Esempio n. 3
0
File: Global.cs Progetto: MrJoe/lat
        public static IntPtr FindNetworkPassword(string user, string domain, string server, string objekt, string protocol, string authtype, uint port, GnomeKeyring.OperationGetListCallback cb)
        {
            IntPtr user_as_native     = GLib.Marshaller.StringToPtrGStrdup(user);
            IntPtr domain_as_native   = GLib.Marshaller.StringToPtrGStrdup(domain);
            IntPtr server_as_native   = GLib.Marshaller.StringToPtrGStrdup(server);
            IntPtr objekt_as_native   = GLib.Marshaller.StringToPtrGStrdup(objekt);
            IntPtr protocol_as_native = GLib.Marshaller.StringToPtrGStrdup(protocol);
            IntPtr authtype_as_native = GLib.Marshaller.StringToPtrGStrdup(authtype);

            GnomeKeyringSharp.OperationGetListCallbackWrapper cb_wrapper;
            IntPtr data;

            GLib.DestroyNotify destroy_data;
            if (cb == null)
            {
                cb_wrapper   = null;
                data         = IntPtr.Zero;
                destroy_data = null;
            }
            else
            {
                cb_wrapper   = new GnomeKeyringSharp.OperationGetListCallbackWrapper(cb);
                data         = (IntPtr)GCHandle.Alloc(cb_wrapper);
                destroy_data = GLib.DestroyHelper.NotifyHandler;
            }
            IntPtr raw_ret = gnome_keyring_find_network_password(user_as_native, domain_as_native, server_as_native, objekt_as_native, protocol_as_native, authtype_as_native, port, cb_wrapper.NativeDelegate, data, destroy_data);
            IntPtr ret     = raw_ret;

            GLib.Marshaller.Free(user_as_native);
            GLib.Marshaller.Free(domain_as_native);
            GLib.Marshaller.Free(server_as_native);
            GLib.Marshaller.Free(objekt_as_native);
            GLib.Marshaller.Free(protocol_as_native);
            GLib.Marshaller.Free(authtype_as_native);
            return(ret);
        }
Esempio n. 4
0
File: Global.cs Progetto: MrJoe/lat
		public static IntPtr FindItems(GnomeKeyring.ItemType type, Attribute[] attributes, GnomeKeyring.OperationGetListCallback cb) {
			IntPtr native_attributes = toGArray(attributes);
			GnomeKeyringSharp.OperationGetListCallbackWrapper cb_wrapper;
			IntPtr data;
			GLib.DestroyNotify destroy_data;
			if (cb == null) {
				cb_wrapper = null;
				data = IntPtr.Zero;
				destroy_data = null;
			} else {
				cb_wrapper = new GnomeKeyringSharp.OperationGetListCallbackWrapper (cb);
				data = (IntPtr) GCHandle.Alloc (cb_wrapper);
				destroy_data = GLib.DestroyHelper.NotifyHandler;
			}
			IntPtr raw_ret = gnome_keyring_find_items((int) type, native_attributes, cb_wrapper.NativeDelegate, data, destroy_data);
			IntPtr ret = raw_ret;
			// the array is copied as part of the synchronous part of the call
			g_array_free(native_attributes, true);
			native_attributes = IntPtr.Zero;
			return ret;
		}