summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian J. Tarricone <brian@tarricone.org>2009-09-20 13:23:46 -0700
committerBrian J. Tarricone <brian@tarricone.org>2009-09-20 13:23:46 -0700
commita58c5aec4f3d694d13f1cfd51478508c952fd76a (patch)
tree38365a8ce028760d2a0ff1ed4938fb5caeaa7215
parentba4157eb192c32273cca26ad679ea04e2af8a922 (diff)
downloadxfconf-metadata-dbus-api.tar.gz
-rw-r--r--common/xfconf-dbus.xml57
-rw-r--r--xfconf/xfconf-cache.c1
-rw-r--r--xfconf/xfconf-cache.h5
-rw-r--r--xfconfd/xfconf-daemon.c10
4 files changed, 68 insertions, 5 deletions
diff --git a/common/xfconf-dbus.xml b/common/xfconf-dbus.xml
index 3f2138c..b944027 100644
--- a/common/xfconf-dbus.xml
+++ b/common/xfconf-dbus.xml
@@ -30,7 +30,7 @@
String property)
@channel: A channel/application/namespace name.
- @propert: A property name.
+ @property: A property name.
Gets a property value, returned as a variant type.
-->
@@ -39,13 +39,34 @@
<arg direction="in" name="property" type="s"/>
<arg direction="out" name="value" type="v"/>
</method>
-
+
+ <!--
+ Dict{String,Variant} org.xfce.Xfconf.GetPropertyFull(String channel,
+ String property)
+ @channel: A channel/application/namespace name.
+ @property: A property name.
+
+ Gets a property value and any associated metadata as a
+ dictionary of key-value pairs. The currently-known keys are:
+
+ * value (Variant): The actual value of the property.
+ * locked (Boolean): Whether or not the property is locked.
+
+ More keys may be added in the future; implementations must
+ ignore keys they do not understand.
+ -->
+ <method name="GetPropertyFull">
+ <arg direction="in" name="channel" type="s"/>
+ <arg direction="in" name="property" type="s"/>
+ <arg direction="out" name="metadata" type="a{s,v}"/>
+ </method>
+
<!--
- Array{String,Variant} org.xfce.Xfconf.GetAllProperties(String channel,
- String property_base)
+ Dict{String,Variant} org.xfce.Xfconf.GetAllProperties(String channel,
+ String property_base)
@channel: A channel/application/namespace name.
- @property_base: The root of poperties to return.
+ @property_base: The root of properties to return.
Gets all the properties and values that exist in
@channel that are rooted at @property_base. Passing
@@ -61,6 +82,32 @@
<arg direction="in" name="property_base" type="s"/>
<arg direction="out" name="properties" type="a{sv}"/>
</method>
+
+ <!--
+ Dict{String,Dict{String,Variant}} org.xfce.Xfconf.GetAllPropertiesFull(String channel,
+ String property_base)
+ @channel: A channel/application/namespace name.
+ @property_base: The root of properties to return.
+
+ Gets all properties and associated "metadata" that exist
+ in @channel that are rooted at @property_base. Passing
+ "/" or the empty string as @property_base will return
+ all properties in the channel.
+
+ This method works similarly to GetPropertyFull() in that
+ it returns all metadata associated with each property.
+ In this case, the "inner" dicts returned is the same as
+ the single dict returned by GetPropertyFull(), and the
+ "outer" dict's keys are the property names.
+
+ See org.xfce.GetPropertyFull() for an explanation of the
+ metadata keys.
+ -->
+ <method name="GetAllPropertiesFull">
+ <arg direction="in" name="channel" type="s"/>
+ <arg direction="in" name="property_base" type="s"/>
+ <arg direction="out" name="metadata" type="a{sa{sv}}"/>
+ </method>
<!--
Boolean org.xfce.Xfconf.PropertyExists(String channel,
diff --git a/xfconf/xfconf-cache.c b/xfconf/xfconf-cache.c
index 31fca97..7ce0b12 100644
--- a/xfconf/xfconf-cache.c
+++ b/xfconf/xfconf-cache.c
@@ -55,6 +55,7 @@ typedef struct
{
GTimeVal last_used;
GValue value;
+ gboolean locked;
} XfconfCacheItem;
static XfconfCacheItem *
diff --git a/xfconf/xfconf-cache.h b/xfconf/xfconf-cache.h
index b7d3985..4590657 100644
--- a/xfconf/xfconf-cache.h
+++ b/xfconf/xfconf-cache.h
@@ -63,6 +63,11 @@ gboolean xfconf_cache_reset(XfconfCache *cache,
GError **error);
G_GNUC_INTERNAL
+gboolean xfconf_cache_is_locked(XfconfCache *cache,
+ const gchar *property,
+ GError **error);
+
+G_GNUC_INTERNAL
void xfconf_cache_set_max_entries(XfconfCache *cache,
gint max_entries);
G_GNUC_INTERNAL
diff --git a/xfconfd/xfconf-daemon.c b/xfconfd/xfconf-daemon.c
index ba5ea96..2138099 100644
--- a/xfconfd/xfconf-daemon.c
+++ b/xfconfd/xfconf-daemon.c
@@ -44,11 +44,21 @@ static gboolean xfconf_get_property(XfconfDaemon *xfconfd,
const gchar *property,
GValue *value,
GError **error);
+static gboolean xfconf_get_property_full(XfconfDaemon *xfconfd,
+ const gchar *channel,
+ const gchar *property,
+ GHashTable **OUT_metadata,
+ GError **error);
static gboolean xfconf_get_all_properties(XfconfDaemon *xfconfd,
const gchar *channel,
const gchar *property_base,
GHashTable **properties,
GError **error);
+static gboolean xfconf_get_all_properties_full(XfconfDaemon *xfconfd,
+ const gchar *channel,
+ const gchar *property,
+ GHashTable **OUT_metadata,
+ GError **error);
static gboolean xfconf_property_exists(XfconfDaemon *xfconfd,
const gchar *channel,
const gchar *property,