2002-10-19 09:31:20 +00:00
|
|
|
namespace GConf
|
|
|
|
{
|
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
public abstract class ClientBase
|
|
|
|
{
|
|
|
|
public abstract object Get (string key);
|
2003-05-27 06:27:26 +00:00
|
|
|
internal abstract void SetValue (string key, Value val);
|
2002-10-19 09:31:20 +00:00
|
|
|
|
|
|
|
public void Set (string key, object val)
|
|
|
|
{
|
|
|
|
SetValue (key, new Value (val));
|
|
|
|
}
|
|
|
|
|
|
|
|
[DllImport("gconf-2")]
|
|
|
|
static extern bool gconf_is_initialized ();
|
|
|
|
|
|
|
|
[DllImport("gconf-2")]
|
|
|
|
static extern bool gconf_init (int argc, IntPtr argv, out IntPtr err);
|
|
|
|
|
2003-05-27 06:27:26 +00:00
|
|
|
internal void Initialize ()
|
2002-10-19 09:31:20 +00:00
|
|
|
{
|
|
|
|
if (!gconf_is_initialized ())
|
|
|
|
{
|
|
|
|
IntPtr err;
|
|
|
|
gconf_init (0, IntPtr.Zero, out err);
|
|
|
|
if (err != IntPtr.Zero)
|
|
|
|
throw new GLib.GException (err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|