summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBrian Tarricone <brian@tarricone.org>2007-10-25 09:14:44 +0000
committerBrian Tarricone <brian@tarricone.org>2007-10-25 09:14:44 +0000
commit90b342ba827cd9102c3732fe37b84cb223f03d90 (patch)
tree6c7fba86934637705eb644b8cacb1bcca74c5a6a /docs
parentfe0dfdb9514a27a7ea0c090a2bd8de218629c241 (diff)
downloadxfconf-90b342ba827cd9102c3732fe37b84cb223f03d90.tar.gz
start migration to new library API with array types and struct serializers.
this isn't completely done and doesn't quite work (needs some more daemon backend work), but what's in svn doesn't work properly right now either (Old svn revision: 26766)
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/tmpl/xfconf-backend.sgml6
-rw-r--r--docs/reference/tmpl/xfconf-channel.sgml200
-rw-r--r--docs/reference/tmpl/xfconf-types.sgml57
-rw-r--r--docs/reference/tmpl/xfconf-unused.sgml24
-rw-r--r--docs/reference/tmpl/xfconf.sgml14
-rw-r--r--docs/reference/xfconf-docs.sgml3
-rw-r--r--docs/reference/xfconf-sections.txt30
-rw-r--r--docs/spec/backend.txt43
-rw-r--r--docs/spec/perchannel-xml.dtd18
-rw-r--r--docs/spec/perchannel-xml.txt31
10 files changed, 395 insertions, 31 deletions
diff --git a/docs/reference/tmpl/xfconf-backend.sgml b/docs/reference/tmpl/xfconf-backend.sgml
index 1500b80..7004699 100644
--- a/docs/reference/tmpl/xfconf-backend.sgml
+++ b/docs/reference/tmpl/xfconf-backend.sgml
@@ -39,6 +39,12 @@ one could think of to store data.
@_xb_reserved2: Reserved for future expansion.
@_xb_reserved3: Reserved for future expansion.
+<!-- ##### STRUCT XfconfBackend ##### -->
+<para>
+
+</para>
+
+
<!-- ##### FUNCTION xfconf_backend_initialize ##### -->
<para>
diff --git a/docs/reference/tmpl/xfconf-channel.sgml b/docs/reference/tmpl/xfconf-channel.sgml
index 69f5b25..7ea9b30 100644
--- a/docs/reference/tmpl/xfconf-channel.sgml
+++ b/docs/reference/tmpl/xfconf-channel.sgml
@@ -94,7 +94,6 @@ configuration keys with the same names.
@channel:
@property:
-@default_value:
@Returns:
@@ -109,7 +108,7 @@ configuration keys with the same names.
@Returns:
-<!-- ##### FUNCTION xfconf_channel_get_int64 ##### -->
+<!-- ##### FUNCTION xfconf_channel_get_uint64 ##### -->
<para>
</para>
@@ -160,7 +159,7 @@ configuration keys with the same names.
@channel:
@property:
-@value:
+@values:
@Returns:
@@ -175,7 +174,7 @@ configuration keys with the same names.
@Returns:
-<!-- ##### FUNCTION xfconf_channel_set_int64 ##### -->
+<!-- ##### FUNCTION xfconf_channel_set_uint64 ##### -->
<para>
</para>
@@ -208,3 +207,196 @@ configuration keys with the same names.
@Returns:
+<!-- ##### FUNCTION xfconf_channel_get_property ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@value:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_set_property ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@value:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_get_array ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@first_value_type:
+@Varargs:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_get_array_valist ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@first_value_type:
+@var_args:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_get_arrayv ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_set_array ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@first_value_type:
+@Varargs:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_set_array_valist ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@first_value_type:
+@var_args:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_set_arrayv ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@values:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_get_named_struct ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@struct_name:
+@value_struct:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_set_named_struct ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@struct_name:
+@value_struct:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_get_struct ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@value_struct:
+@first_member_type:
+@Varargs:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_get_struct_valist ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@value_struct:
+@first_member_type:
+@var_args:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_get_structv ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@value_struct:
+@n_members:
+@member_types:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_set_struct ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@value_struct:
+@first_member_type:
+@Varargs:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_set_struct_valist ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@value_struct:
+@first_member_type:
+@var_args:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_channel_set_structv ##### -->
+<para>
+
+</para>
+
+@channel:
+@property:
+@value_struct:
+@n_members:
+@member_types:
+@Returns:
+
+
diff --git a/docs/reference/tmpl/xfconf-types.sgml b/docs/reference/tmpl/xfconf-types.sgml
new file mode 100644
index 0000000..ff88f27
--- /dev/null
+++ b/docs/reference/tmpl/xfconf-types.sgml
@@ -0,0 +1,57 @@
+<!-- ##### SECTION Title ##### -->
+Xfconf Types
+
+<!-- ##### SECTION Short_Description ##### -->
+GObject types used by the Xfconf daemon and library
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### FUNCTION xfconf_g_value_get_int16 ##### -->
+<para>
+
+</para>
+
+@value:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_g_value_get_uint16 ##### -->
+<para>
+
+</para>
+
+@value:
+@Returns:
+
+
+<!-- ##### FUNCTION xfconf_g_value_set_int16 ##### -->
+<para>
+
+</para>
+
+@value:
+@v_int16:
+
+
+<!-- ##### FUNCTION xfconf_g_value_set_uint16 ##### -->
+<para>
+
+</para>
+
+@value:
+@v_uint16:
+
+
diff --git a/docs/reference/tmpl/xfconf-unused.sgml b/docs/reference/tmpl/xfconf-unused.sgml
index 157b816..a941f34 100644
--- a/docs/reference/tmpl/xfconf-unused.sgml
+++ b/docs/reference/tmpl/xfconf-unused.sgml
@@ -53,20 +53,29 @@ stamp-xfconf-marshal
@obj:
-<!-- ##### STRUCT XfconfBackend ##### -->
+<!-- ##### FUNCTION xfconf_backend_get_error_quark ##### -->
<para>
</para>
+@Returns:
-<!-- ##### FUNCTION xfconf_backend_get_error_quark ##### -->
+<!-- ##### FUNCTION xfconf_channel_begin_transaction ##### -->
<para>
</para>
+@channel:
@Returns:
-<!-- ##### FUNCTION xfconf_channel_begin_transaction ##### -->
+<!-- ##### FUNCTION xfconf_channel_cancel_transaction ##### -->
+<para>
+
+</para>
+
+@channel:
+
+<!-- ##### FUNCTION xfconf_channel_commit_transaction ##### -->
<para>
</para>
@@ -74,18 +83,23 @@ stamp-xfconf-marshal
@channel:
@Returns:
-<!-- ##### FUNCTION xfconf_channel_cancel_transaction ##### -->
+<!-- ##### FUNCTION xfconf_channel_get_int64 ##### -->
<para>
</para>
@channel:
+@property:
+@default_value:
+@Returns:
-<!-- ##### FUNCTION xfconf_channel_commit_transaction ##### -->
+<!-- ##### FUNCTION xfconf_channel_set_int64 ##### -->
<para>
</para>
@channel:
+@property:
+@value:
@Returns:
diff --git a/docs/reference/tmpl/xfconf.sgml b/docs/reference/tmpl/xfconf.sgml
index 5d63af8..1ce1fe3 100644
--- a/docs/reference/tmpl/xfconf.sgml
+++ b/docs/reference/tmpl/xfconf.sgml
@@ -1,8 +1,8 @@
<!-- ##### SECTION Title ##### -->
-Xfconf Library Initialization
+Xfconf Library Core
<!-- ##### SECTION Short_Description ##### -->
-Init routines for libxfconf
+Init routines and core functionality for libxfconf
<!-- ##### SECTION Long_Description ##### -->
<para>
@@ -38,3 +38,13 @@ resources.
+<!-- ##### FUNCTION xfconf_named_struct_register ##### -->
+<para>
+
+</para>
+
+@struct_name:
+@n_members:
+@member_types:
+
+
diff --git a/docs/reference/xfconf-docs.sgml b/docs/reference/xfconf-docs.sgml
index c9735fd..91ada57 100644
--- a/docs/reference/xfconf-docs.sgml
+++ b/docs/reference/xfconf-docs.sgml
@@ -7,7 +7,8 @@
</bookinfo>
<chapter>
- <title>Xfconf Errors</title>
+ <title>Xfconf Core Functionality</title>
+ <xi:include href="xml/xfconf-types.xml"/>
<xi:include href="xml/xfconf-errors.xml"/>
</chapter>
diff --git a/docs/reference/xfconf-sections.txt b/docs/reference/xfconf-sections.txt
index 228b9b4..26a2beb 100644
--- a/docs/reference/xfconf-sections.txt
+++ b/docs/reference/xfconf-sections.txt
@@ -8,15 +8,31 @@ xfconf_channel_get_all
xfconf_channel_get_string
xfconf_channel_get_string_list
xfconf_channel_get_int
-xfconf_channel_get_int64
+xfconf_channel_get_uint64
xfconf_channel_get_double
xfconf_channel_get_bool
xfconf_channel_set_string
xfconf_channel_set_string_list
xfconf_channel_set_int
-xfconf_channel_set_int64
+xfconf_channel_set_uint64
xfconf_channel_set_double
xfconf_channel_set_bool
+xfconf_channel_get_property
+xfconf_channel_set_property
+xfconf_channel_get_array
+xfconf_channel_get_array_valist
+xfconf_channel_get_arrayv
+xfconf_channel_set_array
+xfconf_channel_set_array_valist
+xfconf_channel_set_arrayv
+xfconf_channel_get_named_struct
+xfconf_channel_set_named_struct
+xfconf_channel_get_struct
+xfconf_channel_get_struct_valist
+xfconf_channel_get_structv
+xfconf_channel_set_struct
+xfconf_channel_set_struct_valist
+xfconf_channel_set_structv
<SUBSECTION Standard>
XFCONF_CHANNEL
XFCONF_IS_CHANNEL
@@ -30,6 +46,7 @@ XFCONF_CHANNEL_GET_CLASS
<SECTION>
<FILE>xfconf-backend</FILE>
XfconfBackendInterface
+XfconfBackend
xfconf_backend_initialize
xfconf_backend_set
xfconf_backend_get
@@ -49,6 +66,7 @@ xfconf_backend_get_type
<FILE>xfconf</FILE>
xfconf_init
xfconf_shutdown
+xfconf_named_struct_register
</SECTION>
<SECTION>
@@ -56,3 +74,11 @@ xfconf_shutdown
XFCONF_ERROR
XfconfError
</SECTION>
+
+<SECTION>
+<FILE>xfconf-types</FILE>
+xfconf_g_value_get_int16
+xfconf_g_value_get_uint16
+xfconf_g_value_set_int16
+xfconf_g_value_set_uint16
+</SECTION>
diff --git a/docs/spec/backend.txt b/docs/spec/backend.txt
new file mode 100644
index 0000000..421d737
--- /dev/null
+++ b/docs/spec/backend.txt
@@ -0,0 +1,43 @@
+Xfconf Backends
+---------------
+
+Xfconf backends act as the actual configuration store. A backend might
+write flat files to disk, XML files to disk, rows to a relational
+database, entries to an LDAP server, or any other possible mechanism
+desired to persistently store the data.
+
+A backend must implement the XfconfBackend interface, which is described
+in the API documentation.
+
+The backend will have to deal with a variety of data types. While some
+of these types are wrapped directly in the client library (e.g.,
+xfconf_channel_set_uint64()), users of the library can also set other,
+semi-arbitrary types, as well as array types.
+
+So, the backend must, at minimum, be able to understand the following GTypes:
+
+G_TYPE_STRING
+G_TYPE_STRV (special GType for a C array of G_TYPE_STRING)
+G_TYPE_UCHAR
+G_TYPE_CHAR
+XFCONF_TYPE_UINT16
+XFCONF_TYPE_INT16
+G_TYPE_UINT
+G_TYPE_INT
+G_TYPE_UINT64
+G_TYPE_INT64
+G_TYPE_FLOAT
+G_TYPE_DOUBLE
+G_TYPE_BOOLEAN
+
+In addition, the backend must be able to handle arrays of arbitrary
+types from the above list (with the exception of G_TYPE_STRV). A single
+array may hold multiple values of the same type, or of different types.
+Because of this, array types are received by the backend as GValueArrays.
+The GType of each value in the array must be checked, of course, as the
+array elements may be of different types.
+
+If the backend receives a G_TYPE_STRV value, it may treat it specially
+in storage, or may simply store it as an array of G_TYPE_STRING values.
+However, the backend should always return it to clients as G_TYPE_STRV,
+not as a G_TYPE_VALUE_ARRAY of G_TYPE_STRING.
diff --git a/docs/spec/perchannel-xml.dtd b/docs/spec/perchannel-xml.dtd
index c80767d..dff0013 100644
--- a/docs/spec/perchannel-xml.dtd
+++ b/docs/spec/perchannel-xml.dtd
@@ -1,17 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT channel property*>
-<!ELEMENT property string*> <!-- <string> elems only if type="strlist" -->
-<!ELEMENT string #PCDATA>
+<!ELEMENT property (property|value)*> <!-- <value> elems only allowed
+ if type="array" -->
+<!ELEMENT value EMPTY>
<!ATTLIST channel name CDATA #REQUIRED>
<!ATTLIST channel version CDATA #REQUIRED> <!-- currently "1.0" -->
-<!ATTLIST channel locked (true|false) #IMPLIED>
+<!ATTLIST channel locked CDATA #IMPLIED> <!-- only one of these -->
+<!ATTLIST channel unlocked CDATA #IMPLIED> <!-- two are allowed -->
<!ATTLIST property name CDATA #REQUIRED>
-<!ATTLIST property type (string|strlist|int|int64|double|bool|empty) #REQUIRED>
-<!ATTLIST property value CDATA #IMPLIED> <!-- not used if type="strlist"
+<!ATTLIST property type (string|uchar|char|uint16|int16|uint|int|uint64|int64|float|double|bool|array|empty) #REQUIRED>
+<!ATTLIST property value CDATA #IMPLIED> <!-- not used if type="array"
or type="empty" -->
-<!ATTLIST property locked (true|false) #IMPLIED>
+<!ATTLIST property locked CDATA #IMPLIED> <!-- only one of these -->
+<!ATTLIST property unlocked CDATA #IMPLIED> <!-- two are allowed -->
-<!-- <string> element has no attributes -->
+<!ATTLIST value type (string|uchar|char|uint16|int16|uint|int|uint64|int64|float|double|bool) #REQUIRED>
+<!ATTLIST value value CDATA #REQUIRED>
diff --git a/docs/spec/perchannel-xml.txt b/docs/spec/perchannel-xml.txt
index b5fb0a2..0374feb 100644
--- a/docs/spec/perchannel-xml.txt
+++ b/docs/spec/perchannel-xml.txt
@@ -1,3 +1,5 @@
+XfconfBackendPerchannelXml file format, version 1.0
+
-> High-level overview:
The Per-channel XML configuration store backend is a simple
@@ -11,10 +13,15 @@
<property name="allow-editing" type="bool" value="true"/>
<property name="last-document" type="string" value="foo.txt"/>
</property>
- <property name="history" type="strlist">
- <string>foo.txt</string>
- <string>bar.txt</string>
- <string>baz.txt</string>
+ <property name="history" type="array">
+ <value type="string" value="foo.txt"/>
+ <value type="string" value="bar.txt"/>
+ <value type="string" value="baz.txt"/>
+ </property>
+ <property name="random-stuff" type="array">
+ <value type="int" value="345"/>
+ <value type="double" value="42.4"/>
+ <value type="string" value="cheese"/>
</property>
</channel>
@@ -50,9 +57,10 @@
Attributes:
+ name(string): The name of the property (required).
+ type(string): The type of property. Must be one of: "string",
- "strlist", "int", "int64", "double", "bool", "empty" (required).
+ "uchar", "char", "uint16", "int16", "uint", "int", "uint64",
+ "int64", "float", "double", "bool", "array", or "empty" (required).
+ value(string): The value of the property (required except for
- type="strlist" and type="empty").
+ type="array" and type="empty").
+ locked(userlist): A list of users/groups who cannot modify
this property (only allowed in config files in non-user-writable
locations; mutually exclusive with the "unlocked" attribute;
@@ -61,10 +69,13 @@
this property (only allowed in config files in non-user-writable
locations; mutually exclusive with the "locked" attribute;
optional, defaults to "*").
- * <string>
- Only allowed inside <property> elements where type="strlist". Has
- no attributes; the text between the opening and closing tags is
- the property value.
+ * <value>
+ Only allowed inside <property> elements where type="array", and
+ indicates an array element value.
+ Attributes:
+ + type(string): The type of value. All values for type= on
+ <property> are supported except for "array" and "empty" (required).
+ + value(string): The element's value, encoded as a string (required).
-> Nesting: