diff -Nru dee-1.0.8/configure dee-1.0.10/configure --- dee-1.0.8/configure 2012-03-23 11:41:00.000000000 +0000 +++ dee-1.0.10/configure 2012-04-12 07:21:31.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for dee 1.0.8. +# Generated by GNU Autoconf 2.68 for dee 1.0.10. # # Report bugs to . # @@ -570,8 +570,8 @@ # Identity of this package. PACKAGE_NAME='dee' PACKAGE_TARNAME='dee' -PACKAGE_VERSION='1.0.8' -PACKAGE_STRING='dee 1.0.8' +PACKAGE_VERSION='1.0.10' +PACKAGE_STRING='dee 1.0.10' PACKAGE_BUGREPORT='https://bugs.launchpad.net/dee' PACKAGE_URL='' @@ -1378,7 +1378,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dee 1.0.8 to adapt to many kinds of systems. +\`configure' configures dee 1.0.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1448,7 +1448,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dee 1.0.8:";; + short | recursive ) echo "Configuration of dee 1.0.10:";; esac cat <<\_ACEOF @@ -1479,7 +1479,7 @@ --enable-trace-log=[no/yes] build with very verbose logging [default=no] --enable-icu=[no/yes] build with advanced unicode text handling (requires - ICU >= 4.8) [default=yes] + ICU >= 4.6) [default=yes] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1581,7 +1581,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dee configure 1.0.8 +dee configure 1.0.10 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1950,7 +1950,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dee $as_me 1.0.8, which was +It was created by dee $as_me 1.0.10, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2774,7 +2774,7 @@ # Define the identity of the package. PACKAGE='dee' - VERSION='1.0.8' + VERSION='1.0.10' cat >>confdefs.h <<_ACEOF @@ -3031,8 +3031,8 @@ DEE_MAJOR_VERSION=1 DEE_MINOR_VERSION=0 -DEE_MICRO_VERSION=8 -DEE_VERSION=1.0.8 +DEE_MICRO_VERSION=10 +DEE_VERSION=1.0.10 @@ -3046,7 +3046,7 @@ # change to C+1:0:0 # - If the interface is the same as the previous version, change to C:R+1:A DEE_LT_CURRENT=5 -DEE_LT_REV=0 +DEE_LT_REV=1 DEE_LT_AGE=1 DEE_LT_VERSION="$DEE_LT_CURRENT:$DEE_LT_REV:$DEE_LT_AGE" DEE_LT_LDFLAGS="-version-info $DEE_LT_VERSION -export-symbols-regex '^dee_.*'" @@ -13263,9 +13263,9 @@ #include "unicode/uvernum.h" #if U_ICU_VERSION_MAJOR_NUM < 4 - #error Dee ICU requires at least ICU v4.8 - #elif U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM < 8 - #error Dee ICU requires at least ICU v4.8 + #error Dee ICU requires at least ICU v4.6 + #elif U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM < 6 + #error Dee ICU requires at least ICU v4.6 #endif int main () @@ -13866,7 +13866,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dee $as_me 1.0.8, which was +This file was extended by dee $as_me 1.0.10, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13932,7 +13932,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dee config.status 1.0.8 +dee config.status 1.0.10 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -15701,7 +15701,7 @@ fi else - as_fn_error $? "Dee ICU support requires ICU >= 4.8" "$LINENO" 5 + as_fn_error $? "Dee ICU support requires ICU >= 4.6" "$LINENO" 5 fi fi @@ -16298,7 +16298,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dee $as_me 1.0.8, which was +This file was extended by dee $as_me 1.0.10, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16364,7 +16364,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dee config.status 1.0.8 +dee config.status 1.0.10 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -Nru dee-1.0.8/configure.ac dee-1.0.10/configure.ac --- dee-1.0.8/configure.ac 2012-03-23 11:40:33.000000000 +0000 +++ dee-1.0.10/configure.ac 2012-04-12 07:21:21.000000000 +0000 @@ -5,7 +5,7 @@ # Don't forget that this changes also GIR version, and requires rebuilding vapi m4_define([dee_major], [1]) m4_define([dee_minor], [0]) -m4_define([dee_micro], [8]) +m4_define([dee_micro], [10]) m4_define([dee_api], [dee_major.dee_minor]) m4_define([dee_version], @@ -39,7 +39,7 @@ # change to C+1:0:0 # - If the interface is the same as the previous version, change to C:R+1:A DEE_LT_CURRENT=5 -DEE_LT_REV=0 +DEE_LT_REV=1 DEE_LT_AGE=1 DEE_LT_VERSION="$DEE_LT_CURRENT:$DEE_LT_REV:$DEE_LT_AGE" DEE_LT_LDFLAGS="-version-info $DEE_LT_VERSION -export-symbols-regex '^dee_.*'" @@ -157,16 +157,16 @@ dnl = Check for ICU ==================================== AC_ARG_ENABLE([icu], - AS_HELP_STRING([--enable-icu=@<:@no/yes@:>@],[build with advanced unicode text handling (requires ICU >= 4.8) @<:@default=yes@:>@]),, + AS_HELP_STRING([--enable-icu=@<:@no/yes@:>@],[build with advanced unicode text handling (requires ICU >= 4.6) @<:@default=yes@:>@]),, [enable_icu=yes]) if test "x$enable_icu" = "xyes"; then AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ #include "unicode/uvernum.h" #if U_ICU_VERSION_MAJOR_NUM < 4 - #error Dee ICU requires at least ICU v4.8 - #elif U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM < 8 - #error Dee ICU requires at least ICU v4.8 + #error Dee ICU requires at least ICU v4.6 + #elif U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM < 6 + #error Dee ICU requires at least ICU v4.6 #endif]], [[]])], [icu_available=yes], [icu_available=no]) @@ -179,7 +179,7 @@ AC_SUBST(ICU_LIBS) AC_OUTPUT([dee-icu-1.0.pc]) else - AC_MSG_ERROR([Dee ICU support requires ICU >= 4.8]) + AC_MSG_ERROR([Dee ICU support requires ICU >= 4.6]) fi fi diff -Nru dee-1.0.8/debian/changelog dee-1.0.10/debian/changelog --- dee-1.0.8/debian/changelog 2012-04-12 09:48:29.000000000 +0000 +++ dee-1.0.10/debian/changelog 2012-04-12 09:48:29.000000000 +0000 @@ -1,3 +1,18 @@ +dee (1.0.10-0ubuntu1) precise; urgency=low + + * New upstream release. + - unity-music-daemon crashed with SIGSEGV in find_term_real() from + dee_tree_index_lookup() from dee_index_lookup() from + unity_music_lens_rhythmbox_collection_search() (LP: #963991) + - unity-applications-daemon crashed with SIGSEGV in + g_variant_get_type_info() (LP: #938382) + - unity-applications-daemon crashed with SIGSEGV in + g_variant_type_info_check() (LP: #953978) + * debian/control: + - update Standards-Version to latest + + -- Didier Roche Thu, 12 Apr 2012 11:33:08 +0200 + dee (1.0.8-0ubuntu2) precise-proposed; urgency=low * Cherry-pick upstream: diff -Nru dee-1.0.8/debian/control dee-1.0.10/debian/control --- dee-1.0.8/debian/control 2012-04-12 09:48:29.000000000 +0000 +++ dee-1.0.10/debian/control 2012-04-12 09:48:29.000000000 +0000 @@ -15,7 +15,7 @@ libicu-dev (>= 4.8), python (>= 2.6.5), valac -Standards-Version: 3.9.2 +Standards-Version: 3.9.3 Section: libs Homepage: https://launchpad.net/dee Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/dee/ubuntu diff -Nru dee-1.0.8/doc/reference/dee-1.0/dee-1.0-sections.txt dee-1.0.10/doc/reference/dee-1.0/dee-1.0-sections.txt --- dee-1.0.8/doc/reference/dee-1.0/dee-1.0-sections.txt 2012-03-23 11:41:28.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/dee-1.0-sections.txt 2012-04-12 07:21:57.000000000 +0000 @@ -39,6 +39,24 @@
+dee-client +DeeClient +DeeClient +DeeClientClass +dee_client_new +dee_client_new_for_address + +DEE_CLIENT +DEE_CLIENT_CLASS +DEE_CLIENT_GET_CLASS +DEE_IS_CLIENT +DEE_IS_CLIENT_CLASS +DEE_TYPE_CLIENT +DeeClientPrivate +dee_client_get_type +
+ +
dee-file-resource-manager DeeFileResourceManager DeeFileResourceManager @@ -69,6 +87,7 @@ dee_filter_new_for_any_column dee_filter_new_for_key_column dee_filter_new_regex +dee_filter_new_sort dee_filter_notify
@@ -130,6 +149,18 @@
+dee-icu +DEE_ICU_ERROR +DeeICUError +DeeICUTermFilter +dee_icu_error_quark +dee_icu_term_filter_apply +dee_icu_term_filter_destroy +dee_icu_term_filter_new +dee_icu_term_filter_new_ascii_folder +
+ +
dee-index DeeIndex DeeIndex @@ -165,17 +196,17 @@
dee-model DeeModel -DeeModel +DeeCompareRowFunc DeeModelIface DeeModelIter DeeModelTag dee_model_append dee_model_append_row -dee_model_append_valist dee_model_build_row -dee_model_build_row_valist dee_model_clear dee_model_clear_tag +dee_model_find_row_sorted +dee_model_find_sorted dee_model_get dee_model_get_bool dee_model_get_column_schema @@ -195,20 +226,18 @@ dee_model_get_uchar dee_model_get_uint32 dee_model_get_uint64 -dee_model_get_valist dee_model_get_value dee_model_insert dee_model_insert_before -dee_model_insert_before_valist dee_model_insert_row dee_model_insert_row_before -dee_model_insert_valist +dee_model_insert_row_sorted +dee_model_insert_sorted dee_model_is_first dee_model_is_last dee_model_next dee_model_prepend dee_model_prepend_row -dee_model_prepend_valist dee_model_prev dee_model_register_tag dee_model_remove @@ -216,16 +245,16 @@ dee_model_set_row dee_model_set_schema dee_model_set_schema_full -dee_model_set_schema_valist dee_model_set_tag -dee_model_set_valist dee_model_set_value DEE_IS_MODEL DEE_MODEL DEE_MODEL_GET_IFACE DEE_TYPE_MODEL +DEE_TYPE_MODEL_ITER dee_model_get_type +dee_model_iter_get_type
@@ -247,9 +276,12 @@ DEE_PEER_DBUS_IFACE DeePeer DeePeerClass +dee_peer_get_connections dee_peer_get_swarm_leader dee_peer_get_swarm_name dee_peer_is_swarm_leader +dee_peer_is_swarm_owner +dee_peer_list_peers dee_peer_new DEE_IS_PEER @@ -281,7 +313,6 @@
dee-resource-manager DeeResourceManager -DeeResourceManager DeeResourceManagerIface dee_resource_manager_get_default dee_resource_manager_load @@ -297,7 +328,6 @@
dee-result-set DeeResultSet -DeeResultSet DeeResultSetIface dee_result_set_get_model dee_result_set_get_n_rows @@ -335,7 +365,6 @@
dee-serializable DeeSerializable -DeeSerializable DeeSerializableIface DeeSerializableParseFunc dee_serializable_externalize @@ -371,10 +400,31 @@
+dee-server +DeeServer +DeeServer +DeeServerClass +dee_server_bus_address_for_name +dee_server_get_client_address +dee_server_new +dee_server_new_for_address + +DEE_IS_SERVER +DEE_IS_SERVER_CLASS +DEE_SERVER +DEE_SERVER_CLASS +DEE_SERVER_GET_CLASS +DEE_TYPE_SERVER +DeeServerPrivate +dee_server_get_type +
+ +
dee-shared-model DeeSharedModel DEE_SHARED_MODEL_DBUS_IFACE DeeSharedModel +DeeSharedModelAccessMode DeeSharedModelClass DeeSharedModelError dee_shared_model_flush_revision_queue @@ -383,6 +433,7 @@ dee_shared_model_is_leader dee_shared_model_is_synchronized dee_shared_model_new +dee_shared_model_new_for_peer dee_shared_model_new_with_back_end DEE_IS_SHARED_MODEL @@ -391,7 +442,9 @@ DEE_SHARED_MODEL_CLASS DEE_SHARED_MODEL_GET_CLASS DEE_TYPE_SHARED_MODEL +DEE_TYPE_SHARED_MODEL_ACCESS_MODE DeeSharedModelPrivate +dee_shared_model_access_mode_get_type dee_shared_model_get_type
diff -Nru dee-1.0.8/doc/reference/dee-1.0/dee-1.0.types dee-1.0.10/doc/reference/dee-1.0/dee-1.0.types --- dee-1.0.8/doc/reference/dee-1.0/dee-1.0.types 2012-03-23 11:41:28.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/dee-1.0.types 2012-04-12 07:21:57.000000000 +0000 @@ -6,6 +6,7 @@ dee_hash_index_get_type dee_index_get_type dee_model_get_type +dee_model_iter_get_type dee_peer_get_type dee_proxy_model_get_type dee_resource_manager_get_type @@ -14,6 +15,7 @@ dee_serializable_get_type dee_serializable_model_get_type dee_server_get_type +dee_shared_model_access_mode_get_type dee_shared_model_get_type dee_term_list_get_type dee_text_analyzer_get_type diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/annotation-glossary.html dee-1.0.10/doc/reference/dee-1.0/html/annotation-glossary.html --- dee-1.0.8/doc/reference/dee-1.0/html/annotation-glossary.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/annotation-glossary.html 2012-04-12 07:21:57.000000000 +0000 @@ -41,6 +41,8 @@ T  |  S +  |  + E
@@ -76,20 +78,27 @@

Generics and defining elements of containers and arrays.

T

-transfer full
-

Free data after the code is done.

+transfer container +

Free data container after the code is done.

S

scope call

The callback is valid only during the call to the method.

T

+transfer full
+

Free data after the code is done.

+
type

Override the parsed C type with given type

S

scope notified

The callback is valid until the GDestroyNotify argument is called.

+

E

+
+error-domains
+

Typed errors. Similar to throws in Java.

+
+
+DeeClient — Creates a client object you can use to connect + to a DeeServer. +
+
DeePeer — Finds other objects with the same swarm-name on the bus. -
-<xi:include></xi:include><xi:include></xi:include> + +
+DeeServer — Creates a server object you can connect to. +
+
Filters — A suite of simple DeeFilters for use with DeeFilterModels
-DeeFilterModel — A DeeModel that contains a filtered subset of - another DeeModel +DeeFilterModel — A DeeModel that contains a filtered subset of + another DeeModel
-DeeModel — A generic table model interface +DeeModel — A generic table model interface
-DeeProxyModel — A model that wraps another underlying DeeModel +DeeProxyModel — A model that wraps another underlying DeeModel
-DeeSequenceModel — A DeeModel implementation backed by a GSequence +DeeSequenceModel — A DeeModel implementation backed by a GSequence
DeeSerializableModel — Abstract base class for easing implementations of - DeeModels providing a unique version number + DeeModels providing a unique version number for each row
-DeeSharedModel — A DeeModel that can synchronize with other +DeeSharedModel — A DeeModel that can synchronize with other DeeSharedModel objects across D-Bus.
-DeeTransaction — A self contained change set for a DeeModel +DeeTransaction — A self contained change set for a DeeModel
diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/ch03.html dee-1.0.10/doc/reference/dee-1.0/html/ch03.html --- dee-1.0.8/doc/reference/dee-1.0/html/ch03.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/ch03.html 2012-04-12 07:21:57.000000000 +0000 @@ -21,7 +21,7 @@

-Indexes

+Indexes
DeeAnalyzer — Primary gateway for data indexing @@ -30,13 +30,13 @@ DeeHashIndex — A DeeHashIndex implementation doing lookups in a hash map
-DeeIndex — An inverted index interface for smart access to a DeeModel +DeeIndex — An inverted index interface for smart access to a DeeModel
-Model Readers — Extracting strings from DeeModels +Model Readers — Extracting strings from DeeModels
-DeeResultSet — Cursor-like interface for results sets +DeeResultSet — Cursor-like interface for results sets
DeeTermList — A simple collection type representing a list of indexed terms for a row in a DeeIndex @@ -47,8 +47,10 @@
DeeTreeIndex — A DeeTreeIndex backed by a balanced binary tree
+
+Dee ICU Extensions — A suite of DeeTermFilters based on ICU +
-<xi:include></xi:include>
DeeFileResourceManager — A resource manager backed by memory mapped files
-DeeResourceManager — Store and load DeeSerializables by name +DeeResourceManager — Store and load DeeSerializables by name
-DeeSerializable — Interface for classes that can serialize to and from GVariants +DeeSerializable — Interface for classes that can serialize to and from GVariants
diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-Dee-ICU-Extensions.html dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-Dee-ICU-Extensions.html --- dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-Dee-ICU-Extensions.html 1970-01-01 00:00:00.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-Dee-ICU-Extensions.html 2012-04-12 07:21:57.000000000 +0000 @@ -0,0 +1,221 @@ + + + + +Dee ICU Extensions + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

Dee ICU Extensions

+

Dee ICU Extensions — A suite of DeeTermFilters based on ICU

+
+
+

Synopsis

+
+#include <dee-icu.h>
+
+#define             DEE_ICU_ERROR
+enum                DeeICUError;
+                    DeeICUTermFilter;
+GQuark              dee_icu_error_quark                 (void);
+gchar *             dee_icu_term_filter_apply           (DeeICUTermFilter *self,
+                                                         const gchar *text);
+void                dee_icu_term_filter_destroy         (DeeICUTermFilter *filter);
+DeeICUTermFilter *  dee_icu_term_filter_new             (const gchar *system_id,
+                                                         const gchar *rules,
+                                                         GError **error);
+DeeICUTermFilter *  dee_icu_term_filter_new_ascii_folder
+                                                        ();
+
+
+
+

Description

+

+This module allows developers to easily construct powerful +DeeTermFilters with ease. The filters leverage the ICU +framework to provide world class transliteration features. +

+

+The filters can be employed manually by calling dee_icu_term_filter_apply() +or installed in a DeeAnalyzer by calling dee_analyzer_add_term_filter() +passing the term filter instance as the user data and +dee_icu_term_filter_destroy() as the GDestroyNotify. +

+
+
+

Details

+
+

DEE_ICU_ERROR

+
#define DEE_ICU_ERROR dee_icu_error_quark()
+
+

+Error domain for the ICU extension to Dee. Error codes will be from the +DeeICUError enumeration +

+
+
+
+

enum DeeICUError

+
typedef enum {
+  DEE_ICU_ERROR_BAD_RULE,
+  DEE_ICU_ERROR_BAD_ID,
+  DEE_ICU_ERROR_UNKNOWN
+} DeeICUError;
+
+

+Error codes for the ICU extension to Dee. These codes will be set when the +error domain is DEE_ICU_ERROR. +

+

+DEE_ICU_ERROR_BAD_RULE: Error parsing a transliteration rule +DEE_ICU_ERROR_BAD_ID: Error parsing a transliterator system id +DEE_ICU_ERROR_UNKNOWN: The ICU subsystem returned an error that is not + handled in Dee +

+
+
+
+

DeeICUTermFilter

+
typedef struct _DeeICUTermFilter DeeICUTermFilter;
+

+

+
+
+
+

dee_icu_error_quark ()

+
GQuark              dee_icu_error_quark                 (void);
+

+

+
+
+
+

dee_icu_term_filter_apply ()

+
gchar *             dee_icu_term_filter_apply           (DeeICUTermFilter *self,
+                                                         const gchar *text);
+

+Apply a DeeICUTermFilter on a piece of UTF-8 text. +

+
++ + + + + + + + + + + + + + +

self :

The filter to apply

text :

The text to apply the filter on

Returns :

A newly allocated string. Free with g_free(). [transfer full] +
+
+
+
+

dee_icu_term_filter_destroy ()

+
void                dee_icu_term_filter_destroy         (DeeICUTermFilter *filter);
+

+Free all resources allocated by a DeeICUTermFilter. +

+
++ + + + +

filter :

The filter to free
+
+
+
+

dee_icu_term_filter_new ()

+
DeeICUTermFilter *  dee_icu_term_filter_new             (const gchar *system_id,
+                                                         const gchar *rules,
+                                                         GError **error);
+

+Create a new DeeICUTermFilter for a given ICU transliterator system id +and/or set of transliteration rules. +

+
++ + + + + + + + + + + + + + + + + + +

system_id :

A system id for the transliterator to use. +See userguide.icu-project.org/transforms/general +

rules :

A set of transliteration rules to use. +See userguide.icu-project.org/transforms/general/rules. [allow-none] +

error :

A place to return a GError, or NULL to ignore errors. [allow-none][error-domains Dee.ICUError] +

Returns :

A newly allocated DeeICUTermFilter. +Free with dee_icu_term_filter_destroy(). [transfer full] +
+
+
+
+

dee_icu_term_filter_new_ascii_folder ()

+
DeeICUTermFilter *  dee_icu_term_filter_new_ascii_folder
+                                                        ();
+

+Construct a term filter that folds any UTF-8 string into ASCII. +

+
++ + + + +

Returns :

A newly allocated DeeICUTermFilter. Free with +dee_icu_term_filter_destroy(). [transfer full] +
+
+
+
+ + + \ No newline at end of file diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-DeeModel.html dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-DeeModel.html --- dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-DeeModel.html 1970-01-01 00:00:00.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-DeeModel.html 2012-04-12 07:21:57.000000000 +0000 @@ -0,0 +1,2058 @@ + + + + +DeeModel + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

DeeModel

+

DeeModel — A generic table model interface

+
+
+

Synopsis

+
+#include <dee.h>
+
+gint                (*DeeCompareRowFunc)                (GVariant **row1,
+                                                         GVariant **row2,
+                                                         gpointer user_data);
+struct              DeeModelIface;
+                    DeeModelIter;
+                    DeeModelTag;
+DeeModelIter *      dee_model_append                    (DeeModel *self,
+                                                         ...);
+DeeModelIter *      dee_model_append_row                (DeeModel *self,
+                                                         GVariant **row_members);
+GVariant **         dee_model_build_row                 (DeeModel *self,
+                                                         GVariant **out_row_members,
+                                                         ...);
+void                dee_model_clear                     (DeeModel *self);
+void                dee_model_clear_tag                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         DeeModelTag *tag);
+DeeModelIter *      dee_model_find_row_sorted           (DeeModel *self,
+                                                         GVariant **row_spec,
+                                                         DeeCompareRowFunc cmp_func,
+                                                         gpointer user_data,
+                                                         gboolean *out_was_found);
+DeeModelIter *      dee_model_find_sorted               (DeeModel *self,
+                                                         DeeCompareRowFunc cmp_func,
+                                                         gpointer user_data,
+                                                         gboolean *out_was_found,
+                                                         ...);
+void                dee_model_get                       (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         ...);
+gboolean            dee_model_get_bool                  (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+const gchar *       dee_model_get_column_schema         (DeeModel *self,
+                                                         guint column);
+gdouble             dee_model_get_double                (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+DeeModelIter *      dee_model_get_first_iter            (DeeModel *self);
+gint32              dee_model_get_int32                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+gint64              dee_model_get_int64                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+DeeModelIter *      dee_model_get_iter_at_row           (DeeModel *self,
+                                                         guint row);
+DeeModelIter *      dee_model_get_last_iter             (DeeModel *self);
+guint               dee_model_get_n_columns             (DeeModel *self);
+guint               dee_model_get_n_rows                (DeeModel *self);
+guint               dee_model_get_position              (DeeModel *self,
+                                                         DeeModelIter *iter);
+GVariant **         dee_model_get_row                   (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         GVariant **out_row_members);
+const gchar * const* dee_model_get_schema               (DeeModel *self,
+                                                         guint *num_columns);
+const gchar *       dee_model_get_string                (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+gpointer            dee_model_get_tag                   (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         DeeModelTag *tag);
+guchar              dee_model_get_uchar                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+guint32             dee_model_get_uint32                (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+guint64             dee_model_get_uint64                (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+GVariant *          dee_model_get_value                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+DeeModelIter *      dee_model_insert                    (DeeModel *self,
+                                                         guint pos,
+                                                         ...);
+DeeModelIter *      dee_model_insert_before             (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         ...);
+DeeModelIter *      dee_model_insert_row                (DeeModel *self,
+                                                         guint pos,
+                                                         GVariant **row_members);
+DeeModelIter *      dee_model_insert_row_before         (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         GVariant **row_members);
+DeeModelIter *      dee_model_insert_row_sorted         (DeeModel *self,
+                                                         GVariant **row_members,
+                                                         DeeCompareRowFunc cmp_func,
+                                                         gpointer user_data);
+DeeModelIter *      dee_model_insert_sorted             (DeeModel *self,
+                                                         DeeCompareRowFunc cmp_func,
+                                                         gpointer user_data,
+                                                         ...);
+gboolean            dee_model_is_first                  (DeeModel *self,
+                                                         DeeModelIter *iter);
+gboolean            dee_model_is_last                   (DeeModel *self,
+                                                         DeeModelIter *iter);
+DeeModelIter *      dee_model_next                      (DeeModel *self,
+                                                         DeeModelIter *iter);
+DeeModelIter *      dee_model_prepend                   (DeeModel *self,
+                                                         ...);
+DeeModelIter *      dee_model_prepend_row               (DeeModel *self,
+                                                         GVariant **row_members);
+DeeModelIter *      dee_model_prev                      (DeeModel *self,
+                                                         DeeModelIter *iter);
+DeeModelTag *       dee_model_register_tag              (DeeModel *self,
+                                                         GDestroyNotify tag_destroy);
+void                dee_model_remove                    (DeeModel *self,
+                                                         DeeModelIter *iter);
+void                dee_model_set                       (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         ...);
+void                dee_model_set_row                   (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         GVariant **row_members);
+void                dee_model_set_schema                (DeeModel *self,
+                                                         ...);
+void                dee_model_set_schema_full           (DeeModel *self,
+                                                         const gchar * const *column_schemas,
+                                                         guint num_columns);
+void                dee_model_set_tag                   (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         DeeModelTag *tag,
+                                                         gpointer value);
+void                dee_model_set_value                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column,
+                                                         GVariant *value);
+
+
+
+

Object Hierarchy

+
+  GBoxed
+   +----DeeModelIter
+
+
+
+

Description

+

+DeeModel is a generic table model that can holds GVariants as +column values. Each column is restricted to hold variants with some +predefined type signature. This is known as the +column schema. +

+

+

+
+

Indexes - Access by Key or Full Text Analysis

+

+Instead of forcing you to search the rows and columns for given values +or patterns DeeModel is integrated with a powerful DeeIndex that allows +you to create custom indexes over the model content that are updated +automatically as the model changes. +

+

+Indexes can be created for integer keys, string keys (fx. URIs), or for +full text search into the model contents. The indexing API is flexible +and extensible and can provide huge optimizations in terms of access times +if you find yourself iterating over the model searching for something. +

+
+

+

+

+

+
+

Sorting

+

+As a simpler alternative to using indexes you can rely on sorted models. +This is done by using the dee_model_insert_sorted() and +dee_model_find_sorted() family of APIs. Some model classes have +accelerated implementations of sorted inserts and lookups. +Notably DeeSequenceModel. +

+
+

+

+

+

+
+

Tags - Attach Arbitrary Data to Rows

+

+It's a very common pattern that you want to render a DeeModel into some +view in a classinc MVC pattern. If the view needs to reflect changes in the +model dynamically you often find yourself creating ad-hoc mappings between +the rows of the model and the widgets in your view. +

+

+In situations where you need to pair the rows in a model with some external +data structure the tags API may come in handy. +It consists of the functions dee_model_register_tag(), dee_model_set_tag(), +dee_model_get_tag(), and dee_model_clear_tag(). +

+
+

+

+
+
+

Details

+
+

DeeCompareRowFunc ()

+
gint                (*DeeCompareRowFunc)                (GVariant **row1,
+                                                         GVariant **row2,
+                                                         gpointer user_data);
+

+Compares row1 and row2. Mainly used with dee_model_insert_sorted() and +dee_model_find_sorted(). +

+
++ + + + + + + + + + + + + + + + + + +

row1 :

The model being indexed. [array] +

row2 :

The row to extract terms for. [array] +

user_data :

User data to pass to comparison function. [closure] +

Returns :

-1, 0, or 1 if row1 is respectively less than, equal, or greater +than row2.
+
+
+
+

struct DeeModelIface

+
struct DeeModelIface {
+  GTypeInterface g_iface;
+
+  /* Signals */
+  void           (*row_added)       (DeeModel     *self,
+                                     DeeModelIter *iter);
+
+  void           (*row_removed)     (DeeModel     *self,
+                                     DeeModelIter *iter);
+
+  void           (*row_changed)     (DeeModel     *self,
+                                     DeeModelIter *iter);
+
+  void            (*set_schema_full)    (DeeModel          *self,
+                                         const char* const *column_schemas,
+                                         guint              num_columns);
+
+  const gchar* const* (*get_schema)     (DeeModel     *self,
+                                         guint        *num_columns);
+
+  const gchar*   (*get_column_schema)   (DeeModel     *self,
+                                         guint         column);
+  
+  guint          (*get_n_columns)   (DeeModel *self);
+
+  guint          (*get_n_rows)      (DeeModel *self);
+
+  DeeModelIter*  (*append_row)    (DeeModel  *self,
+                                   GVariant **row_members);
+
+  DeeModelIter*  (*prepend_row)   (DeeModel  *self,
+                                   GVariant **row_members);
+
+  DeeModelIter*  (*insert_row)    (DeeModel  *self,
+                                   guint      pos,
+                                   GVariant **row_members);
+
+  DeeModelIter*  (*insert_row_before) (DeeModel      *self,
+                                       DeeModelIter  *iter,
+                                       GVariant     **row_members);
+
+  DeeModelIter*  (*insert_row_sorted)  (DeeModel           *self,
+                                        GVariant          **row_members,
+                                        DeeCompareRowFunc   cmp_func,
+                                        gpointer            user_data);
+
+  DeeModelIter*  (*find_row_sorted)    (DeeModel           *self,
+                                        GVariant          **row_spec,
+                                        DeeCompareRowFunc   cmp_func,
+                                        gpointer            user_data,
+                                        gboolean           *out_was_found);
+
+  void           (*remove)          (DeeModel     *self,
+                                     DeeModelIter *iter);
+
+  void           (*clear)           (DeeModel *self);
+
+  void           (*set_value)       (DeeModel       *self,
+                                     DeeModelIter   *iter,
+                                     guint           column,
+                                     GVariant       *value);
+  
+  void           (*set_row)         (DeeModel       *self,
+                                     DeeModelIter   *iter,
+                                     GVariant      **row_members);
+
+  GVariant*      (*get_value)       (DeeModel     *self,
+                                     DeeModelIter *iter,
+                                     guint         column);
+  
+  DeeModelIter* (*get_first_iter)  (DeeModel     *self);
+
+  DeeModelIter* (*get_last_iter)   (DeeModel     *self);
+
+  DeeModelIter* (*get_iter_at_row) (DeeModel     *self,
+                                    guint          row);
+
+  gboolean       (*get_bool)        (DeeModel     *self,
+                                     DeeModelIter *iter,
+                                     guint         column);
+
+  guchar         (*get_uchar)       (DeeModel     *self,
+                                     DeeModelIter *iter,
+                                     guint         column);
+
+  gint32         (*get_int32)       (DeeModel     *self,
+                                     DeeModelIter *iter,
+                                     guint         column);
+
+  guint32        (*get_uint32)      (DeeModel     *self,
+                                     DeeModelIter *iter,
+                                     guint         column);
+
+  gint64         (*get_int64)       (DeeModel     *self,
+                                     DeeModelIter *iter,
+                                     guint         column);
+
+  guint64        (*get_uint64)      (DeeModel     *self,
+                                     DeeModelIter *iter,
+                                     guint         column);
+
+  gdouble        (*get_double)      (DeeModel     *self,
+                                     DeeModelIter *iter,
+                                     guint         column);
+
+  const gchar*   (*get_string)      (DeeModel     *self,
+                                     DeeModelIter *iter,
+                                     guint         column);
+
+  DeeModelIter*  (*next)            (DeeModel     *self,
+                                     DeeModelIter *iter);
+
+  DeeModelIter*  (*prev)            (DeeModel     *self,
+                                     DeeModelIter *iter);
+
+  gboolean       (*is_first)        (DeeModel     *self,
+                                     DeeModelIter *iter);
+
+  gboolean       (*is_last)         (DeeModel     *self,
+                                     DeeModelIter *iter);
+
+  guint          (*get_position)    (DeeModel     *self,
+                                     DeeModelIter *iter);
+
+  DeeModelTag*   (*register_tag)    (DeeModel       *self,
+                                     GDestroyNotify  tag_destroy);
+
+  gpointer       (*get_tag)         (DeeModel       *self,
+                                     DeeModelIter   *iter,
+                                     DeeModelTag    *tag);
+
+  void           (*set_tag)         (DeeModel       *self,
+                                     DeeModelIter   *iter,
+                                     DeeModelTag    *tag,
+                                     gpointer        value);
+  
+  GVariant**     (*get_row)         (DeeModel       *self,
+                                     DeeModelIter   *iter,
+                                     GVariant      **out_row_members);
+};
+
+

+

+
+
+
+

DeeModelIter

+
typedef struct _DeeModelIter DeeModelIter;
+

+The DeeModelIter structure is private and should only be used with the +provided DeeModel API. It is owned by DeeModel and should not be freed. +

+
+
+
+

DeeModelTag

+
typedef struct _DeeModelTag DeeModelTag;
+

+The DeeModelTag structure is private and should only be used with the +provided DeeModel API. It is owned by DeeModel and should not be freed. +

+
+
+
+

dee_model_append ()

+
DeeModelIter *      dee_model_append                    (DeeModel *self,
+                                                         ...);
+

+Creates and appends a new row to the end of a DeeModel, setting the row +values upon creation. +

+

+For and example see dee_model_insert_before(). +

+
++ + + + + + + + + + +

self :

a DeeModel +

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_append_row ()

+
DeeModelIter *      dee_model_append_row                (DeeModel *self,
+                                                         GVariant **row_members);
+

+Like dee_model_append() but intended for language bindings or +situations where you work with models on a meta level and may not have +a prior knowledge of the column schemas of the models. See also +dee_model_build_row(). +

+
++ + + + + + + + + + + + + + +

self :

The model to prepend a row to

row_members :

An array of GVariants with type +signature matching those of the column schemas of self. +If any of the variants have floating references they will be +consumed. [array zero-terminated=1] +

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_build_row ()

+
GVariant **         dee_model_build_row                 (DeeModel *self,
+                                                         GVariant **out_row_members,
+                                                         ...);
+

+Build an array of GVariants with values from the variadic argument +list according to the model schema for self. The caller must call +g_variant_ref_sink() and g_variant_unref() on all the returned variants and +g_free() the array itself if NULL was passed as out_row_members. +

+

+This is utility function and will not touch or modify self in any way. +

+
++ + + + + + + + + + + + + + +

self :

The model to create a row for

out_row_members :

An array to write the values to or NULL to allocate +a new array. If non-NULL it must have a length +that is longer or equal to the number of columns in self +

Returns :

If out_row_members is NULL a newly allocated array of variants +will be returned and the array must be freed with g_free(). +If out_row_members is nonNULL it will be reused, and variants in +the array may or may not have floating references, which means the +caller must make sure that g_variant_ref_sink() and +g_variant_unref() are called on them.
+
+
+
+

dee_model_clear ()

+
void                dee_model_clear                     (DeeModel *self);
+

+Removes all rows in the model. Signals are emitted for each row in the model +

+
++ + + + +

self :

a DeeModel object to clear
+
+
+
+

dee_model_clear_tag ()

+
void                dee_model_clear_tag                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         DeeModelTag *tag);
+

+This method is purely syntactic sugar for calling dee_model_set_tag() with +a value of NULL. It's included in order to help developers write more +readable code. +

+
++ + + + + + + + + + + + + + +

self :

The model to clear a tag on

iter :

The row to clear the tag from

tag :

The tag to clear from iter +
+
+
+
+

dee_model_find_row_sorted ()

+
DeeModelIter *      dee_model_find_row_sorted           (DeeModel *self,
+                                                         GVariant **row_spec,
+                                                         DeeCompareRowFunc cmp_func,
+                                                         gpointer user_data,
+                                                         gboolean *out_was_found);
+

+Finds a row in self according to the sorting specified by cmp_func. +This method will assume that self is already sorted by cmp_func. +

+

+If you use this method for searching you should only use +dee_model_insert_row_sorted() to insert rows in the model. +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

self :

The model to search

row_spec :

An array of +GVariants with type signature matching those of the +column schemas of self. No references will be taken on the variants. [array zero-terminated=1] +

cmp_func :

Callback used for comparison or rows. [scope call] +

user_data :

Arbitrary pointer passed to cmp_func during search. [closure] +

out_was_found :

A place to store a boolean value that will be set when +this method returns. If TRUE then an exact match was found. +If FALSE then the returned iter points to a row just after +where row_spec would have been inserted. +Pass NULL to ignore. [out] +

Returns :

If out_was_found is set to +TRUE then a DeeModelIter pointing to the first matching row. +If it is FALSE then the iter pointing to the row just after where +row_spec_would have been inserted. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_find_sorted ()

+
DeeModelIter *      dee_model_find_sorted               (DeeModel *self,
+                                                         DeeCompareRowFunc cmp_func,
+                                                         gpointer user_data,
+                                                         gboolean *out_was_found,
+                                                         ...);
+

+Finds a row in self according to the sorting specified by cmp_func. +This method will assume that self is already sorted by cmp_func. +

+

+If you use this method for searching you should only use +dee_model_insert_row_sorted() to insert rows in the model. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

self :

The model to search

cmp_func :

Callback used for comparison or rows. [scope call] +

user_data :

Arbitrary pointer passed to cmp_func during search. [closure] +

out_was_found :

A place to store a boolean value that will be set when +this method returns. If TRUE then an exact match was found. +If FALSE then the returned iter points to a row just after +where row_spec would have been inserted. +Pass NULL to ignore. [out] +

Returns :

If out_was_found is set to +TRUE then a DeeModelIter pointing to the first matching row. +If it is FALSE then the iter pointing to the row just after where +row_spec_would have been inserted. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_get ()

+
void                dee_model_get                       (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         ...);
+

+Gets all the values across the entire row referenced by iter. The +variable argument list should contain pointers to variables that match +the column schemas of this model. +

+

+For all basic variant types (see g_variant_type_is_basic()) this method +expects pointers to their native C types while for all other types it +expects a pointer to a pointer to a GVariant. +

+

+For string values you are passed a constant reference which is owned by the +model, but any returned variants must be freed with g_variant_unref(). +

+

+For example, to get all values a model with signature ("u", "s", "as") you +would do: +

+
+ guint32      u;
+ const gchar *s;
+ GVariant    *v;
+
+ dee_model_get (model, iter, &u, &s, &v);
+
+ // do stuff
+
+ g_variant_unref (v);
+
+

+

+
++ + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +
+
+
+
+

dee_model_get_bool ()

+
gboolean            dee_model_get_bool                  (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

column :

the column to retrieve a boolean from

Returns :

if iter and column are valid, the boolean stored at column. +Otherwise FALSE +
+
+
+
+

dee_model_get_column_schema ()

+
const gchar *       dee_model_get_column_schema         (DeeModel *self,
+                                                         guint column);
+

+Get the GVariant signature of a column +

+
++ + + + + + + + + + + + + + +

self :

a DeeModel +

column :

the column to get retrieve the GVariant type string of

Returns :

the GVariant signature of the column at index column +
+
+
+
+

dee_model_get_double ()

+
gdouble             dee_model_get_double                (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

column :

the column to retrieve a double from

Returns :

if iter and column are valid, the double stored at column. +Otherwise 0.
+
+
+
+

dee_model_get_first_iter ()

+
DeeModelIter *      dee_model_get_first_iter            (DeeModel *self);
+

+Retrieves a DeeModelIter representing the first row in self. +

+
++ + + + + + + + + + +

self :

a DeeModel +

Returns :

A DeeModelIter (owned by self, do not +free it). [transfer none] +
+
+
+
+

dee_model_get_int32 ()

+
gint32              dee_model_get_int32                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

column :

the column to retrieve a int from

Returns :

if iter and column are valid, the int stored at column. +Otherwise 0.
+
+
+
+

dee_model_get_int64 ()

+
gint64              dee_model_get_int64                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

column :

the column to retrieve a int64 from

Returns :

if iter and column are valid, the int64 stored at column. +Otherwise 0.
+
+
+
+

dee_model_get_iter_at_row ()

+
DeeModelIter *      dee_model_get_iter_at_row           (DeeModel *self,
+                                                         guint row);
+

+Retrieves a DeeModelIter representing the row at the given index. +

+

+Note that this method does not have any performance guarantees. In particular +it is not guaranteed to be O(1). +

+
++ + + + + + + + + + + + + + +

self :

a DeeModel +

row :

position of the row to retrieve

Returns :

A new DeeModelIter, or NULL if row +was out of bounds. The returned iter is owned by self, so do not free it. [transfer none] +
+
+
+
+

dee_model_get_last_iter ()

+
DeeModelIter *      dee_model_get_last_iter             (DeeModel *self);
+

+Retrieves a DeeModelIter pointing right after the +last row in self. This is refered to also the the +end iter. +

+

+As with other iters the end iter, in particular, is stable over inserts, +changes, or removals. +

+
++ + + + + + + + + + +

self :

a DeeModel +

Returns :

A DeeModelIter (owned by self, do not +free it). [transfer none] +
+
+
+
+

dee_model_get_n_columns ()

+
guint               dee_model_get_n_columns             (DeeModel *self);
+

+Gets the number of columns in self +

+
++ + + + + + + + + + +

self :

a DeeModel +

Returns :

the number of columns per row in self +
+
+
+
+

dee_model_get_n_rows ()

+
guint               dee_model_get_n_rows                (DeeModel *self);
+

+Gets the number of rows in self +

+
++ + + + + + + + + + +

self :

a DeeModel +

Returns :

the number of rows in self +
+
+
+
+

dee_model_get_position ()

+
guint               dee_model_get_position              (DeeModel *self,
+                                                         DeeModelIter *iter);
+

+Get the numeric offset of iter into self. Note that this method is +not guaranteed to be O(1). +

+
++ + + + + + + + + + + + + + +

self :

The model to inspect

iter :

The iter to get the position of

Returns :

The integer offset of iter in self +
+
+
+
+

dee_model_get_row ()

+
GVariant **         dee_model_get_row                   (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         GVariant **out_row_members);
+
++ + + + + + + + + + + + + + + + + + +

self :

A DeeModel to get a row from

iter :

A DeeModelIter pointing to the row to get

out_row_members :

An array of variants with a length bigger than or equal to +the number of columns in self, or NULL. If you pass +NULL here a new array will be allocated for you. The +returned variants will have a non-floating reference. [array][out][allow-none][default NULL] +

Returns :

+out_row_members if it was not NULL +or a newly allocated array otherwise which you must free +with g_free(). The variants in the array will have a strong +reference and needs to be freed with g_variant_unref(). [array zero-terminated=1] +
+
+
+
+

dee_model_get_schema ()

+
const gchar * const* dee_model_get_schema               (DeeModel *self,
+                                                         guint *num_columns);
+

+Get a NULL-terminated array of GVariant type strings that defines the +required formats for the columns of self. +

+
++ + + + + + + + + + + + + + +

self :

The DeeModel to get the the schema for

num_columns :

Address of an integer in which to store the +number of columns in self. Or NULL to ignore the array length. [out][allow-none] +

Returns :

A NULL-terminated array of GVariant type strings. The length of +the returned array is written to num_columns. The returned array +should not be freed or modified. It is owned by the model. [array length=num_columns][element-type utf8][transfer none] +
+
+
+
+

dee_model_get_string ()

+
const gchar *       dee_model_get_string                (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

column :

the column to retrieve a string from

Returns :

if iter and column are valid, the string stored at column. +Otherwise NULL.
+
+
+
+

dee_model_get_tag ()

+
gpointer            dee_model_get_tag                   (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         DeeModelTag *tag);
+

+Look up a tag value for a given row in a model. This method is guaranteed +to be O(1). +

+
++ + + + + + + + + + + + + + + + + + +

self :

The model to get a tag from

iter :

A DeeModelIter pointing to the row to get the tag from

tag :

The tag handle to retrieve the tag value for

Returns :

Returns NULL if tag is unset otherwise the +value of the tag as it was set with dee_model_set_tag(). [transfer none] +
+
+
+
+

dee_model_get_uchar ()

+
guchar              dee_model_get_uchar                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

column :

the column to retrieve a uchar from

Returns :

if iter and column are valid, the uchar stored at column. +Otherwise 0.
+
+
+
+

dee_model_get_uint32 ()

+
guint32             dee_model_get_uint32                (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

column :

the column to retrieve a uint from

Returns :

if iter and column are valid, the uint stored at column. +Otherwise 0.
+
+
+
+

dee_model_get_uint64 ()

+
guint64             dee_model_get_uint64                (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

column :

the column to retrieve a uint64 from

Returns :

if iter and column are valid, the uint64 stored at column. +Otherwise 0.
+
+
+
+

dee_model_get_value ()

+
GVariant *          dee_model_get_value                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column);
+
++ + + + + + + + + + + + + + + + + + +

self :

The DeeModel to inspect

iter :

a DeeModelIter pointing to the row to inspect

column :

column number to retrieve the value from

Returns :

A, guaranteed non-floating, reference to a +GVariant containing the row data. Free with g_variant_unref(). [transfer full] +
+
+
+
+

dee_model_insert ()

+
DeeModelIter *      dee_model_insert                    (DeeModel *self,
+                                                         guint pos,
+                                                         ...);
+

+Creates and inserts a new row into a DeeModel, pushing the existing +rows down. +

+

+For and example see dee_model_insert_before(). +

+
++ + + + + + + + + + + + + + +

self :

a DeeModel +

pos :

The index to insert the row on. The existing row will be pushed down

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_insert_before ()

+
DeeModelIter *      dee_model_insert_before             (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         ...);
+

+Creates and inserts a new row into a DeeModel just before the row pointed +to by iter. +

+

+For example, to insert a new row in a model with schema ("u", "s", "as") +you would do: +

+

+

+
+ DeeModelIter    *iter;
+ GVariantBuilder  b;
+
+ g_variant_builder_init (&b, "as");
+ g_variant_builder_add (&b, "s", "Hello");
+ g_variant_builder_add (&b, "s", "World");
+
+ iter = find_my_special_row (model);
+ dee_model_insert_before (model, iter,
+                          27,
+                          "Howdy",
+                          g_variant_builder_end (&b));
+
+

+

+
++ + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

An iter pointing to the row before which to insert the new one

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_insert_row ()

+
DeeModelIter *      dee_model_insert_row                (DeeModel *self,
+                                                         guint pos,
+                                                         GVariant **row_members);
+

+As dee_model_insert(), but intended for language bindings or +situations where you work with models on a meta level and may not have +a priori knowledge of the column schemas of the models. See also +dee_model_build_row(). +

+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

pos :

The index to insert the row on. The existing row will be pushed down.

row_members :

An array of +GVariants with type signature matching those of +the column schemas of self. If any of the variants have +floating references they will be consumed. [array zero-terminated=1] +

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_insert_row_before ()

+
DeeModelIter *      dee_model_insert_row_before         (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         GVariant **row_members);
+

+As dee_model_insert_before(), but intended for language bindings or +situations where you work with models on a meta level and may not have +a priori knowledge of the column schemas of the models. See also +dee_model_build_row(). +

+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

An iter pointing to the row before which to insert the new one

row_members :

An array of +GVariants with type signature matching those of the +column schemas of self. If any of the variants have floating +references they will be consumed. [array zero-terminated=1] +

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_insert_row_sorted ()

+
DeeModelIter *      dee_model_insert_row_sorted         (DeeModel *self,
+                                                         GVariant **row_members,
+                                                         DeeCompareRowFunc cmp_func,
+                                                         gpointer user_data);
+

+Inserts a row in self according to the sorting specified by cmp_func. +If you use this method for insertion you should not use other methods as this +method assumes the model to be already sorted by cmp_func. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

self :

The model to do a sorted insert on

row_members :

An array of +GVariants with type signature matching those of the +column schemas of self. If any of the variants have floating +references they will be consumed. [array zero-terminated=1] +

cmp_func :

Callback used for comparison or rows. [scope call] +

user_data :

Arbitrary pointer passed to cmp_func during search. [closure] +

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_insert_sorted ()

+
DeeModelIter *      dee_model_insert_sorted             (DeeModel *self,
+                                                         DeeCompareRowFunc cmp_func,
+                                                         gpointer user_data,
+                                                         ...);
+

+Convenience function for calling dee_model_insert_row_sorted(). +Inserts a row in self according to the sorting specified by cmp_func. +If you use this method for insertion you should not use other methods as this +method assumes the model to be already sorted by cmp_func. +

+
++ + + + + + + + + + + + + + + + + + +

self :

The model to do a sorted insert on

cmp_func :

Callback used for comparison or rows. [scope call] +

user_data :

Arbitrary pointer passed to cmp_func during search. [closure] +

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_is_first ()

+
gboolean            dee_model_is_first                  (DeeModel *self,
+                                                         DeeModelIter *iter);
+

+Checks if iter is the very first iter self. +

+
++ + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

Returns :

+TRUE if iter is the first iter in the model
+
+
+
+

dee_model_is_last ()

+
gboolean            dee_model_is_last                   (DeeModel *self,
+                                                         DeeModelIter *iter);
+

+Whether iter is the end iter of self. Note that the end iter points +right after the last valid row in self. +

+
++ + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

Returns :

+TRUE if iter is the last iter in the model
+
+
+
+

dee_model_next ()

+
DeeModelIter *      dee_model_next                      (DeeModel *self,
+                                                         DeeModelIter *iter);
+

+Returns a DeeModelIter that points to the next position in the model. +

+
++ + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

Returns :

A DeeModelIter, pointing to the next row in +the model. The iter is owned by self, do not free it. [transfer none] +
+
+
+
+

dee_model_prepend ()

+
DeeModelIter *      dee_model_prepend                   (DeeModel *self,
+                                                         ...);
+

+Creates and prepends a new row to the beginning of a DeeModel, setting the +row values upon creation. +

+
++ + + + + + + + + + +

self :

a DeeModel +

Returns :

A DeeModelIter pointing to the new row +Example: +
+DeeModel *model;
+model = ...
+dee_model_set_schema (model, "i", "s", NULL);
+dee_model_prepend (model, 10, "Rooney");
+
. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_prepend_row ()

+
DeeModelIter *      dee_model_prepend_row               (DeeModel *self,
+                                                         GVariant **row_members);
+

+Like dee_model_prepend() but intended for language bindings or +situations where you work with models on a meta level and may not have +a priori knowledge of the column schemas of the models. See also +dee_model_build_row(). +

+
++ + + + + + + + + + + + + + +

self :

The model to prepend a row to

row_members :

An array of +GVariants with type signature matching those of +the column schemas of self. If any of the variants have +floating references they will be consumed. [array zero-terminated=1] +

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] +
+
+
+
+

dee_model_prev ()

+
DeeModelIter *      dee_model_prev                      (DeeModel *self,
+                                                         DeeModelIter *iter);
+

+Returns a DeeModelIter that points to the previous position in the model. +

+
++ + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

Returns :

A DeeModelIter, pointing to the previous +row in the model. The iter is owned by self, do not free it. [transfer none] +
+
+
+
+

dee_model_register_tag ()

+
DeeModelTag *       dee_model_register_tag              (DeeModel *self,
+                                                         GDestroyNotify tag_destroy);
+

+Register a new tag on a DeeModel. A tag is an extra +value attached to a given row on a model. The tags are invisible to all +that doesn't have the tag handle returned by this method. DeeModel +implementations must ensure that dee_model_get_tag() is an O(1) operation. +

+

+Tags can be very useful in associating some extra data to a row in a model +and have that automatically synced when the model changes. If you're +writing a tiled view for a model you might want to tag each row with the +tile widget for that row. That way you have very convenient access to the +tile widget given any row in the model. +

+

+The private nature of tags and the fact that you can store arbitrary pointers +and binary data in them also means that they are not serialized if you +utilize a model implementation that exposes the DeeSerializable interface. +

+
++ + + + + + + + + + + + + + +

self :

The model to register a tag on

tag_destroy :

Function called when a tagged row is removed from the model. +This function will also be called on all tagged rows when the +model is finalized.

Returns :

A DeeModelTag handle +that you can use to set and get tags with. [transfer none][type Dee.ModelTag] +
+
+
+
+

dee_model_remove ()

+
void                dee_model_remove                    (DeeModel *self,
+                                                         DeeModelIter *iter);
+

+Removes the row at the given position from the model. +

+
++ + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter pointing to the row to remove
+
+
+
+

dee_model_set ()

+
void                dee_model_set                       (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         ...);
+

+Sets all values across the entire row referenced by iter. The +variable argument list should contain values that match the column schemas +for the model. All basic variant type (see g_variant_type_is_basic()) are +passed in as their raw C type while all other types are passed in boxed in +a GVariant. Any floating references on variants passed to this method are +consumed. +

+

+For example, to set the values for a row on model with the schema +("u", "s", "as"): +

+
+  GVariantBuilder b;
+
+  g_variant_builder_init (&b, "as");
+  g_variant_builder_add (&b, "Hello");
+  g_variant_builder_add (&b, "World");
+
+  dee_model_set (model, iter, 27, "foo", g_variant_builder_end (&b));
+
+

+

+
++ + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +
+
+
+
+

dee_model_set_row ()

+
void                dee_model_set_row                   (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         GVariant **row_members);
+

+Sets all columns in the row iter points to, to those found in +row_members. The variants in row_members must match the types defined in +the model's schema. +

+
++ + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

row_members :

And array of +GVariants with type signature matching +those from the model schema. If any of the variants have +floating references these will be consumed. [array] +
+
+
+
+

dee_model_set_schema ()

+
void                dee_model_set_schema                (DeeModel *self,
+                                                         ...);
+

+Set the GVariant types and the number of columns used by self. +This method must be called exactly once before using self. Note that +some constructors will do this for you. +

+

+To create a model with three columns; a 32 bit integer, a string, +and lastly an array of strings, you would do: +

+
+ DeeModel *model;
+ model = dee_sequence_model_new ();
+ dee_model_set_schema (model, "i", "s", "as", NULL);
+
+

+

+
++ + + + +

self :

The DeeModel to set the column layout for
+
+
+
+

dee_model_set_schema_full ()

+
void                dee_model_set_schema_full           (DeeModel *self,
+                                                         const gchar * const *column_schemas,
+                                                         guint num_columns);
+

+Set the GVariant types and the number of columns used by self. +This method must be called exactly once before using self. Note that +some constructors will do this for you. +

+
++ + + + + + + + + + + + + + +

self :

The DeeModel to set the column layout for

column_schemas :

A list of GVariant type strings terminated by a NULL. [array length=num_columns zero-terminated=1][element-type utf8][transfer none] +

num_columns :

an integer specifying the array length for VarArgs +
+
+
+
+

dee_model_set_tag ()

+
void                dee_model_set_tag                   (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         DeeModelTag *tag,
+                                                         gpointer value);
+

+Set a tag on a row in a model. This function is guaranteed to be O(1). +See also dee_model_register_tag(). +

+

+If tag is already set on this row the existing tag value will be destroyed +with the GDestroyNotify passed to the dee_model_register_tag(). +

+
++ + + + + + + + + + + + + + + + + + +

self :

The model to set a tag on

iter :

The row to set the tag on

tag :

The tag handle for the tag as obtained from dee_model_register_tag() +

value :

The value to set for tag. Note that NULL represents an unset tag
+
+
+
+

dee_model_set_value ()

+
void                dee_model_set_value                 (DeeModel *self,
+                                                         DeeModelIter *iter,
+                                                         guint column,
+                                                         GVariant *value);
+

+Sets the data in column for the row iter points to, to value. The type +of value must be convertible to the type of the column. +

+

+When this method call completes the model will emit ::row-changed. You can +edit the model in place without triggering the change signals by calling +dee_model_set_value_silently(). +

+
++ + + + + + + + + + + + + + + + + + +

self :

a DeeModel +

iter :

a DeeModelIter +

column :

column number to set the value

value :

New value for cell. If value is a floating reference the model +will assume ownership of the variant
+
+
+
+ + + \ No newline at end of file diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-DeeResourceManager.html dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-DeeResourceManager.html --- dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-DeeResourceManager.html 1970-01-01 00:00:00.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-DeeResourceManager.html 2012-04-12 07:21:57.000000000 +0000 @@ -0,0 +1,203 @@ + + + + +DeeResourceManager + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

DeeResourceManager

+

DeeResourceManager — Store and load DeeSerializables by name

+
+
+

Synopsis

+
+#include <dee.h>
+
+struct              DeeResourceManagerIface;
+DeeResourceManager * dee_resource_manager_get_default   (void);
+GObject *           dee_resource_manager_load           (DeeResourceManager *self,
+                                                         const gchar *resource_name,
+                                                         GError **error);
+gboolean            dee_resource_manager_store          (DeeResourceManager *self,
+                                                         DeeSerializable *resource,
+                                                         const gchar *resource_name,
+                                                         GError **error);
+
+
+
+

Description

+

+The DeeResourceManager API provides a simple API for storing and loading +DeeSerializables from some persistent storage. The resources +are stored in a flat structure identified by names that should be chosen +similarly to DBus names. That is reverse domain names ala +net.launchpad.Example.MyData. +

+
+
+

Details

+
+

struct DeeResourceManagerIface

+
struct DeeResourceManagerIface {
+  GTypeInterface g_iface;
+
+  gboolean       (*store)         (DeeResourceManager  *self,
+                                   DeeSerializable     *resource,
+                                   const gchar         *resource_name,
+                                   GError             **error);
+
+  GObject*       (*load)          (DeeResourceManager  *self,
+                                   const gchar         *resource_name,
+                                   GError             **error);
+};
+
+

+

+
+
+
+

dee_resource_manager_get_default ()

+
DeeResourceManager * dee_resource_manager_get_default   (void);
+

+Get a pointer to the platform default DeeResourceManager. +

+
++ + + + +

Returns :

The default resource manager for the platform. +Do not unreference. If you need to keep the instance around +you must manually reference it. [transfer none] +
+
+
+
+

dee_resource_manager_load ()

+
GObject *           dee_resource_manager_load           (DeeResourceManager *self,
+                                                         const gchar *resource_name,
+                                                         GError **error);
+

+Load a resource from persistent storage. The loaded resource will be of the +same GType as when it was stored (provided that the same serialization and +parse functions are registered). +

+

+In case of an error the error will be in the GFileError domain. Specifically +if there is no resource with the name resource_name the error code will +be G_FILE_ERROR_NOENT. +

+

+Important note: This call may do blocking IO. The resource manager must +guarantee that this call is reasonably fast, like writing the externalized +resource to a file, but not blocking IO over a network socket. +

+
++ + + + + + + + + + + + + + + + + + +

self :

The resource manager to invoke

resource_name :

The name of the resource to retrieve

error :

A return location for a GError pointer. NULL to ignore errors

Returns :

A newly allocated GObject in case of success +and NULL otherwise. In case of a runtime error the error +pointer will be set. [transfer full] +
+
+
+
+

dee_resource_manager_store ()

+
gboolean            dee_resource_manager_store          (DeeResourceManager *self,
+                                                         DeeSerializable *resource,
+                                                         const gchar *resource_name,
+                                                         GError **error);
+

+Store a resource under a given name. The resource manager must guarantee +that the stored data survives system reboots and that you can recreate a +copy of resource by calling dee_resource_manager_load() using the +same resource_name. +

+

+Important note: This call may do blocking IO. The resource manager must +guarantee that this call is reasonably fast, like writing the externalized +resource to a file, but not blocking IO over a network socket. +

+
++ + + + + + + + + + + + + + + + + + + + + + +

self :

The resource manager to invoke

resource :

A DeeSerializable to store under resource_name. [transfer none] +

resource_name :

The name to store the resource under. Will overwrite any +existing resource with the same name

error :

A return location for a GError pointer. NULL to ignore errors

Returns :

+TRUE on success and FALSE otherwise. In case of a runtime +error the error pointer will point to a GError in the +DeeResourceError domain.
+
+
+
+ + + \ No newline at end of file diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-DeeResultSet.html dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-DeeResultSet.html --- dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-DeeResultSet.html 1970-01-01 00:00:00.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-DeeResultSet.html 2012-04-12 07:21:57.000000000 +0000 @@ -0,0 +1,267 @@ + + + + +DeeResultSet + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

DeeResultSet

+

DeeResultSet — Cursor-like interface for results sets

+
+ +
+

Description

+

+Interface for results returned by dee_index_lookup(). +

+

+This interface utilizes a cursor-like metaphor. You advance the cursor +by calling dee_result_set_next() or adjust it manually by calling +dee_result_set_seek(). +

+

+Calling dee_result_set_next() will also return the row at the +current cursor position. You may retrieve the current row without advancing +the cursor by calling dee_result_set_peek(). +

+
+
+

Details

+
+

struct DeeResultSetIface

+
struct DeeResultSetIface {
+  GTypeInterface g_iface;
+
+  guint           (*get_n_rows)        (DeeResultSet *self);
+
+  DeeModelIter*   (*next)              (DeeResultSet *self);
+
+  gboolean        (*has_next)          (DeeResultSet *self);
+  
+  DeeModelIter*   (*peek)              (DeeResultSet *self);
+
+  void            (*seek)              (DeeResultSet *self,
+                                        guint         pos);
+
+  guint           (*tell)              (DeeResultSet *self);
+
+  DeeModel*       (*get_model)         (DeeResultSet *self);
+};
+
+

+

+
+
+
+

dee_result_set_get_model ()

+
DeeModel *          dee_result_set_get_model            (DeeResultSet *self);
+

+Get the model associated with a result set +

+
++ + + + + + + + + + +

self :

The DeeResultSet to get the mode for

Returns :

The model that the rows point into. [transfer none] +
+
+
+
+

dee_result_set_get_n_rows ()

+
guint               dee_result_set_get_n_rows           (DeeResultSet *self);
+

+Get the number of DeeModelIters held in a DeeResultSet. +

+
++ + + + + + + + + + +

self :

The DeeResultSet to get the size of

Returns :

The number of rows held in the result set
+
+
+
+

dee_result_set_has_next ()

+
gboolean            dee_result_set_has_next             (DeeResultSet *self);
+

+Check if a call to dee_result_set_next() will succeed. +

+
++ + + + + + + + + + +

self :

The DeeResultSet to check

Returns :

+TRUE if and only if more rows can be retrieved by calling +dee_result_set_next() +
+
+
+
+

dee_result_set_next ()

+
DeeModelIter *      dee_result_set_next                 (DeeResultSet *self);
+

+Get the current row from the result set and advance the cursor. +To ensure that calls to this method will succeed you can call +dee_result_set_has_next(). +

+

+To retrieve the current row without advancing the cursor call +dee_result_set_peek() in stead of this method. +

+
++ + + + + + + + + + +

self :

The DeeResultSet to get a row from

Returns :

The DeeModelIter at the current cursor position. [transfer none] +
+
+
+
+

dee_result_set_peek ()

+
DeeModelIter *      dee_result_set_peek                 (DeeResultSet *self);
+

+Get the row at the current cursor position. +

+

+To retrieve the current row and advance the cursor position call +dee_result_set_next() in stead of this method. +

+
++ + + + + + + + + + +

self :

The DeeResultSet to get a row from

Returns :

The DeeModelIter at the current cursor position. [transfer none] +
+
+
+
+

dee_result_set_seek ()

+
void                dee_result_set_seek                 (DeeResultSet *self,
+                                                         guint pos);
+

+Set the cursor position. Following calls to dee_result_set_peek() +or dee_result_set_next() will read the row at position pos. +

+
++ + + + + + + + + + +

self :

The DeeResultSet to seek in

pos :

The position to seek to
+
+
+
+

dee_result_set_tell ()

+
guint               dee_result_set_tell                 (DeeResultSet *self);
+

+Get the current position of the cursor. +

+
++ + + + + + + + + + +

self :

The DeeResultSet to check the cursor position for

Returns :

The current position of the cursor
+
+
+
+ + + \ No newline at end of file diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-DeeSerializable.html dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-DeeSerializable.html --- dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-DeeSerializable.html 1970-01-01 00:00:00.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-DeeSerializable.html 2012-04-12 07:21:57.000000000 +0000 @@ -0,0 +1,316 @@ + + + + +DeeSerializable + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

DeeSerializable

+

DeeSerializable — Interface for classes that can serialize to and from GVariants

+
+ +
+

Description

+

+Interface for classes that can serialize to and from GVariants. +

+

+There are two serialization concepts supported by this API: +serialization and externalization. +A serialized instance is created with dee_serializable_serialize() and can +be read back with dee_serializable_parse() provided you know the correct +GType for the serialized data. The GVariant representation of your +serialized data is guaranteed to be exactly as you implement yourself in the +serialize vfunc of the DeeSerializableIface. +

+

+With externalized instances you don't have to know the correct GType to +recreate the instance. The GType is encoded in the data itself. When you're +using dee_serializable_externalize() your data will be wrapped in a container +format with the required object metadata to read it back. For this reason +dee_serializable_parse_external() doesn't require you to pass in the GType +you want to deserialize. +

+

+

+
+

On Subclasses of DeeSerializable Types

+

+As a rule of thumb you need to re-implement the DeeSerializable interface +and install parse functions with dee_serializable_register_parser() every +time you create a new class derived from a DeeSerializable superclass. +

+

+In case a subclass does not provide it's own serialization interface +Dee will recurse upwards in the type hierarchy and use the serialization and +parser implementations of the first superclass with the required behaviour. +This means that the parsed instance will not be an +instance of the subclass but only of the serializable superclass. +Caveat emptor. +

+
+

+

+
+
+

Details

+
+

struct DeeSerializableIface

+
struct DeeSerializableIface {
+  GTypeInterface g_iface;
+
+  GVariant*       (*serialize)         (DeeSerializable *self);
+};
+
+

+

+
+
+
+

DeeSerializableParseFunc ()

+
GObject *           (*DeeSerializableParseFunc)         (GVariant *data);
+
++ + + + + + + + + + +

data :

A GVariant with type signature as passed to +dee_serializable_register_parser() when the parser was registered. +The variant is not referenced.

Returns :

A newly constructed GObject of the GType +used when registering the parser. Note that since +the environment guarantees that the input data is valid +according to the registration information this function +can not fail. Thus NULL is not a valid return value. [transfer full] +
+
+
+
+

dee_serializable_externalize ()

+
GVariant *          dee_serializable_externalize        (DeeSerializable *self);
+

+Build an externalized form of self which can be used together with +dee_serializable_parse_external() to rebuild a copy of self. +

+

+It is important to note that the variant returned from this method does +not have the same type signature as returned from a call to +dee_serializable_serialize(). Externalization will wrap the serialized data +in a container format with versioning information and headers with type +information. +

+
++ + + + + + + + + + +

self :

The instance to externalize

Returns :

A floating reference to a GVariant with the externalized data.
+
+
+
+

dee_serializable_parse ()

+
GObject *           dee_serializable_parse              (GVariant *data,
+                                                         GType type);
+

+Reconstruct a DeeSerializable from GVariant data. For this function +to work you need to register a parser with +dee_serializable_register_parser(). Any native Dee class will do so +automatically. +

+

+This method only works on data created with dee_serializable_serialize() +and not with data from dee_serializable_externalize(). +

+

+Since a DeeSerializableParseFunc is not allowed to fail - by contract - +it can be guaranteed that this function only returns NULL in case there +is no known parser for type and GVariant signature of data. +

+
++ + + + + + + + + + + + + + +

data :

The GVariant data to parse. If this is a floating reference it will +be consumed

type :

The GType of the class to instantiate from data +

Returns :

A newly constructed GObject build from data +or NULL in case no parser has been registered for the given +GType or variant signature. Free with g_object_unref(). [transfer full] +
+
+
+
+

dee_serializable_parse_external ()

+
GObject *           dee_serializable_parse_external     (GVariant *data);
+

+Reconstruct a DeeSerializable from GVariant data. For this function +to work you need to register a parser with +dee_serializable_register_parser(). Any native Dee class will do so +automatically. +

+

+This method only works on data created with dee_serializable_externalize() +and not with data from dee_serializable_serialize(). +

+

+Since a DeeSerializableParseFunc is not allowed to fail - by contract - +it can be guaranteed that this function only returns NULL in case there +is no known parser for the GType or GVariant signature of data. +

+
++ + + + + + + + + + +

data :

The GVariant data to parse

Returns :

A newly constructed GObject build from data +or NULL in case no parser has been registered for the given +GType or variant signature. Free with g_object_unref(). [transfer full] +
+
+
+
+

dee_serializable_register_parser ()

+
void                dee_serializable_register_parser    (GType type,
+                                                         const GVariantType *vtype,
+                                                         DeeSerializableParseFunc parse_func);
+

+Register a parser that can convert GVariant data into an instance of +a given GType. Note that you can register more than one parser for the +same GType provided that you give them different variant type signatures. +

+

+If there is already a parser registered for the given type and vtype +it will be silently replaced. +

+

+The recommended behaviour is that GObject classes register their parsers in +their respective class init functions. +

+
++ + + + + + + + + + + + + + +

type :

The GType of the object class to register a parser for

vtype :

Variants to be converted must have this signature

parse_func :

A function to convert GVariant data into an instance of the +given type.
+
+
+
+

dee_serializable_serialize ()

+
GVariant *          dee_serializable_serialize          (DeeSerializable *self);
+

+Build a clean serialized representation of self. The signature of the +returned variant is entirely determined by the underlying implementation. +You can recreate a serialized instance by calling dee_serializable_parse() +provided that you know the correct GType for the serialized instance. +

+
++ + + + + + + + + + +

self :

The instance to serialize

Returns :

A reference to a GVariant with +the serialized data. The variants type signature is entirely +dependent of the underlying implementation. Free using +g_variant_unref(). [transfer full] +
+
+
+
+ + + \ No newline at end of file diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0.devhelp2 dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0.devhelp2 --- dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0.devhelp2 2012-03-23 11:41:28.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0.devhelp2 2012-04-12 07:21:57.000000000 +0000 @@ -3,12 +3,14 @@ + + - + @@ -20,27 +22,36 @@ - + + - - + + + + + + + + + + @@ -49,6 +60,14 @@ + + + + + + + + @@ -60,6 +79,7 @@ + @@ -72,59 +92,60 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -140,6 +161,7 @@ + @@ -148,6 +170,7 @@ + @@ -204,15 +227,14 @@ - - - - - - - - - + + + + + + + + @@ -226,26 +248,32 @@ + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-Filters.html dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-Filters.html --- dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-Filters.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-Filters.html 2012-04-12 07:21:57.000000000 +0000 @@ -41,16 +41,16 @@ #include <dee.h> DeeFilter; -void (*DeeFilterMapFunc) (DeeModel *orig_model, +void (*DeeFilterMapFunc) (DeeModel *orig_model, DeeFilterModel *filter_model, gpointer user_data); -gboolean (*DeeFilterMapNotify) (DeeModel *orig_model, - DeeModelIter *orig_iter, +gboolean (*DeeFilterMapNotify) (DeeModel *orig_model, + DeeModelIter *orig_iter, DeeFilterModel *filter_model, gpointer user_data); void dee_filter_destroy (DeeFilter *filter); void dee_filter_map (DeeFilter *filter, - DeeModel *orig_model, + DeeModel *orig_model, DeeFilterModel *filter_model); void dee_filter_new (DeeFilterMapFunc map_func, DeeFilterMapNotify map_notify, @@ -70,9 +70,13 @@ void dee_filter_new_regex (guint column, GRegex *regex, DeeFilter *out_filter); +void dee_filter_new_sort (DeeCompareRowFunc cmp_row, + gpointer cmp_user_data, + GDestroyNotify cmp_destroy, + DeeFilter *out_filter); gboolean dee_filter_notify (DeeFilter *filter, - DeeModelIter *orig_iter, - DeeModel *orig_model, + DeeModelIter *orig_iter, + DeeModel *orig_model, DeeFilterModel *filter_model); @@ -80,7 +84,7 @@

Description

DeeFilters are used together with DeeFilterModels to build -"views" of some original DeeModel. An example could be to build a view +"views" of some original DeeModel. An example could be to build a view of a model that exposes the rows of the original model sorted by a given column (leaving the original model unaltered):

@@ -151,7 +155,7 @@

DeeFilterMapFunc ()

-
void                (*DeeFilterMapFunc)                 (DeeModel *orig_model,
+
void                (*DeeFilterMapFunc)                 (DeeModel *orig_model,
                                                          DeeFilterModel *filter_model,
                                                          gpointer user_data);

@@ -190,8 +194,8 @@


DeeFilterMapNotify ()

-
gboolean            (*DeeFilterMapNotify)               (DeeModel *orig_model,
-                                                         DeeModelIter *orig_iter,
+
gboolean            (*DeeFilterMapNotify)               (DeeModel *orig_model,
+                                                         DeeModelIter *orig_iter,
                                                          DeeFilterModel *filter_model,
                                                          gpointer user_data);

@@ -209,7 +213,7 @@

orig_iter :

-A DeeModelIter pointing to the new row in orig_model +A DeeModelIter pointing to the new row in orig_model @@ -257,7 +261,7 @@

dee_filter_map ()

void                dee_filter_map                      (DeeFilter *filter,
-                                                         DeeModel *orig_model,
+                                                         DeeModel *orig_model,
                                                          DeeFilterModel *filter_model);

Call the DeeFilterMapFunc function of a DeeFilter. @@ -487,10 +491,49 @@


+

dee_filter_new_sort ()

+
void                dee_filter_new_sort                 (DeeCompareRowFunc cmp_row,
+                                                         gpointer cmp_user_data,
+                                                         GDestroyNotify cmp_destroy,
+                                                         DeeFilter *out_filter);
+

+Create a new DeeFilter sorting a model according to a DeeCompareRowFunc. +

+
++ + + + + + + + + + + + + + + + + + +

cmp_row :

A DeeCompareRowFunc to use for sorting. [scope notified] +

cmp_user_data :

User data passed to cmp_row. [closure] +

cmp_destroy :

The GDestroyNotify to call on +cmp_user_data when disposing of the filter. [allow-none] +

out_filter :

A pointer to an uninitialized DeeFilter struct. +This struct will zeroed and configured with the filter +parameters. [out] +
+
+
+

dee_filter_notify ()

gboolean            dee_filter_notify                   (DeeFilter *filter,
-                                                         DeeModelIter *orig_iter,
-                                                         DeeModel *orig_model,
+                                                         DeeModelIter *orig_iter,
+                                                         DeeModel *orig_model,
                                                          DeeFilterModel *filter_model);

Call the DeeFilterMapNotify function of a DeeFilter. @@ -505,7 +548,7 @@

orig_iter :

-The DeeModelIter added to orig_model +The DeeModelIter added to orig_model diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-Model-Readers.html dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-Model-Readers.html --- dee-1.0.8/doc/reference/dee-1.0/html/dee-1.0-Model-Readers.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/dee-1.0-Model-Readers.html 2012-04-12 07:21:57.000000000 +0000 @@ -7,7 +7,7 @@ - + @@ -18,7 +18,7 @@ Up Home Dee Reference Manual -Next +Next Top @@ -31,7 +31,7 @@

Model Readers

-

Model Readers — Extracting strings from DeeModels

+

Model Readers — Extracting strings from DeeModels

@@ -42,8 +42,8 @@ DeeFilter; DeeModelReader; -gchar * (*DeeModelReaderFunc) (DeeModel *model, - DeeModelIter *iter, +gchar * (*DeeModelReaderFunc) (DeeModel *model, + DeeModelIter *iter, gpointer userdata); void dee_model_reader_destroy (DeeModelReader *reader); void dee_model_reader_new (DeeModelReaderFunc reader_func, @@ -60,14 +60,14 @@ (guint column, DeeModelReader *out_reader); gchar * dee_model_reader_read (DeeModelReader *self, - DeeModel *model, - DeeModelIter *iter); + DeeModel *model, + DeeModelIter *iter);

Description

-The purpose of a DeeModelReader is to extract string from a DeeModel. +The purpose of a DeeModelReader is to extract string from a DeeModel. These strings are usually passed through a DeeAnalyzer on into a DeeIndex.

@@ -128,8 +128,8 @@


DeeModelReaderFunc ()

-
gchar *             (*DeeModelReaderFunc)               (DeeModel *model,
-                                                         DeeModelIter *iter,
+
gchar *             (*DeeModelReaderFunc)               (DeeModel *model,
+                                                         DeeModelIter *iter,
                                                          gpointer userdata);

Extracts a string from a row in a model. @@ -223,7 +223,7 @@ (guint column, DeeModelReader *out_reader);

-A DeeModelReader reading a gint32 from a DeeModel at a given column +A DeeModelReader reading a gint32 from a DeeModel at a given column

@@ -248,7 +248,7 @@ (guint column, DeeModelReader *out_reader);

-A DeeModelReader reading a string from a DeeModel at a given column +A DeeModelReader reading a string from a DeeModel at a given column

@@ -273,7 +273,7 @@ (guint column, DeeModelReader *out_reader);

-A DeeModelReader reading a guint32 from a DeeModel at a given column +A DeeModelReader reading a guint32 from a DeeModel at a given column

@@ -295,10 +295,10 @@

dee_model_reader_read ()

gchar *             dee_model_reader_read               (DeeModelReader *self,
-                                                         DeeModel *model,
-                                                         DeeModelIter *iter);
+ DeeModel *model, + DeeModelIter *iter);

-Read data from a row in a DeeModel and extract a string representation from +Read data from a row in a DeeModel and extract a string representation from it.

@@ -315,7 +315,7 @@

- + diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeAnalyzer.html dee-1.0.10/doc/reference/dee-1.0/html/DeeAnalyzer.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeAnalyzer.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeAnalyzer.html 2012-04-12 07:21:57.000000000 +0000 @@ -88,7 +88,7 @@

One of the important use cases of analyzers in Dee is as vessel for the -indexing logic for creating a DeeIndex from a DeeModel. +indexing logic for creating a DeeIndex from a DeeModel.

The recommended way to implement your own custom analyzers are by either diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeClient.html dee-1.0.10/doc/reference/dee-1.0/html/DeeClient.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeClient.html 1970-01-01 00:00:00.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeClient.html 2012-04-12 07:21:57.000000000 +0000 @@ -0,0 +1,150 @@ + + + + +DeeClient + + + + + + + + + +

model :

The DeeModel to read a string fromThe DeeModel to read a string from

iter :

+ + + + + + + + + +
+
+
+ + +
+

DeeClient

+

DeeClient — Creates a client object you can use to connect + to a DeeServer.

+
+
+

Synopsis

+
+#include <dee.h>
+
+                    DeeClient;
+                    DeeClientClass;
+DeeClient *         dee_client_new                      (const gchar *swarm_name);
+DeeClient *         dee_client_new_for_address          (const gchar *swarm_name,
+                                                         const gchar *bus_address);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----DeePeer
+         +----DeeClient
+
+
+
+

Properties

+
+  "bus-address"              gchar*                : Read / Write / Construct Only
+
+
+
+

Description

+

+DeeClient is the endpoint for connecting to DeeServer. +

+
+
+

Details

+
+

DeeClient

+
typedef struct _DeeClient DeeClient;
+

+

+
+
+
+

DeeClientClass

+
typedef struct {
+} DeeClientClass;
+
+

+

+
+
+
+

dee_client_new ()

+
DeeClient *         dee_client_new                      (const gchar *swarm_name);
+

+swarm_name: Name of swarm to join. +

+

+Creates a new instance of DeeClient and tries to connect to DeeServer +created using dee_server_new(). The "swarm-leader" property will +be set once the client connects. +

+
++ + + + +

Returns :

A newly constructed DeeClient. [transfer full] +
+
+
+
+

dee_client_new_for_address ()

+
DeeClient *         dee_client_new_for_address          (const gchar *swarm_name,
+                                                         const gchar *bus_address);
+

+swarm_name: Name of swarm to join. +bus_address: D-Bus address to use when connecting to the server. +

+

+Creates a new instance of DeeClient and tries to connect to bus_address. +The "swarm-leader" property will be set once the client connects. +

+
++ + + + +

Returns :

A newly constructed DeeClient. [transfer full] +
+
+
+
+

Property Details

+
+

The "bus-address" property

+
  "bus-address"              gchar*                : Read / Write / Construct Only
+

Bus address to use for the connection.

+

Default value: NULL

+
+
+
+ + + \ No newline at end of file diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeFileResourceManager.html dee-1.0.10/doc/reference/dee-1.0/html/DeeFileResourceManager.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeFileResourceManager.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeFileResourceManager.html 2012-04-12 07:21:57.000000000 +0000 @@ -7,7 +7,7 @@ - + @@ -18,7 +18,7 @@ Up Home Dee Reference Manual -Next +Next Top @@ -46,11 +46,11 @@
struct              DeeFileResourceManager;
 struct              DeeFileResourceManagerClass;
 void                dee_file_resource_manager_add_search_path
-                                                        (DeeResourceManager *self,
+                                                        (DeeResourceManager *self,
                                                          const gchar *path);
 const gchar *       dee_file_resource_manager_get_primary_path
-                                                        (DeeResourceManager *self);
-DeeResourceManager * dee_file_resource_manager_new      (const gchar *primary_path);
+                                                        (DeeResourceManager *self);
+DeeResourceManager * dee_file_resource_manager_new      (const gchar *primary_path);
 
@@ -64,7 +64,7 @@

Implemented Interfaces

DeeFileResourceManager implements - DeeResourceManager.

+ DeeResourceManager.

Properties

@@ -75,14 +75,14 @@

Description

-This is an implementation of the DeeResourceManager interface. +This is an implementation of the DeeResourceManager interface. It uses atomic operations to write resources to files and memory maps the resource files when you load them.

Unless you have very specific circumstances you should normally not create resource managers yourself, but get the default one for your -platform by calling dee_resource_manager_get_default(). +platform by calling dee_resource_manager_get_default().

@@ -107,7 +107,7 @@

dee_file_resource_manager_add_search_path ()

void                dee_file_resource_manager_add_search_path
-                                                        (DeeResourceManager *self,
+                                                        (DeeResourceManager *self,
                                                          const gchar *path);

Add a path to the set of paths searched for resources. The manager will @@ -134,7 +134,7 @@

dee_file_resource_manager_get_primary_path ()

const gchar *       dee_file_resource_manager_get_primary_path
-                                                        (DeeResourceManager *self);
+ (DeeResourceManager *self);

Helper method to access the :primary-path property.

@@ -156,7 +156,7 @@

dee_file_resource_manager_new ()

-
DeeResourceManager * dee_file_resource_manager_new      (const gchar *primary_path);
+
DeeResourceManager * dee_file_resource_manager_new      (const gchar *primary_path);

Create a new DeeFileResourceManager with its primary store- and load path set to primary_path. @@ -167,7 +167,7 @@

You normally don't need to create you own resource managers. Instead -you should call dee_resource_manager_get_default(). +you should call dee_resource_manager_get_default().

diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeFilterModel.html dee-1.0.10/doc/reference/dee-1.0/html/DeeFilterModel.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeFilterModel.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeFilterModel.html 2012-04-12 07:21:57.000000000 +0000 @@ -7,7 +7,7 @@ - + @@ -18,7 +18,7 @@ - + - @@ -206,8 +206,8 @@

dee_filter_model_insert_iter ()

-
DeeModelIter *      dee_filter_model_insert_iter        (DeeFilterModel *self,
-                                                         DeeModelIter *iter,
+
DeeModelIter *      dee_filter_model_insert_iter        (DeeFilterModel *self,
+                                                         DeeModelIter *iter,
                                                          guint pos);

Includes iter from the back end model in the filtered model, inserting it at @@ -229,9 +229,9 @@


dee_filter_model_insert_iter_before ()

-
DeeModelIter *      dee_filter_model_insert_iter_before (DeeFilterModel *self,
-                                                         DeeModelIter *iter,
-                                                         DeeModelIter *pos);
+
DeeModelIter *      dee_filter_model_insert_iter_before (DeeFilterModel *self,
+                                                         DeeModelIter *iter,
+                                                         DeeModelIter *pos);

Includes iter from the back end model in the filtered model, inserting it at the position before pos pushing other rows down. @@ -252,16 +252,16 @@


dee_filter_model_insert_iter_with_original_order ()

-
DeeModelIter *      dee_filter_model_insert_iter_with_original_order
+
DeeModelIter *      dee_filter_model_insert_iter_with_original_order
                                                         (DeeFilterModel *self,
-                                                         DeeModelIter *iter);
+ DeeModelIter *iter);

self: A DeeFilterModel instance iter: Iterator

Inserts iter in self in a way that is consistent with the ordering of the -rows in the original DeeModel behind self. THis method assumes that self +rows in the original DeeModel behind self. THis method assumes that self is already ordered this way. If that's not the case then this method has undefined behaviour.

@@ -282,7 +282,7 @@

dee_filter_model_new ()

-
DeeModel *          dee_filter_model_new                (DeeModel *orig_model,
+
DeeModel *          dee_filter_model_new                (DeeModel *orig_model,
                                                          DeeFilter *filter);
Up Home Dee Reference ManualNextNext
Top @@ -37,8 +37,8 @@

DeeFilterModel

-

DeeFilterModel — A DeeModel that contains a filtered subset of - another DeeModel

+

DeeFilterModel — A DeeModel that contains a filtered subset of + another DeeModel

@@ -50,23 +50,23 @@ DeeFilter; struct DeeFilterModel; struct DeeFilterModelClass; -DeeModelIter * dee_filter_model_append_iter (DeeFilterModel *self, - DeeModelIter *iter); +DeeModelIter * dee_filter_model_append_iter (DeeFilterModel *self, + DeeModelIter *iter); gboolean dee_filter_model_contains (DeeFilterModel *self, - DeeModelIter *iter); -DeeModelIter * dee_filter_model_insert_iter (DeeFilterModel *self, - DeeModelIter *iter, + DeeModelIter *iter); +DeeModelIter * dee_filter_model_insert_iter (DeeFilterModel *self, + DeeModelIter *iter, guint pos); -DeeModelIter * dee_filter_model_insert_iter_before (DeeFilterModel *self, - DeeModelIter *iter, - DeeModelIter *pos); -DeeModelIter * dee_filter_model_insert_iter_with_original_order +DeeModelIter * dee_filter_model_insert_iter_before (DeeFilterModel *self, + DeeModelIter *iter, + DeeModelIter *pos); +DeeModelIter * dee_filter_model_insert_iter_with_original_order (DeeFilterModel *self, - DeeModelIter *iter); -DeeModel * dee_filter_model_new (DeeModel *orig_model, + DeeModelIter *iter); +DeeModel * dee_filter_model_new (DeeModel *orig_model, DeeFilter *filter); -DeeModelIter * dee_filter_model_prepend_iter (DeeFilterModel *self, - DeeModelIter *iter); +DeeModelIter * dee_filter_model_prepend_iter (DeeFilterModel *self, + DeeModelIter *iter);
@@ -82,7 +82,7 @@

Implemented Interfaces

DeeFilterModel implements - DeeModel and DeeSerializable.

+ DeeModel and DeeSerializable.

Properties

@@ -94,10 +94,10 @@

Description

A DeeFilterModel should be regarded as a view on a specific subset of -of another DeeModel, filtered according to a given "filtering rule". +of another DeeModel, filtered according to a given "filtering rule".

-Filter models re-use the DeeModelIters of the back end model they +Filter models re-use the DeeModelIters of the back end model they filter. This means that any iter from the filter model can be used directly on the back end model. This is a powerful invariant, but implies the restriction that a row in the filter model contains the exact same data @@ -156,8 +156,8 @@


dee_filter_model_append_iter ()

-
DeeModelIter *      dee_filter_model_append_iter        (DeeFilterModel *self,
-                                                         DeeModelIter *iter);
+
DeeModelIter *      dee_filter_model_append_iter        (DeeFilterModel *self,
+                                                         DeeModelIter *iter);

Includes iter from the back end model in the filtered model, appending it to the end of the filtered rows. @@ -179,7 +179,7 @@

dee_filter_model_contains ()

gboolean            dee_filter_model_contains           (DeeFilterModel *self,
-                                                         DeeModelIter *iter);
+ DeeModelIter *iter);

Check if iter from the back end model is mapped in self.

@@ -192,7 +192,7 @@

iter :

The DeeModelIter to check. [transfer none] +The DeeModelIter to check. [transfer none]
@@ -310,8 +310,8 @@

dee_filter_model_prepend_iter ()

-
DeeModelIter *      dee_filter_model_prepend_iter       (DeeFilterModel *self,
-                                                         DeeModelIter *iter);
+
DeeModelIter *      dee_filter_model_prepend_iter       (DeeFilterModel *self,
+                                                         DeeModelIter *iter);

Includes iter from the back end model in the filtered model, prepending it to the beginning of the filtered rows. diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeHashIndex.html dee-1.0.10/doc/reference/dee-1.0/html/DeeHashIndex.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeHashIndex.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeHashIndex.html 2012-04-12 07:21:57.000000000 +0000 @@ -44,7 +44,7 @@ struct DeeHashIndex; struct DeeHashIndexClass; -DeeHashIndex * dee_hash_index_new (DeeModel *model, +DeeHashIndex * dee_hash_index_new (DeeModel *model, DeeAnalyzer *analyzer, DeeModelReader *reader); @@ -88,7 +88,7 @@


dee_hash_index_new ()

-
DeeHashIndex *      dee_hash_index_new                  (DeeModel *model,
+
DeeHashIndex *      dee_hash_index_new                  (DeeModel *model,
                                                          DeeAnalyzer *analyzer,
                                                          DeeModelReader *reader);

diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeIndex.html dee-1.0.10/doc/reference/dee-1.0/html/DeeIndex.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeIndex.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeIndex.html 2012-04-12 07:21:57.000000000 +0000 @@ -35,7 +35,7 @@

DeeIndex

-

DeeIndex — An inverted index interface for smart access to a DeeModel

+

DeeIndex — An inverted index interface for smart access to a DeeModel

@@ -47,7 +47,7 @@ struct DeeIndex; struct DeeIndexClass; gboolean (*DeeIndexIterFunc) (const gchar *key, - DeeResultSet *rows, + DeeResultSet *rows, gpointer userdata); enum DeeTermMatchFlag; void dee_index_foreach (DeeIndex *self, @@ -55,7 +55,7 @@ DeeIndexIterFunc func, gpointer userdata); DeeAnalyzer * dee_index_get_analyzer (DeeIndex *self); -DeeModel * dee_index_get_model (DeeIndex *self); +DeeModel * dee_index_get_model (DeeIndex *self); guint dee_index_get_n_rows (DeeIndex *self); guint dee_index_get_n_rows_for_term (DeeIndex *self, const gchar *term); @@ -63,10 +63,10 @@ DeeModelReader * dee_index_get_reader (DeeIndex *self); guint dee_index_get_supported_term_match_flags (DeeIndex *self); -DeeResultSet * dee_index_lookup (DeeIndex *self, +DeeResultSet * dee_index_lookup (DeeIndex *self, const gchar *term, DeeTermMatchFlag flags); -DeeModelIter * dee_index_lookup_one (DeeIndex *self, +DeeModelIter * dee_index_lookup_one (DeeIndex *self, const gchar *term);
@@ -83,16 +83,16 @@

Properties

   "analyzer"                 DeeAnalyzer*          : Read / Write / Construct Only
-  "model"                    DeeModel*             : Read / Write / Construct Only
+  "model"                    DeeModel*             : Read / Write / Construct Only
   "reader"                   gpointer              : Write / Construct Only
 

Description

-DeeIndex is an interface for doing key based access to a DeeModel. +DeeIndex is an interface for doing key based access to a DeeModel. A key in the index is known as a term and each term is -mapped to a set of matching DeeModelIters. +mapped to a set of matching DeeModelIters.

The terms are calculated by means of a DeeAnalyzer which extracts a set of @@ -143,7 +143,7 @@

DeeIndexIterFunc ()

gboolean            (*DeeIndexIterFunc)                 (const gchar *key,
-                                                         DeeResultSet *rows,
+                                                         DeeResultSet *rows,
                                                          gpointer userdata);

The signature of the function passed to dee_index_foreach(). @@ -165,7 +165,7 @@

rows :

-A DeeResultSet. Do not free or modify. +A DeeResultSet. Do not free or modify.

userdata :

@@ -278,7 +278,7 @@

dee_index_get_model ()

-
DeeModel *          dee_index_get_model                 (DeeIndex *self);
+
DeeModel *          dee_index_get_model                 (DeeIndex *self);

Get the model being indexed by this index

@@ -291,7 +291,7 @@

Returns :

-The DeeModel being indexed by this index. [transfer none] +The DeeModel being indexed by this index. [transfer none] @@ -316,7 +316,7 @@

Returns :

The number of rows in the index. Note that this may less than or -equal to dee_model_get_n_rows(). +equal to dee_model_get_n_rows().
@@ -415,7 +415,7 @@

dee_index_lookup ()

-
DeeResultSet *      dee_index_lookup                    (DeeIndex *self,
+
DeeResultSet *      dee_index_lookup                    (DeeIndex *self,
                                                          const gchar *term,
                                                          DeeTermMatchFlag flags);
@@ -436,7 +436,7 @@ - @@ -445,7 +445,7 @@

dee_index_lookup_one ()

-
DeeModelIter *      dee_index_lookup_one                (DeeIndex *self,
+
DeeModelIter *      dee_index_lookup_one                (DeeIndex *self,
                                                          const gchar *term);

Convenience function in for cases where you have a priori guarantee that @@ -470,7 +470,7 @@

- @@ -491,9 +491,9 @@

The "model" property

-
  "model"                    DeeModel*             : Read / Write / Construct Only
+
  "model"                    DeeModel*             : Read / Write / Construct Only

-The DeeModel being indexed +The DeeModel being indexed


diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeModel.html dee-1.0.10/doc/reference/dee-1.0/html/DeeModel.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeModel.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeModel.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,1926 +0,0 @@ - - - - -DeeModel - - - - - - - - - -

Returns :

A DeeResultSet. Free with g_object_unref(). [transfer full] +A DeeResultSet. Free with g_object_unref(). [transfer full]

Returns :

A DeeModelIter pointing to the matching +A DeeModelIter pointing to the matching row or NULL in case no rows matches term. [transfer none]
- - - - - - - - - -
-
-
- - -
-

DeeModel

-

DeeModel — A generic table model interface

-
-
-

Synopsis

-
-#include <dee.h>
-
-                    DeeModel;
-struct              DeeModelIface;
-                    DeeModelIter;
-                    DeeModelTag;
-DeeModelIter *      dee_model_append                    (DeeModel *self,
-                                                         ...);
-DeeModelIter *      dee_model_append_row                (DeeModel *self,
-                                                         GVariant **row_members);
-GVariant **         dee_model_build_row                 (DeeModel *self,
-                                                         GVariant **out_row_members,
-                                                         ...);
-void                dee_model_clear                     (DeeModel *self);
-void                dee_model_clear_tag                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         DeeModelTag *tag);
-void                dee_model_get                       (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         ...);
-gboolean            dee_model_get_bool                  (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-const gchar *       dee_model_get_column_schema         (DeeModel *self,
-                                                         guint column);
-gdouble             dee_model_get_double                (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-DeeModelIter *      dee_model_get_first_iter            (DeeModel *self);
-gint32              dee_model_get_int32                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-gint64              dee_model_get_int64                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-DeeModelIter *      dee_model_get_iter_at_row           (DeeModel *self,
-                                                         guint row);
-DeeModelIter *      dee_model_get_last_iter             (DeeModel *self);
-guint               dee_model_get_n_columns             (DeeModel *self);
-guint               dee_model_get_n_rows                (DeeModel *self);
-guint               dee_model_get_position              (DeeModel *self,
-                                                         DeeModelIter *iter);
-GVariant **         dee_model_get_row                   (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         GVariant **out_row_members);
-const gchar * const* dee_model_get_schema               (DeeModel *self,
-                                                         guint *num_columns);
-const gchar *       dee_model_get_string                (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-gpointer            dee_model_get_tag                   (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         DeeModelTag *tag);
-guchar              dee_model_get_uchar                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-guint32             dee_model_get_uint32                (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-guint64             dee_model_get_uint64                (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-GVariant *          dee_model_get_value                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-DeeModelIter *      dee_model_insert                    (DeeModel *self,
-                                                         guint pos,
-                                                         ...);
-DeeModelIter *      dee_model_insert_before             (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         ...);
-DeeModelIter *      dee_model_insert_row                (DeeModel *self,
-                                                         guint pos,
-                                                         GVariant **row_members);
-DeeModelIter *      dee_model_insert_row_before         (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         GVariant **row_members);
-gboolean            dee_model_is_first                  (DeeModel *self,
-                                                         DeeModelIter *iter);
-gboolean            dee_model_is_last                   (DeeModel *self,
-                                                         DeeModelIter *iter);
-DeeModelIter *      dee_model_next                      (DeeModel *self,
-                                                         DeeModelIter *iter);
-DeeModelIter *      dee_model_prepend                   (DeeModel *self,
-                                                         ...);
-DeeModelIter *      dee_model_prepend_row               (DeeModel *self,
-                                                         GVariant **row_members);
-DeeModelIter *      dee_model_prev                      (DeeModel *self,
-                                                         DeeModelIter *iter);
-DeeModelTag *       dee_model_register_tag              (DeeModel *self,
-                                                         GDestroyNotify tag_destroy);
-void                dee_model_remove                    (DeeModel *self,
-                                                         DeeModelIter *iter);
-void                dee_model_set                       (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         ...);
-void                dee_model_set_row                   (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         GVariant **row_members);
-void                dee_model_set_schema                (DeeModel *self,
-                                                         ...);
-void                dee_model_set_schema_full           (DeeModel *self,
-                                                         const gchar * const *column_schemas,
-                                                         guint num_columns);
-void                dee_model_set_tag                   (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         DeeModelTag *tag,
-                                                         gpointer value);
-void                dee_model_set_value                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column,
-                                                         GVariant *value);
-
-
-
-

Object Hierarchy

-
-  GInterface
-   +----DeeModel
-
-
-
-

Prerequisites

-

-DeeModel requires - GObject.

-
-
-

Known Implementations

-

-DeeModel is implemented by - DeeFilterModel, DeeProxyModel, DeeSequenceModel, DeeSerializableModel, DeeSharedModel and DeeTransaction.

-
-
-

Signals

-
-  "row-added"                                      : Run Last
-  "row-changed"                                    : Run Last
-  "row-removed"                                    : Run Last
-
-
-
-

Description

-

-DeeModel is a generic table model that can holds GVariants as -column values. Each column is restricted to hold variants with some -predefined type signature. This is known as the -column schema. -

-

-

-
-

Indexes - Access by Key or Full Text Analysis

-

-Instead of forcing you to search the rows and columns for given values -or patterns DeeModel is integrated with a powerful DeeIndex that allows -you to create custom indexes over the model content that are updated -automatically as the model changes. -

-

-Indexes can be created for integer keys, string keys (fx. URIs), or for -full text search into the model contents. The indexing API is flexible -and extensible and can provide huge optimizations in terms of access times -if you find yourself iterating over the model searching for something. -

-
-

-

-

-

-
-

Sorting

-

-As a simpler alternative to using indexes you can rely on sorted models. -This is done by using the dee_model_insert_sorted() and -dee_model_find_sorted() family of APIs. Some model classes have -accelerated implementations of sorted inserts and lookups. -Notably DeeSequenceModel. -

-
-

-

-

-

-
-

Tags - Attach Arbitrary Data to Rows

-

-It's a very common pattern that you want to render a DeeModel into some -view in a classinc MVC pattern. If the view needs to reflect changes in the -model dynamically you often find yourself creating ad-hoc mappings between -the rows of the model and the widgets in your view. -

-

-In situations where you need to pair the rows in a model with some external -data structure the tags API may come in handy. -It consists of the functions dee_model_register_tag(), dee_model_set_tag(), -dee_model_get_tag(), and dee_model_clear_tag(). -

-
-

-

-
-
-

Details

-
-

DeeModel

-
typedef struct _DeeModel DeeModel;
-

-

-
-
-
-

struct DeeModelIface

-
struct DeeModelIface {
-  GTypeInterface g_iface;
-
-  /* Signals */
-  void           (*row_added)       (DeeModel     *self,
-                                     DeeModelIter *iter);
-
-  void           (*row_removed)     (DeeModel     *self,
-                                     DeeModelIter *iter);
-
-  void           (*row_changed)     (DeeModel     *self,
-                                     DeeModelIter *iter);
-
-  void            (*set_schema_full)    (DeeModel          *self,
-                                         const char* const *column_schemas,
-                                         guint              num_columns);
-
-  const gchar* const* (*get_schema)     (DeeModel     *self,
-                                         guint        *num_columns);
-
-  const gchar*   (*get_column_schema)   (DeeModel     *self,
-                                         guint         column);
-  
-  guint          (*get_n_columns)   (DeeModel *self);
-
-  guint          (*get_n_rows)      (DeeModel *self);
-
-  DeeModelIter*  (*append_row)    (DeeModel  *self,
-                                   GVariant **row_members);
-
-  DeeModelIter*  (*prepend_row)   (DeeModel  *self,
-                                   GVariant **row_members);
-
-  DeeModelIter*  (*insert_row)    (DeeModel  *self,
-                                   guint      pos,
-                                   GVariant **row_members);
-
-  DeeModelIter*  (*insert_row_before) (DeeModel      *self,
-                                       DeeModelIter  *iter,
-                                       GVariant     **row_members);
-
-  DeeModelIter*  (*insert_row_sorted)  (DeeModel           *self,
-                                        GVariant          **row_members,
-                                        DeeCompareRowFunc   cmp_func,
-                                        gpointer            user_data);
-
-  DeeModelIter*  (*find_row_sorted)    (DeeModel           *self,
-                                        GVariant          **row_spec,
-                                        DeeCompareRowFunc   cmp_func,
-                                        gpointer            user_data,
-                                        gboolean           *out_was_found);
-
-  void           (*remove)          (DeeModel     *self,
-                                     DeeModelIter *iter);
-
-  void           (*clear)           (DeeModel *self);
-
-  void           (*set_value)       (DeeModel       *self,
-                                     DeeModelIter   *iter,
-                                     guint           column,
-                                     GVariant       *value);
-  
-  void           (*set_row)         (DeeModel       *self,
-                                     DeeModelIter   *iter,
-                                     GVariant      **row_members);
-
-  GVariant*      (*get_value)       (DeeModel     *self,
-                                     DeeModelIter *iter,
-                                     guint         column);
-  
-  DeeModelIter* (*get_first_iter)  (DeeModel     *self);
-
-  DeeModelIter* (*get_last_iter)   (DeeModel     *self);
-
-  DeeModelIter* (*get_iter_at_row) (DeeModel     *self,
-                                    guint          row);
-
-  gboolean       (*get_bool)        (DeeModel     *self,
-                                     DeeModelIter *iter,
-                                     guint         column);
-
-  guchar         (*get_uchar)       (DeeModel     *self,
-                                     DeeModelIter *iter,
-                                     guint         column);
-
-  gint32         (*get_int32)       (DeeModel     *self,
-                                     DeeModelIter *iter,
-                                     guint         column);
-
-  guint32        (*get_uint32)      (DeeModel     *self,
-                                     DeeModelIter *iter,
-                                     guint         column);
-
-  gint64         (*get_int64)       (DeeModel     *self,
-                                     DeeModelIter *iter,
-                                     guint         column);
-
-  guint64        (*get_uint64)      (DeeModel     *self,
-                                     DeeModelIter *iter,
-                                     guint         column);
-
-  gdouble        (*get_double)      (DeeModel     *self,
-                                     DeeModelIter *iter,
-                                     guint         column);
-
-  const gchar*   (*get_string)      (DeeModel     *self,
-                                     DeeModelIter *iter,
-                                     guint         column);
-
-  DeeModelIter*  (*next)            (DeeModel     *self,
-                                     DeeModelIter *iter);
-
-  DeeModelIter*  (*prev)            (DeeModel     *self,
-                                     DeeModelIter *iter);
-
-  gboolean       (*is_first)        (DeeModel     *self,
-                                     DeeModelIter *iter);
-
-  gboolean       (*is_last)         (DeeModel     *self,
-                                     DeeModelIter *iter);
-
-  guint          (*get_position)    (DeeModel     *self,
-                                     DeeModelIter *iter);
-
-  DeeModelTag*   (*register_tag)    (DeeModel       *self,
-                                     GDestroyNotify  tag_destroy);
-
-  gpointer       (*get_tag)         (DeeModel       *self,
-                                     DeeModelIter   *iter,
-                                     DeeModelTag    *tag);
-
-  void           (*set_tag)         (DeeModel       *self,
-                                     DeeModelIter   *iter,
-                                     DeeModelTag    *tag,
-                                     gpointer        value);
-  
-  GVariant**     (*get_row)         (DeeModel       *self,
-                                     DeeModelIter   *iter,
-                                     GVariant      **out_row_members);
-};
-
-

-

-
-
-
-

DeeModelIter

-
typedef struct _DeeModelIter DeeModelIter;
-

-The DeeModelIter structure is private and should only be used with the -provided DeeModel API. It is owned by DeeModel and should not be freed. -

-
-
-
-

DeeModelTag

-
typedef struct _DeeModelTag DeeModelTag;
-

-The DeeModelTag structure is private and should only be used with the -provided DeeModel API. It is owned by DeeModel and should not be freed. -

-
-
-
-

dee_model_append ()

-
DeeModelIter *      dee_model_append                    (DeeModel *self,
-                                                         ...);
-

-Creates and appends a new row to the end of a DeeModel, setting the row -values upon creation. -

-

-For and example see dee_model_insert_before(). -

-
-- - - - - - - - - - -

self :

a DeeModel -

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] -
-
-
-
-

dee_model_append_row ()

-
DeeModelIter *      dee_model_append_row                (DeeModel *self,
-                                                         GVariant **row_members);
-

-Like dee_model_append() but intended for language bindings or -situations where you work with models on a meta level and may not have -a prior knowledge of the column schemas of the models. See also -dee_model_build_row(). -

-
-- - - - - - - - - - - - - - -

self :

The model to prepend a row to

row_members :

An array of GVariants with type -signature matching those of the column schemas of self. -If any of the variants have floating references they will be -consumed. [array zero-terminated=1] -

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] -
-
-
-
-

dee_model_build_row ()

-
GVariant **         dee_model_build_row                 (DeeModel *self,
-                                                         GVariant **out_row_members,
-                                                         ...);
-

-Build an array of GVariants with values from the variadic argument -list according to the model schema for self. The caller must call -g_variant_ref_sink() and g_variant_unref() on all the returned variants and -g_free() the array itself if NULL was passed as out_row_members. -

-

-This is utility function and will not touch or modify self in any way. -

-
-- - - - - - - - - - - - - - -

self :

The model to create a row for

out_row_members :

An array to write the values to or NULL to allocate -a new array. If non-NULL it must have a length -that is longer or equal to the number of columns in self -

Returns :

If out_row_members is NULL a newly allocated array of variants -will be returned and the array must be freed with g_free(). -If out_row_members is nonNULL it will be reused, and variants in -the array may or may not have floating references, which means the -caller must make sure that g_variant_ref_sink() and -g_variant_unref() are called on them.
-
-
-
-

dee_model_clear ()

-
void                dee_model_clear                     (DeeModel *self);
-

-Removes all rows in the model. Signals are emitted for each row in the model -

-
-- - - - -

self :

a DeeModel object to clear
-
-
-
-

dee_model_clear_tag ()

-
void                dee_model_clear_tag                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         DeeModelTag *tag);
-

-This method is purely syntactic sugar for calling dee_model_set_tag() with -a value of NULL. It's included in order to help developers write more -readable code. -

-
-- - - - - - - - - - - - - - -

self :

The model to clear a tag on

iter :

The row to clear the tag from

tag :

The tag to clear from iter -
-
-
-
-

dee_model_get ()

-
void                dee_model_get                       (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         ...);
-

-Gets all the values across the entire row referenced by iter. The -variable argument list should contain pointers to variables that match -the column schemas of this model. -

-

-For all basic variant types (see g_variant_type_is_basic()) this method -expects pointers to their native C types while for all other types it -expects a pointer to a pointer to a GVariant. -

-

-For string values you are passed a constant reference which is owned by the -model, but any returned variants must be freed with g_variant_unref(). -

-

-For example, to get all values a model with signature ("u", "s", "as") you -would do: -

-
- guint32      u;
- const gchar *s;
- GVariant    *v;
-
- dee_model_get (model, iter, &u, &s, &v);
-
- // do stuff
-
- g_variant_unref (v);
-
-

-

-
-- - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -
-
-
-
-

dee_model_get_bool ()

-
gboolean            dee_model_get_bool                  (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

column :

the column to retrieve a boolean from

Returns :

if iter and column are valid, the boolean stored at column. -Otherwise FALSE -
-
-
-
-

dee_model_get_column_schema ()

-
const gchar *       dee_model_get_column_schema         (DeeModel *self,
-                                                         guint column);
-

-Get the GVariant signature of a column -

-
-- - - - - - - - - - - - - - -

self :

a DeeModel -

column :

the column to get retrieve the GVariant type string of

Returns :

the GVariant signature of the column at index column -
-
-
-
-

dee_model_get_double ()

-
gdouble             dee_model_get_double                (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

column :

the column to retrieve a double from

Returns :

if iter and column are valid, the double stored at column. -Otherwise 0.
-
-
-
-

dee_model_get_first_iter ()

-
DeeModelIter *      dee_model_get_first_iter            (DeeModel *self);
-

-Retrieves a DeeModelIter representing the first row in self. -

-
-- - - - - - - - - - -

self :

a DeeModel -

Returns :

A DeeModelIter (owned by self, do not -free it). [transfer none] -
-
-
-
-

dee_model_get_int32 ()

-
gint32              dee_model_get_int32                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

column :

the column to retrieve a int from

Returns :

if iter and column are valid, the int stored at column. -Otherwise 0.
-
-
-
-

dee_model_get_int64 ()

-
gint64              dee_model_get_int64                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

column :

the column to retrieve a int64 from

Returns :

if iter and column are valid, the int64 stored at column. -Otherwise 0.
-
-
-
-

dee_model_get_iter_at_row ()

-
DeeModelIter *      dee_model_get_iter_at_row           (DeeModel *self,
-                                                         guint row);
-

-Retrieves a DeeModelIter representing the row at the given index. -

-

-Note that this method does not have any performance guarantees. In particular -it is not guaranteed to be O(1). -

-
-- - - - - - - - - - - - - - -

self :

a DeeModel -

row :

position of the row to retrieve

Returns :

A new DeeModelIter, or NULL if row -was out of bounds. The returned iter is owned by self, so do not free it. [transfer none] -
-
-
-
-

dee_model_get_last_iter ()

-
DeeModelIter *      dee_model_get_last_iter             (DeeModel *self);
-

-Retrieves a DeeModelIter pointing right after the -last row in self. This is refered to also the the -end iter. -

-

-As with other iters the end iter, in particular, is stable over inserts, -changes, or removals. -

-
-- - - - - - - - - - -

self :

a DeeModel -

Returns :

A DeeModelIter (owned by self, do not -free it). [transfer none] -
-
-
-
-

dee_model_get_n_columns ()

-
guint               dee_model_get_n_columns             (DeeModel *self);
-

-Gets the number of columns in self -

-
-- - - - - - - - - - -

self :

a DeeModel -

Returns :

the number of columns per row in self -
-
-
-
-

dee_model_get_n_rows ()

-
guint               dee_model_get_n_rows                (DeeModel *self);
-

-Gets the number of rows in self -

-
-- - - - - - - - - - -

self :

a DeeModel -

Returns :

the number of rows in self -
-
-
-
-

dee_model_get_position ()

-
guint               dee_model_get_position              (DeeModel *self,
-                                                         DeeModelIter *iter);
-

-Get the numeric offset of iter into self. Note that this method is -not guaranteed to be O(1). -

-
-- - - - - - - - - - - - - - -

self :

The model to inspect

iter :

The iter to get the position of

Returns :

The integer offset of iter in self -
-
-
-
-

dee_model_get_row ()

-
GVariant **         dee_model_get_row                   (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         GVariant **out_row_members);
-
-- - - - - - - - - - - - - - - - - - -

self :

A DeeModel to get a row from

iter :

A DeeModelIter pointing to the row to get

out_row_members :

An array of variants with a length bigger than or equal to -the number of columns in self, or NULL. If you pass -NULL here a new array will be allocated for you. The -returned variants will have a non-floating reference. [array][out][allow-none][default NULL] -

Returns :

-out_row_members if it was not NULL -or a newly allocated array otherwise which you must free -with g_free(). The variants in the array will have a strong -reference and needs to be freed with g_variant_unref(). [array zero-terminated=1] -
-
-
-
-

dee_model_get_schema ()

-
const gchar * const* dee_model_get_schema               (DeeModel *self,
-                                                         guint *num_columns);
-

-Get a NULL-terminated array of GVariant type strings that defines the -required formats for the columns of self. -

-
-- - - - - - - - - - - - - - -

self :

The DeeModel to get the the schema for

num_columns :

Address of an integer in which to store the -number of columns in self. Or NULL to ignore the array length. [out][allow-none] -

Returns :

A NULL-terminated array of GVariant type strings. The length of -the returned array is written to num_columns. The returned array -should not be freed or modified. It is owned by the model. [array length=num_columns][element-type utf8][transfer none] -
-
-
-
-

dee_model_get_string ()

-
const gchar *       dee_model_get_string                (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

column :

the column to retrieve a string from

Returns :

if iter and column are valid, the string stored at column. -Otherwise NULL.
-
-
-
-

dee_model_get_tag ()

-
gpointer            dee_model_get_tag                   (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         DeeModelTag *tag);
-

-Look up a tag value for a given row in a model. This method is guaranteed -to be O(1). -

-
-- - - - - - - - - - - - - - - - - - -

self :

The model to get a tag from

iter :

A DeeModelIter pointing to the row to get the tag from

tag :

The tag handle to retrieve the tag value for

Returns :

Returns NULL if tag is unset otherwise the -value of the tag as it was set with dee_model_set_tag(). [transfer none] -
-
-
-
-

dee_model_get_uchar ()

-
guchar              dee_model_get_uchar                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

column :

the column to retrieve a uchar from

Returns :

if iter and column are valid, the uchar stored at column. -Otherwise 0.
-
-
-
-

dee_model_get_uint32 ()

-
guint32             dee_model_get_uint32                (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

column :

the column to retrieve a uint from

Returns :

if iter and column are valid, the uint stored at column. -Otherwise 0.
-
-
-
-

dee_model_get_uint64 ()

-
guint64             dee_model_get_uint64                (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

column :

the column to retrieve a uint64 from

Returns :

if iter and column are valid, the uint64 stored at column. -Otherwise 0.
-
-
-
-

dee_model_get_value ()

-
GVariant *          dee_model_get_value                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column);
-
-- - - - - - - - - - - - - - - - - - -

self :

The DeeModel to inspect

iter :

a DeeModelIter pointing to the row to inspect

column :

column number to retrieve the value from

Returns :

A, guaranteed non-floating, reference to a -GVariant containing the row data. Free with g_variant_unref(). [transfer full] -
-
-
-
-

dee_model_insert ()

-
DeeModelIter *      dee_model_insert                    (DeeModel *self,
-                                                         guint pos,
-                                                         ...);
-

-Creates and inserts a new row into a DeeModel, pushing the existing -rows down. -

-

-For and example see dee_model_insert_before(). -

-
-- - - - - - - - - - - - - - -

self :

a DeeModel -

pos :

The index to insert the row on. The existing row will be pushed down

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] -
-
-
-
-

dee_model_insert_before ()

-
DeeModelIter *      dee_model_insert_before             (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         ...);
-

-Creates and inserts a new row into a DeeModel just before the row pointed -to by iter. -

-

-For example, to insert a new row in a model with schema ("u", "s", "as") -you would do: -

-

-

-
- DeeModelIter    *iter;
- GVariantBuilder  b;
-
- g_variant_builder_init (&b, "as");
- g_variant_builder_add (&b, "s", "Hello");
- g_variant_builder_add (&b, "s", "World");
-
- iter = find_my_special_row (model);
- dee_model_insert_before (model, iter,
-                          27,
-                          "Howdy",
-                          g_variant_builder_end (&b));
-
-

-

-
-- - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

An iter pointing to the row before which to insert the new one

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] -
-
-
-
-

dee_model_insert_row ()

-
DeeModelIter *      dee_model_insert_row                (DeeModel *self,
-                                                         guint pos,
-                                                         GVariant **row_members);
-

-As dee_model_insert(), but intended for language bindings or -situations where you work with models on a meta level and may not have -a priori knowledge of the column schemas of the models. See also -dee_model_build_row(). -

-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

pos :

The index to insert the row on. The existing row will be pushed down.

row_members :

An array of -GVariants with type signature matching those of -the column schemas of self. If any of the variants have -floating references they will be consumed. [array zero-terminated=1] -

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] -
-
-
-
-

dee_model_insert_row_before ()

-
DeeModelIter *      dee_model_insert_row_before         (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         GVariant **row_members);
-

-As dee_model_insert_before(), but intended for language bindings or -situations where you work with models on a meta level and may not have -a priori knowledge of the column schemas of the models. See also -dee_model_build_row(). -

-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

An iter pointing to the row before which to insert the new one

row_members :

An array of -GVariants with type signature matching those of the -column schemas of self. If any of the variants have floating -references they will be consumed. [array zero-terminated=1] -

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] -
-
-
-
-

dee_model_is_first ()

-
gboolean            dee_model_is_first                  (DeeModel *self,
-                                                         DeeModelIter *iter);
-

-Checks if iter is the very first iter self. -

-
-- - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

Returns :

-TRUE if iter is the first iter in the model
-
-
-
-

dee_model_is_last ()

-
gboolean            dee_model_is_last                   (DeeModel *self,
-                                                         DeeModelIter *iter);
-

-Whether iter is the end iter of self. Note that the end iter points -right after the last valid row in self. -

-
-- - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

Returns :

-TRUE if iter is the last iter in the model
-
-
-
-

dee_model_next ()

-
DeeModelIter *      dee_model_next                      (DeeModel *self,
-                                                         DeeModelIter *iter);
-

-Returns a DeeModelIter that points to the next position in the model. -

-
-- - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

Returns :

A DeeModelIter, pointing to the next row in -the model. The iter is owned by self, do not free it. [transfer none] -
-
-
-
-

dee_model_prepend ()

-
DeeModelIter *      dee_model_prepend                   (DeeModel *self,
-                                                         ...);
-

-Creates and prepends a new row to the beginning of a DeeModel, setting the -row values upon creation. -

-
-- - - - - - - - - - -

self :

a DeeModel -

Returns :

A DeeModelIter pointing to the new row -Example: -
-DeeModel *model;
-model = ...
-dee_model_set_schema (model, "i", "s", NULL);
-dee_model_prepend (model, 10, "Rooney");
-
. [transfer none][type Dee.ModelIter] -
-
-
-
-

dee_model_prepend_row ()

-
DeeModelIter *      dee_model_prepend_row               (DeeModel *self,
-                                                         GVariant **row_members);
-

-Like dee_model_prepend() but intended for language bindings or -situations where you work with models on a meta level and may not have -a priori knowledge of the column schemas of the models. See also -dee_model_build_row(). -

-
-- - - - - - - - - - - - - - -

self :

The model to prepend a row to

row_members :

An array of -GVariants with type signature matching those of -the column schemas of self. If any of the variants have -floating references they will be consumed. [array zero-terminated=1] -

Returns :

A DeeModelIter pointing to the new row. [transfer none][type Dee.ModelIter] -
-
-
-
-

dee_model_prev ()

-
DeeModelIter *      dee_model_prev                      (DeeModel *self,
-                                                         DeeModelIter *iter);
-

-Returns a DeeModelIter that points to the previous position in the model. -

-
-- - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

Returns :

A DeeModelIter, pointing to the previous -row in the model. The iter is owned by self, do not free it. [transfer none] -
-
-
-
-

dee_model_register_tag ()

-
DeeModelTag *       dee_model_register_tag              (DeeModel *self,
-                                                         GDestroyNotify tag_destroy);
-

-Register a new tag on a DeeModel. A tag is an extra -value attached to a given row on a model. The tags are invisible to all -that doesn't have the tag handle returned by this method. DeeModel -implementations must ensure that dee_model_get_tag() is an O(1) operation. -

-

-Tags can be very useful in associating some extra data to a row in a model -and have that automatically synced when the model changes. If you're -writing a tiled view for a model you might want to tag each row with the -tile widget for that row. That way you have very convenient access to the -tile widget given any row in the model. -

-

-The private nature of tags and the fact that you can store arbitrary pointers -and binary data in them also means that they are not serialized if you -utilize a model implementation that exposes the DeeSerializable interface. -

-
-- - - - - - - - - - - - - - -

self :

The model to register a tag on

tag_destroy :

Function called when a tagged row is removed from the model. -This function will also be called on all tagged rows when the -model is finalized.

Returns :

A DeeModelTag handle -that you can use to set and get tags with. [transfer none][type Dee.ModelTag] -
-
-
-
-

dee_model_remove ()

-
void                dee_model_remove                    (DeeModel *self,
-                                                         DeeModelIter *iter);
-

-Removes the row at the given position from the model. -

-
-- - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter pointing to the row to remove
-
-
-
-

dee_model_set ()

-
void                dee_model_set                       (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         ...);
-

-Sets all values across the entire row referenced by iter. The -variable argument list should contain values that match the column schemas -for the model. All basic variant type (see g_variant_type_is_basic()) are -passed in as their raw C type while all other types are passed in boxed in -a GVariant. Any floating references on variants passed to this method are -consumed. -

-

-For example, to set the values for a row on model with the schema -("u", "s", "as"): -

-
-  GVariantBuilder b;
-
-  g_variant_builder_init (&b, "as");
-  g_variant_builder_add (&b, "Hello");
-  g_variant_builder_add (&b, "World");
-
-  dee_model_set (model, iter, 27, "foo", g_variant_builder_end (&b));
-
-

-

-
-- - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -
-
-
-
-

dee_model_set_row ()

-
void                dee_model_set_row                   (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         GVariant **row_members);
-

-Sets all columns in the row iter points to, to those found in -row_members. The variants in row_members must match the types defined in -the model's schema. -

-
-- - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

row_members :

And array of -GVariants with type signature matching -those from the model schema. If any of the variants have -floating references these will be consumed. [array] -
-
-
-
-

dee_model_set_schema ()

-
void                dee_model_set_schema                (DeeModel *self,
-                                                         ...);
-

-Set the GVariant types and the number of columns used by self. -This method must be called exactly once before using self. Note that -some constructors will do this for you. -

-

-To create a model with three columns; a 32 bit integer, a string, -and lastly an array of strings, you would do: -

-
- DeeModel *model;
- model = dee_sequence_model_new ();
- dee_model_set_schema (model, "i", "s", "as", NULL);
-
-

-

-
-- - - - -

self :

The DeeModel to set the column layout for
-
-
-
-

dee_model_set_schema_full ()

-
void                dee_model_set_schema_full           (DeeModel *self,
-                                                         const gchar * const *column_schemas,
-                                                         guint num_columns);
-

-Set the GVariant types and the number of columns used by self. -This method must be called exactly once before using self. Note that -some constructors will do this for you. -

-
-- - - - - - - - - - - - - - -

self :

The DeeModel to set the column layout for

column_schemas :

A list of GVariant type strings terminated by a NULL. [array length=num_columns zero-terminated=1][element-type utf8][transfer none] -

num_columns :

an integer specifying the array length for VarArgs -
-
-
-
-

dee_model_set_tag ()

-
void                dee_model_set_tag                   (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         DeeModelTag *tag,
-                                                         gpointer value);
-

-Set a tag on a row in a model. This function is guaranteed to be O(1). -See also dee_model_register_tag(). -

-

-If tag is already set on this row the existing tag value will be destroyed -with the GDestroyNotify passed to the dee_model_register_tag(). -

-
-- - - - - - - - - - - - - - - - - - -

self :

The model to set a tag on

iter :

The row to set the tag on

tag :

The tag handle for the tag as obtained from dee_model_register_tag() -

value :

The value to set for tag. Note that NULL represents an unset tag
-
-
-
-

dee_model_set_value ()

-
void                dee_model_set_value                 (DeeModel *self,
-                                                         DeeModelIter *iter,
-                                                         guint column,
-                                                         GVariant *value);
-

-Sets the data in column for the row iter points to, to value. The type -of value must be convertible to the type of the column. -

-

-When this method call completes the model will emit ::row-changed. You can -edit the model in place without triggering the change signals by calling -dee_model_set_value_silently(). -

-
-- - - - - - - - - - - - - - - - - - -

self :

a DeeModel -

iter :

a DeeModelIter -

column :

column number to set the value

value :

New value for cell. If value is a floating reference the model -will assume ownership of the variant
-
-
-
-

Signal Details

-
-

The "row-added" signal

-
void                user_function                      (DeeModel     *self,
-                                                        DeeModelIter *iter,
-                                                        gpointer      user_data)      : Run Last
-

-Connect to this signal to be notified when a row is added to self. -

-
-- - - - - - - - - - - - - - -

self :

the DeeModel on which the signal is emitted

iter :

a DeeModelIter pointing to the newly added row. [transfer none][type Dee.ModelIter] -

user_data :

user data set when the signal handler was connected.
-
-
-
-

The "row-changed" signal

-
void                user_function                      (DeeModel     *self,
-                                                        DeeModelIter *iter,
-                                                        gpointer      user_data)      : Run Last
-

-Connect to this signal to be notified when a row is changed. -

-
-- - - - - - - - - - - - - - -

self :

the DeeModel on which the signal is emitted

iter :

a DeeModelIter pointing to the changed row. [transfer none][type Dee.ModelIter] -

user_data :

user data set when the signal handler was connected.
-
-
-
-

The "row-removed" signal

-
void                user_function                      (DeeModel     *self,
-                                                        DeeModelIter *iter,
-                                                        gpointer      user_data)      : Run Last
-

-Connect to this signal to be notified when a row is removed from self. - The row is still valid while the signal is being emitted. -

-
-- - - - - - - - - - - - - - -

self :

the DeeModel on which the signal is emitted

iter :

a DeeModelIter pointing to the removed row. [transfer none][type Dee.ModelIter] -

user_data :

user data set when the signal handler was connected.
-
-
-
- - - \ No newline at end of file diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeePeer.html dee-1.0.10/doc/reference/dee-1.0/html/DeePeer.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeePeer.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeePeer.html 2012-04-12 07:21:57.000000000 +0000 @@ -6,19 +6,19 @@ - - + + - + - + @@ -48,9 +48,9 @@ struct DeeSerializableModel; struct DeeSerializableModelClass; -guint64dee_serializable_model_get_seqnum (DeeModel *self); -guint64dee_serializable_model_inc_seqnum (DeeModel *self); -voiddee_serializable_model_set_seqnum (DeeModel *self, +guint64dee_serializable_model_get_seqnum (DeeModel *self); +guint64dee_serializable_model_inc_seqnum (DeeModel *self); +voiddee_serializable_model_set_seqnum (DeeModel *self, guint64 seqnum); @@ -68,13 +68,13 @@

Implemented Interfaces

DeeSerializableModel implements - DeeModel and DeeSerializable.

+ DeeModel and DeeSerializable.

Description

DeeSerializableModel is an abstract base class to ease implementation of -DeeModels providing rows versioned by a +DeeModels providing rows versioned by a sequence number.

@@ -100,7 +100,7 @@

dee_serializable_model_get_seqnum ()

-
guint64             dee_serializable_model_get_seqnum   (DeeModel *self);
+
guint64             dee_serializable_model_get_seqnum   (DeeModel *self);

self: (type DeeSerializableModel): A DeeSerializableModel instance

@@ -115,7 +115,7 @@

dee_serializable_model_inc_seqnum ()

-
guint64             dee_serializable_model_inc_seqnum   (DeeModel *self);
+
guint64             dee_serializable_model_inc_seqnum   (DeeModel *self);

self: (type DeeSerializableModel): A DeeSerializableModel instance

@@ -126,7 +126,7 @@

dee_serializable_model_set_seqnum ()

-
void                dee_serializable_model_set_seqnum   (DeeModel *self,
+
void                dee_serializable_model_set_seqnum   (DeeModel *self,
                                                          guint64 seqnum);

self: (type DeeSerializableModel): A DeeSerializableModel instance diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeServer.html dee-1.0.10/doc/reference/dee-1.0/html/DeeServer.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeServer.html 1970-01-01 00:00:00.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeServer.html 2012-04-12 07:21:57.000000000 +0000 @@ -0,0 +1,254 @@ + + + + +DeeServer + + + + + + + + + +

+ + + + + + + + + +
+
+
+ + +
+

DeeServer

+

DeeServer — Creates a server object you can connect to.

+
+
+

Synopsis

+
+#include <dee.h>
+
+                    DeeServer;
+                    DeeServerClass;
+gchar *             dee_server_bus_address_for_name     (const gchar *name,
+                                                         gboolean include_username);
+const gchar *       dee_server_get_client_address       (DeeServer *server);
+DeeServer *         dee_server_new                      (const gchar *swarm_name);
+DeeServer *         dee_server_new_for_address          (const gchar *swarm_name,
+                                                         const gchar *bus_address);
+
+
+
+

Object Hierarchy

+
+  GObject
+   +----DeePeer
+         +----DeeServer
+
+
+
+

Properties

+
+  "bus-address"              gchar*                : Read / Write / Construct Only
+  "same-user-only"           gboolean              : Read / Write / Construct Only
+
+
+
+

Description

+

+DeeServer allows you to create private connections (connections which +are not routed via dbus-daemon). Note that, unlike DeePeer, DeeServer +will always be swarm leader, and clients connected to it cannot overtake +swarm leadership once the server connection is closed. +

+
+
+

Details

+
+

DeeServer

+
typedef struct _DeeServer DeeServer;
+

+

+
+
+
+

DeeServerClass

+
typedef struct {
+} DeeServerClass;
+
+

+

+
+
+
+

dee_server_bus_address_for_name ()

+
gchar *             dee_server_bus_address_for_name     (const gchar *name,
+                                                         gboolean include_username);
+

+Helper method which creates bus address string for the given name, which +should have the same format as a DBus unique name. +

+
++ + + + + + + + + + + + + + +

name :

A name to create bus address for.

include_username :

Include current user name as part of the bus address.

Returns :

Newly allocated string with bus address. +Use g_free() to free. [transfer full] +
+
+
+
+

dee_server_get_client_address ()

+
const gchar *       dee_server_get_client_address       (DeeServer *server);
+

+Gets a D-Bus address string that can be used by clients to connect to server. +

+
++ + + + + + + + + + +

server :

A DeeServer.

Returns :

A D-Bus address string. Do not free.
+
+
+
+

dee_server_new ()

+
DeeServer *         dee_server_new                      (const gchar *swarm_name);
+

+Creates a new instance of DeeServer and tries to bind +to "bus-address". The "swarm-leader" property will be set +when the binding succeeds. +

+

+

+
+

Note

+

+ Note that this function will automatically determine the value + of "bus-address" property and will generally cause your + application to use new socket for every DeeServer with different swarm + name. See dee_server_new_for_address() if you'd like to share one + connection between multiple DeeServer instances. +

+
+

+

+
++ + + + + + + + + + +

swarm_name :

Name of swarm to join.

Returns :

A newly constructed DeeServer. [transfer full] +
+
+
+
+

dee_server_new_for_address ()

+
DeeServer *         dee_server_new_for_address          (const gchar *swarm_name,
+                                                         const gchar *bus_address);
+

+Creates a new instance of DeeServer and tries to bind to bus_address. +The "swarm-leader" property will be set when the binding succeeds. +

+

+If there is already a DeeServer instance bound to bus_address, +the connection will be shared with the newly constructed instance. +

+

+

+
+

Note

+

+ This function is primarily meant for sharing of one connection (socket) + between multiple DeeServers, so that you can create DeeServer instances + with varying swarm names, but the same bus address, which will cause + them to share the connection (the sharing is possible only within + the same process though). +

+
+

+

+
++ + + + + + + + + + + + + + +

swarm_name :

Name of swarm to join.

bus_address :

D-Bus address to use for the connection.

Returns :

A newly constructed DeeServer. [transfer full] +
+
+
+
+

Property Details

+
+

The "bus-address" property

+
  "bus-address"              gchar*                : Read / Write / Construct Only
+

Bus address to use for the connection.

+

Default value: NULL

+
+
+
+

The "same-user-only" property

+
  "same-user-only"           gboolean              : Read / Write / Construct Only
+

Accept connections from current user only.

+

Default value: TRUE

+
+
+
+ + + \ No newline at end of file diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeSharedModel.html dee-1.0.10/doc/reference/dee-1.0/html/DeeSharedModel.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeSharedModel.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeSharedModel.html 2012-04-12 07:21:57.000000000 +0000 @@ -39,18 +39,19 @@

DeeSharedModel

-

DeeSharedModel — A DeeModel that can synchronize with other +

DeeSharedModel — A DeeModel that can synchronize with other DeeSharedModel objects across D-Bus.

@@ -72,17 +74,21 @@ +----DeeProxyModel +----DeeSharedModel
+
+  GEnum
+   +----DeeSharedModelAccessMode
+

Implemented Interfaces

DeeSharedModel implements - DeeModel and DeeSerializable.

+ DeeModel and DeeSerializable.

Properties

-  "access-mode"              DeeSharedModelAccessMode  : Read / Write / Construct Only
+  "access-mode"              DeeSharedModelAccessMode  : Read / Write / Construct Only
   "peer"                     DeePeer*              : Read / Write / Construct Only
   "synchronized"             gboolean              : Read
 
@@ -131,6 +137,19 @@

+

enum DeeSharedModelAccessMode

+
typedef enum {
+  DEE_SHARED_MODEL_ACCESS_MODE_WORLD_WRITABLE,
+  DEE_SHARED_MODEL_ACCESS_MODE_LEADER_WRITABLE
+} DeeSharedModelAccessMode;
+
+

+Enumeration defining behavior of the model with regards to writes from +other peers in the swarm. +

+
+
+

struct DeeSharedModelClass

struct DeeSharedModelClass {
 };
@@ -261,7 +280,7 @@
 
gboolean            dee_shared_model_is_synchronized    (DeeSharedModel *self);

Check if the model is synchronized with its peers. Before modifying a -shared model in any way (except dee_model_set_schema()) you should wait for +shared model in any way (except dee_model_set_schema()) you should wait for it to become synchronized. This is normally done by waiting for the "notify::synchronized" signal.

@@ -286,11 +305,11 @@

dee_shared_model_new ()

-
DeeModel *          dee_shared_model_new                (const gchar *name);
+
DeeModel *          dee_shared_model_new                (const gchar *name);

Create a new empty shared model without any column schema associated. The column schema will be set in one of two ways: firstly you may set it -manually with dee_model_set_schema() or secondly it will be set once +manually with dee_model_set_schema() or secondly it will be set once the first rows are exchanged with a peer model.

@@ -319,9 +338,43 @@


+

dee_shared_model_new_for_peer ()

+
DeeModel *          dee_shared_model_new_for_peer       (DeePeer *peer);
+

+Create a new empty shared model without any column schema associated. +The column schema will be set in one of two ways: firstly you may set it +manually with dee_model_set_schema() or secondly it will be set once +the first rows are exchanged with a peer model. +

+

+A DeeSharedModel with a schema manually set has to be created before +creating more DeeSharedModel with the same name. +

+

+A shared model created with this constructor will store row data in a +suitably picked memory backed model. +

+
++ + + + + + + + + + +

peer :

A DeePeer instance. [transfer full] +

Returns :

a new DeeSharedModel. [transfer full][type DeeSharedModel] +
+
+
+

dee_shared_model_new_with_back_end ()

-
DeeModel *          dee_shared_model_new_with_back_end  (const gchar *name,
-                                                         DeeModel *back_end);
+
DeeModel *          dee_shared_model_new_with_back_end  (const gchar *name,
+                                                         DeeModel *back_end);

Create a new shared model storing all data in back_end.

@@ -340,7 +393,7 @@

back_end :

-The DeeModel that will actually store +The DeeModel that will actually store the model data. Ownership of the ref to back_end is transfered to the shared model. [transfer full] @@ -358,7 +411,7 @@

Property Details

The "access-mode" property

-
  "access-mode"              DeeSharedModelAccessMode  : Read / Write / Construct Only
+
  "access-mode"              DeeSharedModelAccessMode  : Read / Write / Construct Only

Enumeration defining behavior of this model when trying to write to it.

@@ -390,7 +443,7 @@

You should not modify a DeeSharedModel that is not synchronized. Before -modifying the model in any way (except calling dee_model_set_schema()) +modifying the model in any way (except calling dee_model_set_schema()) you should wait for it to become synchronized.

Default value: FALSE

diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeTermList.html dee-1.0.10/doc/reference/dee-1.0/html/DeeTermList.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeTermList.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeTermList.html 2012-04-12 07:21:57.000000000 +0000 @@ -6,7 +6,7 @@ - + @@ -14,7 +14,7 @@ - + @@ -64,7 +64,7 @@

Description

DeeTermList is a simple list type containing the indexed terms of a row -in a DeeModel as recorded in a DeeIndex. The terms are extracted from the +in a DeeModel as recorded in a DeeIndex. The terms are extracted from the model by using a DeeAnalyzer.

diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeTransaction.html dee-1.0.10/doc/reference/dee-1.0/html/DeeTransaction.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeTransaction.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeTransaction.html 2012-04-12 07:21:57.000000000 +0000 @@ -37,7 +37,7 @@

DeeTransaction

-

DeeTransaction — A self contained change set for a DeeModel

+

DeeTransaction — A self contained change set for a DeeModel

@@ -53,9 +53,9 @@ gboolean dee_transaction_commit (DeeTransaction *self, GError **error); GQuark dee_transaction_error_quark (void); -DeeModel * dee_transaction_get_target (DeeTransaction *self); +DeeModel * dee_transaction_get_target (DeeTransaction *self); gboolean dee_transaction_is_committed (DeeTransaction *self); -DeeModel * dee_transaction_new (DeeModel *target); +DeeModel * dee_transaction_new (DeeModel *target);
@@ -70,22 +70,22 @@

Implemented Interfaces

DeeTransaction implements - DeeModel and DeeSerializable.

+ DeeModel and DeeSerializable.

Properties

-  "target"                   DeeModel*             : Read / Write / Construct Only
+  "target"                   DeeModel*             : Read / Write / Construct Only
 

Description

DeeTransaction is a self contained change set related to some particular -DeeModel called the target model. +DeeModel called the target model.

-The transaction instance itself implements the DeeModel interface in a way +The transaction instance itself implements the DeeModel interface in a way that overlays the target model. In database terms the target model has isolation level READ_COMMITTED. Meaning that the target model is not modified until you call dee_transaction_commit(). @@ -188,7 +188,7 @@


dee_transaction_get_target ()

-
DeeModel *          dee_transaction_get_target          (DeeTransaction *self);
+
DeeModel *          dee_transaction_get_target          (DeeTransaction *self);

Get the target model of a transaction. This is just a convenience method for accessing the :target property. @@ -235,13 +235,13 @@


dee_transaction_new ()

-
DeeModel *          dee_transaction_new                 (DeeModel *target);
+
DeeModel *          dee_transaction_new                 (DeeModel *target);
- + @@ -257,7 +257,7 @@

Property Details

The "target" property

-
  "target"                   DeeModel*             : Read / Write / Construct Only
+
  "target"                   DeeModel*             : Read / Write / Construct Only

Target model.

diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/DeeTreeIndex.html dee-1.0.10/doc/reference/dee-1.0/html/DeeTreeIndex.html --- dee-1.0.8/doc/reference/dee-1.0/html/DeeTreeIndex.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/DeeTreeIndex.html 2012-04-12 07:21:57.000000000 +0000 @@ -7,7 +7,7 @@ - + @@ -18,7 +18,7 @@ - +

target :

The DeeModel the transaction applies againstThe DeeModel the transaction applies against

Returns :

Up Home Dee Reference ManualNextNext
Top @@ -44,7 +44,7 @@ struct DeeTreeIndex; struct DeeTreeIndexClass; -DeeTreeIndex * dee_tree_index_new (DeeModel *model, +DeeTreeIndex * dee_tree_index_new (DeeModel *model, DeeAnalyzer *analyzer, DeeModelReader *reader); @@ -89,7 +89,7 @@

dee_tree_index_new ()

-
DeeTreeIndex *      dee_tree_index_new                  (DeeModel *model,
+
DeeTreeIndex *      dee_tree_index_new                  (DeeModel *model,
                                                          DeeAnalyzer *analyzer,
                                                          DeeModelReader *reader);

diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/index.html dee-1.0.10/doc/reference/dee-1.0/html/index.html --- dee-1.0.8/doc/reference/dee-1.0/html/index.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/index.html 2012-04-12 07:21:57.000000000 +0000 @@ -17,38 +17,47 @@

Peer Discovery
-
+
+
+DeeClient — Creates a client object you can use to connect + to a DeeServer. +
+
DeePeer — Finds other objects with the same swarm-name on the bus. -
+ +
+DeeServer — Creates a server object you can connect to. +
+
Models
Filters — A suite of simple DeeFilters for use with DeeFilterModels
-DeeFilterModel — A DeeModel that contains a filtered subset of - another DeeModel +DeeFilterModel — A DeeModel that contains a filtered subset of + another DeeModel
-DeeModel — A generic table model interface +DeeModel — A generic table model interface
-DeeProxyModel — A model that wraps another underlying DeeModel +DeeProxyModel — A model that wraps another underlying DeeModel
-DeeSequenceModel — A DeeModel implementation backed by a GSequence +DeeSequenceModel — A DeeModel implementation backed by a GSequence
DeeSerializableModel — Abstract base class for easing implementations of - DeeModels providing a unique version number + DeeModels providing a unique version number for each row
-DeeSharedModel — A DeeModel that can synchronize with other +DeeSharedModel — A DeeModel that can synchronize with other DeeSharedModel objects across D-Bus.
-DeeTransaction — A self contained change set for a DeeModel +DeeTransaction — A self contained change set for a DeeModel
Indexes
@@ -60,13 +69,13 @@ DeeHashIndex — A DeeHashIndex implementation doing lookups in a hash map
-DeeIndex — An inverted index interface for smart access to a DeeModel +DeeIndex — An inverted index interface for smart access to a DeeModel
-Model Readers — Extracting strings from DeeModels +Model Readers — Extracting strings from DeeModels
-DeeResultSet — Cursor-like interface for results sets +DeeResultSet — Cursor-like interface for results sets
DeeTermList — A simple collection type representing a list of indexed terms for a row in a DeeIndex @@ -77,6 +86,9 @@
DeeTreeIndex — A DeeTreeIndex backed by a balanced binary tree
+
+Dee ICU Extensions — A suite of DeeTermFilters based on ICU +
Resources and Serialization
@@ -84,10 +96,10 @@ DeeFileResourceManager — A resource manager backed by memory mapped files
-DeeResourceManager — Store and load DeeSerializables by name +DeeResourceManager — Store and load DeeSerializables by name
-DeeSerializable — Interface for classes that can serialize to and from GVariants +DeeSerializable — Interface for classes that can serialize to and from GVariants
Object Hierarchy
diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/index.sgml dee-1.0.10/doc/reference/dee-1.0/html/index.sgml --- dee-1.0.8/doc/reference/dee-1.0/html/index.sgml 2012-03-23 11:41:28.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/index.sgml 2012-04-12 07:21:57.000000000 +0000 @@ -1,3 +1,15 @@ + + + + + + + + + + + + @@ -8,9 +20,12 @@ + + + @@ -21,6 +36,21 @@ + + + + + + + + + + + + + + + @@ -36,6 +66,7 @@ + @@ -56,68 +87,66 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -153,6 +182,7 @@ + @@ -161,6 +191,7 @@ + @@ -169,6 +200,7 @@ + @@ -258,22 +290,18 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + @@ -302,6 +330,18 @@ + + + + + + + + + + + + @@ -316,34 +356,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -351,7 +383,9 @@ - + + + diff -Nru dee-1.0.8/doc/reference/dee-1.0/html/object-tree.html dee-1.0.10/doc/reference/dee-1.0/html/object-tree.html --- dee-1.0.8/doc/reference/dee-1.0/html/object-tree.html 2012-03-23 11:41:30.000000000 +0000 +++ dee-1.0.10/doc/reference/dee-1.0/html/object-tree.html 2012-04-12 07:21:57.000000000 +0000 @@ -6,14 +6,14 @@ - + - + @@ -27,6 +27,8 @@ DeeAnalyzerDeeTextAnalyzerDeePeer + DeeClient + DeeServerDeeFileResourceManagerDeeSerializableModelDeeProxyModel @@ -39,11 +41,10 @@ DeeHashIndexDeeTreeIndexDeeTermList - GInterface - DeeResourceManager - DeeModel - DeeSerializable - DeeResultSet + GBoxed + DeeModelIter + GEnum + DeeSharedModelAccessMode