aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/.gitignore9
-rw-r--r--doc/Makefile.in469
-rw-r--r--doc/context-arch.html1185
-rw-r--r--doc/context-intro.html502
-rw-r--r--doc/context-providers.html611
-rw-r--r--doc/context-types.html1138
-rw-r--r--doc/use-cases.html1183
7 files changed, 5088 insertions, 9 deletions
diff --git a/doc/.gitignore b/doc/.gitignore
deleted file mode 100644
index 9c07b333..00000000
--- a/doc/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-context-providers.html
-context-intro.html
-context-properties.html
-context-provider-schema.html
-context.html
-contextkit.html
-use-cases.html
-context-arch.html
-context-types.html
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 00000000..dfa7e16d
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,469 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
+ $(top_srcdir)/m4/ax_prog_perl_modules.m4 \
+ $(top_srcdir)/m4/ax_version_tools.m4 $(top_srcdir)/m4/dolt.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/qt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(htmldir)"
+DATA = $(html_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+ASCIIDOC = @ASCIIDOC@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CDB_LIBS = @CDB_LIBS@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOLT_BASH = @DOLT_BASH@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GCOV = @GCOV@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LCOV = @LCOV@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTCOMPILE = @LTCOMPILE@
+LTCXXCOMPILE = @LTCXXCOMPILE@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+QJson_CFLAGS = @QJson_CFLAGS@
+QJson_LIBS = @QJson_LIBS@
+QtCore_CFLAGS = @QtCore_CFLAGS@
+QtCore_LIBS = @QtCore_LIBS@
+QtDBus_CFLAGS = @QtDBus_CFLAGS@
+QtDBus_LIBS = @QtDBus_LIBS@
+QtTest_CFLAGS = @QtTest_CFLAGS@
+QtTest_LIBS = @QtTest_LIBS@
+QtXml_CFLAGS = @QtXml_CFLAGS@
+QtXml_LIBS = @QtXml_LIBS@
+RANLIB = @RANLIB@
+RCC = @RCC@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UIC = @UIC@
+VERSION = @VERSION@
+XMLLINT = @XMLLINT@
+XSLTPROC = @XSLTPROC@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = $(datadir)/doc/contextkit/html/
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+html_ASCIIDOCS = context-intro.txt context-providers.txt context-types.txt context-arch.txt use-cases.txt
+
+# Support for html_ASCIIDOCS and html_EXTRA
+html_DATA = $(html_EXTRA) \
+ $(html_ASCIIDOCS:.txt=.html) \
+ fig3.png fig4.png
+
+EXTRA_DIST = $(html_ASCIIDOCS) \
+ $(html_DATA) \
+ myfilter.conf \
+ context-cron.txt \
+ context-talk.txt \
+ protocol-suggestion.txt \
+ lgpl-2.1.txt
+
+MAINTAINERCLEANFILES = $(html_EXTRA) \
+ $(html_ASCIIDOCS:.txt=.html)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-htmlDATA: $(html_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done
+
+uninstall-htmlDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(htmldir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(htmldir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am: html-local
+
+info: info-am
+
+info-am:
+
+install-data-am: install-htmlDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-htmlDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am html-local info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-htmlDATA install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ uninstall uninstall-am uninstall-htmlDATA
+
+
+html-local: $(html_EXTRA) $(html_ASCIIDOCS:.txt=.html)
+
+@CONTEXTKIT_BUILD_DOCS_TRUE@context-arch.html: context-arch.txt
+
+@CONTEXTKIT_BUILD_DOCS_TRUE@%.html: %.txt
+@CONTEXTKIT_BUILD_DOCS_TRUE@ asciidoc -a toc --unsafe -f myfilter.conf $^
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/context-arch.html b/doc/context-arch.html
new file mode 100644
index 00000000..6dd5b5ae
--- /dev/null
+++ b/doc/context-arch.html
@@ -0,0 +1,1185 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 8.4.4" />
+<title>Context Framework Subsystem Architecture Description</title>
+<style type="text/css">
+/* Debug borders */
+p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
+/*
+ border: 1px solid red;
+*/
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+tt {
+ color: navy;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ font-family: sans-serif;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+
+div.sectionbody {
+ font-family: serif;
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+
+pre {
+ padding: 0;
+ margin: 0;
+}
+
+span#author {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+span#email {
+}
+span#revision {
+ font-family: sans-serif;
+}
+
+div#footer {
+ font-family: sans-serif;
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+div#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+div#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+div#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.5em;
+ margin-bottom: 2.5em;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid silver;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid silver;
+ background: #f4f4f4;
+ padding: 0.5em;
+}
+
+div.quoteblock {
+ padding-left: 2.0em;
+ margin-right: 10%;
+}
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock {
+ padding-left: 2.0em;
+ margin-right: 10%;
+}
+div.verseblock > div.content {
+ white-space: pre;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 2px solid silver;
+}
+
+div.exampleblock > div.content {
+ border-left: 2px solid silver;
+ padding: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+div.imageblock img { border: 1px solid silver; }
+span.image img { border-style: none; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead {
+ font-family: sans-serif;
+ font-weight: bold;
+}
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overriden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+@media print {
+ div#footer-badges { display: none; }
+}
+
+div#toctitle {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+/* Workarounds for IE6's broken and incomplete CSS2. */
+
+div.sidebar-content {
+ background: #ffffee;
+ border: 1px solid silver;
+ padding: 0.5em;
+}
+div.sidebar-title, div.image-title {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ margin-top: 0.0em;
+ margin-bottom: 0.5em;
+}
+
+div.listingblock div.content {
+ border: 1px solid silver;
+ background: #f4f4f4;
+ padding: 0.5em;
+}
+
+div.quoteblock-attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock-content {
+ white-space: pre;
+}
+div.verseblock-attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+
+div.exampleblock-content {
+ border-left: 2px solid silver;
+ padding-left: 0.5em;
+}
+
+/* IE6 sets dynamically generated links as visited. */
+div#toc a:visited { color: blue; }
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+window.onload = function(){generateToc(2)}
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, October 2006. License: GPL */
+
+function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+}
+
+function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+}
+
+function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName)
+ if (mo)
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+}
+
+// This function does the work. toclevels = 1..4.
+function generateToc(toclevels) {
+ var toc = document.getElementById("toc");
+ var entries = tocEntries(document.getElementsByTagName("body")[0], toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "toc" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ document.getElementById("header").removeChild(toc);
+}
+/*]]>*/
+</script>
+</head>
+<body>
+<div id="header">
+<h1>Context Framework Subsystem Architecture Description</h1>
+<div id="toc">
+ <div id="toctitle">Table of Contents</div>
+ <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
+</div>
+</div>
+<div id="preamble">
+<div class="sectionbody">
+<div class="tableblock">
+<table rules="all"
+width="30%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="50%" />
+<col width="50%" />
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">Author</p></td>
+<td align="left" valign="top"><p class="table">Marius Vollmer</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">Status</p></td>
+<td align="left" valign="top"><p class="table">Draft</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">Version</p></td>
+<td align="left" valign="top"><p class="table">2009-11-26</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">Approver</p></td>
+<td align="left" valign="top"><p class="table">Olli Finni</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="paragraph"><p>Copyright &#169; Nokia. All rights reserved.</p></div>
+<div class="paragraph"><p>This material, including documentation and any related computer
+programs, is protected by copyright controlled by Nokia. All rights
+are reserved. Copying, including reproducing, storing, adapting or
+translating, any or all of this material requires the prior written
+consent of Nokia. This material also contains confidential
+information, which may not be disclosed to others without the prior
+written consent of Nokia.</p></div>
+<div class="paragraph"><p>Nokia is a registered trademark of Nokia. Other company and product
+names mentioned herein may be trademarks or tradenames of their
+respective owners.</p></div>
+</div>
+</div>
+<h2 id="_introduction">Introduction</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The Context Framework, part of the Data Domain, provides a uniform,
+high level API to numerous context properties of the device. While
+many of these context properties are available without the context
+framework, each of them has its own specific way of accessing it. The
+context framework collects them all behind a uniform API, and
+applications thus have easy access to all of the context properties.</p></div>
+<div class="paragraph"><p>The following lists some typical context properties:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Connectivity status of the device; whether it is connected to the
+ Internet and by what means.
+</p>
+</li>
+<li>
+<p>
+Location; the name of the current city.
+</p>
+</li>
+<li>
+<p>
+Builtin sensors; orientation in space.
+</p>
+</li>
+<li>
+<p>
+Current use; idle, plays media, web browsing.
+</p>
+</li>
+<li>
+<p>
+Combined properties; current weather based on location and online
+ weather database.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>More concretely, the information in the status bar of a device is
+provided exclusively by the Context Framework.</p></div>
+<div class="paragraph"><p>Applications access context properties by using the <tt>ContextProperty</tt>
+class that is implemented in api:libcontextsubscriber.</p></div>
+<div class="paragraph"><p>The context framework is modular: context properties from multiple
+independent components are directly combined in the
+<tt>libcontextsubscriber</tt> API and applications can access them without
+needing to know who is ultimately providing them.</p></div>
+<div class="paragraph"><p>A component that wants to directly provide context properties needs to
+implement the relevant interfaces defined by the context framework.
+Currently, the only supported way to do that is to use the
+api:libcontextprovider library.</p></div>
+<div class="paragraph"><p>In addition to information from multiple sources, the context
+framework is a provider of context properties itself: there is a
+<em>context daemon</em> that collects information from low-level and legacy
+interfaces. This context daemon is a good default location for
+implementing context properties and for absorbing properties from
+existing subsystems that have aqcuired them for historical reasons and
+would rather get rid of them.</p></div>
+<div class="paragraph"><p>The concrete list of properties is ultimately defined by their
+providers, but the context framework is the central authority: the
+&#8216;official&#8217; list of context properties of the Maemo platform is defined
+and documented by the context framework.</p></div>
+<div class="paragraph"><p>To summarize, the context framework contributes value to the Maemo
+platform in the following ways:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+It implements and documents a high-level, uniform API to a set of
+ context properties that are provided by multiple components.
+</p>
+</li>
+<li>
+<p>
+It defines and documents the concrete list of properties of the
+ Maemo platform. This includes harmonizing the context ontology with
+ other industry efforts.
+</p>
+</li>
+<li>
+<p>
+It implements context properties that do not naturally belong to
+ other subsystems and coordinates the implementation of context
+ properties that do belong in specific subsystems.
+</p>
+</li>
+<li>
+<p>
+It provides a debugging and exploration tool for inspecting and
+ controlling context properties.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Thus, the Context Framework does not drive the behavior of the system,
+it only provides the information that is needed for other components
+to decide for themselves. To makes this reasonably easy, the context
+properties are at a high level of abstraction and express the coarse
+grained states of the device. For example, the properties tell you
+whether it is completely idle, in passive use playing some media, or
+in active use. They don&#8217;t give a real-time view of CPU load.</p></div>
+</div>
+<h2 id="_architecture">Architecture</h2>
+<div class="sectionbody">
+<h3 id="_concepts">Concepts</h3><div style="clear:left"></div>
+<div class="paragraph"><p>Context properties are collected from all providers that have
+registered themselves with the
+<a href="context-providers.html"><tt>context-providers</tt></a> interface. For each
+provider, this registration information includes the list of its
+properties with type information and a short description for each, and
+the D-Bus bus name where the provider can be reached. Providers can
+be both on the session and on the system bus, and the registration
+information indicates which bus it is.</p></div>
+<div class="paragraph"><p>This registration information is read by the <tt>libcontextsubscriber</tt>
+library and used by its <tt>ContextProperty</tt> class to connect a requested
+property name to the right bus name.</p></div>
+<div class="paragraph"><p>The registration information is compiled into a <em>cache</em> that is
+optimized for use by <tt>libcontextsubscriber</tt>. When the set of
+registered properties changes, the cache is recompiled by a command
+line utility provided by the context framework. This will then
+trigger all libcontextsubscriber clients to reload the registry
+information, and existing <tt>ContextProperty</tt> instances to be updated.</p></div>
+<div class="paragraph"><p>(Note that the cache only caches property declarations, it does not
+ever contain the values of context properties.)</p></div>
+<div class="paragraph"><p>When providers are installed from packages, recompilation of the cache
+happens automatically. <em>Triggers</em> in the Context Framework packages
+are used to run the command line utility at the right times.</p></div>
+<div class="paragraph"><p>The <tt>libcontextsubscriber</tt> library gracefully handles start, stop and
+restart of providers. During system startup some applications may
+start to use the Context Framework before all providers are
+available. Properties become dynamically available as providers become
+available, and removed when providers are no longer available.</p></div>
+<div class="paragraph"><p>Communication between a <tt>ContextProperty</tt> and the provider happens
+using a private D-Bus interface. This interface allows for bulk
+retrieval of property values, bulk subscriptions, and bulk change
+notification.</p></div>
+<div class="paragraph"><p>The values of properties are represented to clients as a <tt>QVariant</tt>
+value. Properties can have a special <em>null</em> value when they are not
+available, either because they are not provided by any provider, or
+because the provider is not able to deliver a value. In other words,
+the types of all context properties are "maybe types": subscribers
+might get a value or not. In general, the <em>null</em> value means that the
+real value of the property is unknown.</p></div>
+<div class="paragraph"><p>The <em>null</em> value is different from the empty string or the empty list.
+For example, the "Location.City" property, which denotes the name of
+the current city as a string, will be <em>null</em> when the name of the city
+is unknown (either because the current location of the device is
+unknown or because the database that maps from locations to city names
+is not reachable), but it will be the empty string when the current
+location is known to be outside of any city.</p></div>
+<div class="paragraph"><p>The absence of a value can have many reasons: no provider is available
+for this property, the provider has not yet delivered a value, or the
+provider is deliberately not delivering a value, which it can in turn
+have many reasons. For example, necessary hardware might not be
+present or its use might be disallowed by the current power management
+policy, or a needed online database might not reachable.</p></div>
+<div class="paragraph"><p>The Context Framework makes no attempt to distinguish these different
+reasons. Subscribers should make good use of a value when they get
+it, but they must not fail catastrophically when no value is
+available, or when it takes longer than expected for it to become
+available.</p></div>
+<div class="paragraph"><p>It is expected that eventually the statusbar plugins, such as the
+battery charge monitor and the connectivity indicators, exclusively
+use the context properties to retrieve the information they display.</p></div>
+<div class="paragraph"><p>Context providers need to implement the private D-Bus interface. This
+is done with the api:libcontextprovider library. This library is used
+by the context daemon itself, which can serve as an extended example.</p></div>
+<div class="paragraph"><p>The Connectivity Framework and the Sensor Framework are expected to be
+context providers as described above. Additional context properties,
+such as those related to the Location Framework, are implemented by
+the <em>context daemon</em> contained in the Context Framework.</p></div>
+<div class="paragraph"><p>The <tt>contextd</tt> Context Daemon will implement all context properties
+that don&#8217;t have a native provider. It will at least implement
+properties for the information contained in HAL and for location
+related information. It is expected that <tt>contextd</tt> runs the
+necessary reverse geocoding operations at a reasonable frequency. It
+will also perform Content Framework queries to retrieve the values of
+certain properties.</p></div>
+<div class="paragraph"><p>If necessary for security reasons, the <tt>contextd</tt> might need to be
+split into multiple instances.</p></div>
+<h3 id="_system_context">System context</h3><div style="clear:left"></div>
+<div class="paragraph"><p>The context framework decouples context subscribers from context
+providers.</p></div>
+<div class="svg">
+<object type="image/png" data="fig3.png"/>
+</div>
+<h3 id="_structural_view">Structural view</h3><div style="clear:left"></div>
+<div class="paragraph"><p>The following figure summarizes the components of the Context
+Framework.</p></div>
+<div class="svg">
+<object type="image/png" data="fig4.png"/>
+</div>
+<div class="paragraph"><p>There are two fundamental options for exporting information via the
+context framework:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The context daemon can use existing platform interfaces, such as
+ HAL, to collect this information, process it, and export it as a
+ context property.
+ <br />
+ This applies to: HAL, Location subsystem, Kernel.
+</p>
+</li>
+<li>
+<p>
+The principal producer of the information, such as the <tt>icd2</tt> daemon
+ in the Connectivity subsystem, can use the libcontextprovider API
+ and export the information directly to applications without using
+ the context daemon as a middle man.
+ <br />
+ This applies to: Sensor Framework, possibly Connectivity subsystem
+ (needs agreeement), possibly Telephony subsystem (needs agreement)
+</p>
+</li>
+</ul></div>
+<h3 id="_provided_interfaces">Provided Interfaces</h3><div style="clear:left"></div>
+<div class="paragraph"><div class="title"><tt>libcontextsubscriber</tt></div><p>A C++ API for listening to context properties.</p></div>
+<div class="paragraph"><p><a href="libcontextsubscriber">Documentation</a></p></div>
+<div class="paragraph"><div class="title"><tt>libcontextprovider</tt></div><p>A C++ and C API for providing values of context properties.</p></div>
+<div class="paragraph"><p><a href="libcontextprovider">Documentation</a></p></div>
+<div class="paragraph"><div class="title"><tt>context-properties</tt></div><p>The canonical list of context properties in the Maemo platform. When
+a context property from the list is available, it must conform to its
+description there.</p></div>
+<div class="paragraph"><p><a href="context-properties.html">Documentation</a></p></div>
+<div class="paragraph"><div class="title"><tt>context-providers</tt></div><p>The interface to register providers of context properties. A provider
+must use the api:libcontextprovider API.</p></div>
+<div class="paragraph"><p><a href="context-providers.html">Documentation</a></p></div>
+<h3 id="_development_support">Development support</h3><div style="clear:left"></div>
+<div class="paragraph"><p>No special features are needed in the Context Framework components to
+make them work in a Scratchbox environment. Availability of
+individual properties depends on the ability of their providers to run
+in Scratchbox. The <tt>contextd</tt> Context Daemon runs but might not be
+able to provide all properties.</p></div>
+<div class="paragraph"><p>The Context Framework provides a graphical tool called the Context
+Commander to watch all available context properties. This can be used
+to test context providers during development.</p></div>
+<div class="paragraph"><p>In addition, the Context Commander can be used to force context
+properties of selected applications to arbitrary values. This can be
+used to test the reaction of applications to context changes.</p></div>
+<div class="paragraph"><p>The Context Commander runs on the device and either show its UI on the
+device itself or exports it to an external X11 server. This way, the
+testing can be done without disturbing the display of the device
+itself.</p></div>
+<div class="paragraph"><p>When started, the Context Commander takes control of all subscribers
+with their cooperation: when the
+"org.freedesktop.ContextKit.Commander" name appears on the session
+D-Bus, all ContextProperty instances redirect their subcription
+requests to it.</p></div>
+<div class="paragraph"><p>There are vague ideas about integrating the Context Commander into
+Eclipse.</p></div>
+<h3 id="_licenses">Licenses</h3><div style="clear:left"></div>
+<div class="paragraph"><p>The components of the Context Framework will be developed publically,
+under the umbrella of the freedesktop.org organization. All source
+code is licensed with LGPL 2.1, including the daemon and context
+commander.</p></div>
+<div class="paragraph"><p>Non-free source code can safely interact with the Context Framework
+components.</p></div>
+<h3 id="_user_data_settings_and_configurability">User Data, Settings, and Configurability</h3><div style="clear:left"></div>
+<div class="paragraph"><p>The Context Framework does not store user data and is not
+configurable.</p></div>
+<h3 id="_configurability">Configurability</h3><div style="clear:left"></div>
+<div class="paragraph"><p>See above.</p></div>
+<h3 id="_packages">Packages</h3><div style="clear:left"></div>
+<div class="dlist"><div class="title"><tt>contextkit</tt></div><dl>
+<dt class="hdlist1">
+Languages
+</dt>
+<dd>
+<p>
+C, C++
+</p>
+</dd>
+<dt class="hdlist1">
+License
+</dt>
+<dd>
+<p>
+LGPL 2.1
+</p>
+</dd>
+<dt class="hdlist1">
+Provided interfaces
+</dt>
+<dd>
+<p>
+libcontextsubscriber, libcontextprovider, context-providers, context-properties,
+</p>
+</dd>
+<dt class="hdlist1">
+Used interfaces
+</dt>
+<dd>
+<p>
+libdbus, libgee, libglib, libcdb, libqt4-dbus, libqt4-xml, libqtcore4
+</p>
+</dd>
+<dt class="hdlist1">
+Binary packages
+</dt>
+<dd>
+<p>
+ libcontextsubscriber0, libcontextsubscriber0-dbg, libcontextsubscriber-dev, libcontextsubscriber-doc,
+ libcontextprovider0, libcontextprovider0-dbg, libcontextprovider-dev, libcontextprovider-doc,
+ contextkit, contextkit-doc, context-dbg
+</p>
+</dd>
+<dt class="hdlist1">
+Sources
+</dt>
+<dd>
+<p>
+<a href="https://dvcs.projects.maemo.org/git/?p=ContextKit">https://dvcs.projects.maemo.org/git/?p=ContextKit</a>
+</p>
+</dd>
+</dl></div>
+<div class="dlist"><div class="title"><tt>context-commander</tt></div><dl>
+<dt class="hdlist1">
+Languages
+</dt>
+<dd>
+<p>
+C++
+</p>
+</dd>
+<dt class="hdlist1">
+License
+</dt>
+<dd>
+<p>
+LGPL 2.1
+</p>
+</dd>
+<dt class="hdlist1">
+Provided interfaces
+</dt>
+<dd>
+<p>
+none
+</p>
+</dd>
+<dt class="hdlist1">
+Used interfaces
+</dt>
+<dd>
+<p>
+libcontextsubscriber, libqt4-dbus, libqt4-gui, libqt4-core
+</p>
+</dd>
+<dt class="hdlist1">
+Binary packages
+</dt>
+<dd>
+<p>
+context-commander
+</p>
+</dd>
+<dt class="hdlist1">
+Sources
+</dt>
+<dd>
+<p>
+<a href="https://dvcs.projects.maemo.org/git/?p=ContextCommander">https://dvcs.projects.maemo.org/git/?p=ContextCommander</a>
+</p>
+</dd>
+</dl></div>
+<div class="dlist"><div class="title"><tt>context-provider-example</tt></div><dl>
+<dt class="hdlist1">
+Languages
+</dt>
+<dd>
+<p>
+C
+</p>
+</dd>
+<dt class="hdlist1">
+License
+</dt>
+<dd>
+<p>
+LGPL 2.1
+</p>
+</dd>
+<dt class="hdlist1">
+Provided interfaces
+</dt>
+<dd>
+<p>
+Context.Example.* properties.
+</p>
+</dd>
+<dt class="hdlist1">
+Used interfaces
+</dt>
+<dd>
+<p>
+libcontextprovider, sysfs files for accelerometer and ambient light sensor
+</p>
+</dd>
+<dt class="hdlist1">
+Binary packages
+</dt>
+<dd>
+<p>
+context-provider-example
+</p>
+</dd>
+<dt class="hdlist1">
+Sources
+</dt>
+<dd>
+<p>
+<a href="https://dvcs.projects.maemo.org/git/?p=ContextProviderExample">https://dvcs.projects.maemo.org/git/?p=ContextProviderExample</a>
+</p>
+</dd>
+</dl></div>
+<div class="dlist"><div class="title"><tt>context-subscriber-example</tt></div><dl>
+<dt class="hdlist1">
+Languages
+</dt>
+<dd>
+<p>
+C++
+</p>
+</dd>
+<dt class="hdlist1">
+License
+</dt>
+<dd>
+<p>
+LGPL 2.1
+</p>
+</dd>
+<dt class="hdlist1">
+Provided interfaces
+</dt>
+<dd>
+<p>
+none.
+</p>
+</dd>
+<dt class="hdlist1">
+Used interfaces
+</dt>
+<dd>
+<p>
+Context.Example.* properties, libcontextsubscriber, libqt4-gui, libqt4-core
+</p>
+</dd>
+<dt class="hdlist1">
+Binary packages
+</dt>
+<dd>
+<p>
+context-subscriber-example
+</p>
+</dd>
+<dt class="hdlist1">
+Sources
+</dt>
+<dd>
+<p>
+<a href="https://dvcs.projects.maemo.org/git/?p=ContextSubscriberExample">https://dvcs.projects.maemo.org/git/?p=ContextSubscriberExample</a>
+</p>
+</dd>
+</dl></div>
+</div>
+<h2 id="_performance">Performance</h2>
+<div class="sectionbody">
+<h3 id="_general">General</h3><div style="clear:left"></div>
+<div class="paragraph"><p>The Context Framework makes no real-time guarantees and does not rely
+on any.</p></div>
+<div class="paragraph"><p>It is careful not to cause significant additional communication that
+wouldn&#8217;t be needed anyway to communicate contextual information to the
+interested parties.</p></div>
+<div class="paragraph"><p>We expect 5 to 10 providers, about 20 subscribers, each subscribed to
+an average of 5 properties. Property values can become arbitrarily
+big, but are expected to be mostly small, in the order of 10 bytes.
+The occasional big property value is expected to change
+correspondingly infrequently.</p></div>
+<h3 id="_memory">Memory</h3><div style="clear:left"></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="33%" />
+<col width="33%" />
+<col width="33%" />
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">OneNAND</p></td>
+<td align="left" valign="top"><p class="table">All files are stored on the OneNAND, in their FHS mandated places</p></td>
+<td align="left" valign="top"><p class="table">200 KiB</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">eMMC</p></td>
+<td align="left" valign="top"><p class="table">Not used</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">RAM/Idle</p></td>
+<td align="left" valign="top"><p class="table">A couple of bytes per subscription plus a couple more per provided property</p></td>
+<td align="left" valign="top"><p class="table">200 KiB</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">RAM/Peak</p></td>
+<td align="left" valign="top"><p class="table">The biggest property values might reach a KiB</p></td>
+<td align="left" valign="top"><p class="table">500 KiB</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<h3 id="_runtime">Runtime</h3><div style="clear:left"></div>
+<div class="paragraph"><p>The Context Framework allows subscribers and providers to directly
+connect to each other (incurring only the usual D-Bus daemon
+overhead). Context properties are expected to change only
+infrequently and providers are urged to throttle the rate of change.</p></div>
+<div class="paragraph"><p>The contextd daemon is started on the first subscription to one of its
+properties. This is expected to happen on every boot since it
+provides properties that are used by other daemons, such as the
+context engine.</p></div>
+<h3 id="_power_consumption">Power consumption</h3><div style="clear:left"></div>
+<div class="paragraph"><p>Providers of context properties know at any time whether someone in
+the system is subscribed to them. This allows them to avoid expensive
+operations for producing values that are not needed.</p></div>
+<div class="paragraph"><p>The documentation for subscribers urges them to take the cost of
+producing property values into consideration. The subscriber API
+offers an easy way to temporarily suspend a subscription.</p></div>
+<div class="paragraph"><p>Sometimes, increased granularity of control over a property is needed:
+instead of just switching it on and off, the subscriber might want to
+request different levels of quality. For example, some subscribers
+might need a higher update frequency than others and are willing to
+pay the associated price in power consumption.</p></div>
+<div class="paragraph"><p>The recommended way to implement this increased control is to offer
+multiple properties that deliver the same value but with different
+qualities-of-service. For example, there could be both
+"Location.HighResCoordinates" and "Location.LowResCoordinates"
+properties that both deliver the current geographical coordinates.
+Subscribing to "Location.HighResCoordinates", however, would cause the
+location to be updated more frequently and maybe even activate a GPS
+device, if available.</p></div>
+</div>
+<h2 id="_security_impact">Security Impact</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Different context properties might need to have different access
+restrictions. A context provider can implement these access
+restriction in whatever way works, but should preferrably use the
+existing features of the Security Framework.</p></div>
+<div class="paragraph"><p>The Security Framework can control access per D-Bus bus connection.
+Thus, a given context provider should only implement properties with
+the same access rights and leave it to the Security Framework to allow
+or disallow connections to the provider as a whole.</p></div>
+<div class="paragraph"><p>The Context Daemon needs to follow the same rules, of course.</p></div>
+<div class="paragraph"><p>The libcontextsubscriber library listens for a special D-Bus bus name
+to appear and then allows the service behind that name to override all
+values of context properties. The library protects this special name
+with a security token so that only specially certified software can
+own this name. The context commander might or might not be certified
+in this way; instead of certifying it, it might be preferrable to
+require developers to explicitly disable the name protection (via a
+developer certificate or a general device unlocking ceremony) before
+they can use the context commander.</p></div>
+</div>
+<h2 id="_open_items">Open Items</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+The D-Bus interface needs to be reviewed and maybe redesigned. It
+ might make sense to use one object path per property instead of one
+ object path per subscriber like we do now.
+</p>
+</li>
+<li>
+<p>
+Integration with Content Framework needs to be addressed. Snapshots
+ of the current context need to be imported into the content database
+ (as document tags, say) and content queries might be run
+ periodically to provide contextual information (such as the ten most
+ recently accessed documents).
+</p>
+</li>
+<li>
+<p>
+The current plan for localization of context properties requires
+ context providers to do it. They thusly need access to the current
+ device language and rumour has it that everything about l10n is
+ different in Harmattan.
+</p>
+</li>
+</ul></div>
+</div>
+<h2 id="_appendices">Appendices</h2>
+<div class="sectionbody">
+<h3 id="_the_context_framework_for_context_providers">The Context Framework for Context Providers</h3><div style="clear:left"></div>
+<div class="paragraph"><p>The advantages of the Context Framework for application writers should
+be clear: they can access a rich set of useful contextual information
+with a simple API.</p></div>
+<div class="paragraph"><p>The ultimate providers of this information, however, might feel that
+the context framework itself does not add significant value: after
+all, they already implement APIs to access all that information
+anyway. Hooking into the Context Framework means a duplication of
+effort and the requirement to express everything as a value (instead
+of a general query/response API) might be unwelcome.</p></div>
+<div class="paragraph"><p>However, the unified API and central maintenance of the list of core
+properties carries a lot of value:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+It makes using more contextual information trivial once you have
+ used your first property.
+</p>
+</li>
+<li>
+<p>
+It makes it possible to expose present and future context
+ information in all kinds of places with a single effort. Once the
+ context framework has been integrated into the Web runtime, into
+ Python, or into any language that people care about, no additional
+ effort is needed by anyone to track future developments of the
+ context properties.
+</p>
+</li>
+<li>
+<p>
+It decouples context providers from consumers. The context
+ framework makes it possible to move the implementation of a property
+ from one component to another without having to restart the
+ consumers.
+</p>
+</li>
+<li>
+<p>
+It makes it worthwhile to develop sophisticated tools such as the
+ context commander and support for easy automated testing of context
+ subscribers and providers.
+</p>
+</li>
+<li>
+<p>
+It might allow some context providers to exit the "API business"
+ altogether.
+</p>
+<div class="paragraph"><p>If a piece of information is available in a corner of the system but
+needed somewhere else, it is only human to see this as a nuisance
+and cobble together a few D-Bus methods to access that information.</p></div>
+<div class="paragraph"><p>The context framework provides a good alternative in those cases.</p></div>
+</li>
+</ul></div>
+<div class="paragraph"><p>It is thus our opinion that the context framework provides enough
+value to justify pushing it into other peoples subsystems, even if
+that means duplicated efforts.</p></div>
+<div class="paragraph"><p>Moreover, the effort needed to integrate with the context framework is
+low.</p></div>
+<h3 id="_relation_to_policy_engine">Relation to Policy Engine</h3><div style="clear:left"></div>
+<div class="paragraph"><p>The policy engine has the role in the Maemo platform to decide system
+global behavior and controls the various distributed enforcement
+points accordingly. This job will likely be done by OHMng.</p></div>
+<div class="paragraph"><p>The policy engine can be both a subscriber to and provider of context
+properties. The policy engine will base its decisions (partly) on the
+current values of context properties and will publish (part of) its
+decisions as context properties.</p></div>
+<div class="paragraph"><p>Most facts that need to be gathered as input for the policy engine can
+be communicted to it via the context framework. If necessary,
+non-public context properties can be defined that (while visible to
+everyone who knows where to look) are not maintained as part of the
+list of core properties.</p></div>
+<div class="paragraph"><p>Decisions of the policy engine can be communicated to cooperating
+applications and potentially even to enforcement points. The set of
+values representable as context properties is quite rich so that
+hopefully all facts and decisions can be represented with them.</p></div>
+</div>
+<div id="footer">
+<div id="footer-text">
+Last updated 2009-10-23 15:50:03 EEST
+</div>
+</div>
+</body>
+</html>
diff --git a/doc/context-intro.html b/doc/context-intro.html
new file mode 100644
index 00000000..022ca02a
--- /dev/null
+++ b/doc/context-intro.html
@@ -0,0 +1,502 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 8.4.4" />
+<title>Context Framework</title>
+<style type="text/css">
+/* Debug borders */
+p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
+/*
+ border: 1px solid red;
+*/
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+tt {
+ color: navy;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ font-family: sans-serif;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+
+div.sectionbody {
+ font-family: serif;
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+
+pre {
+ padding: 0;
+ margin: 0;
+}
+
+span#author {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+span#email {
+}
+span#revision {
+ font-family: sans-serif;
+}
+
+div#footer {
+ font-family: sans-serif;
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+div#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+div#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+div#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.5em;
+ margin-bottom: 2.5em;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid silver;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid silver;
+ background: #f4f4f4;
+ padding: 0.5em;
+}
+
+div.quoteblock {
+ padding-left: 2.0em;
+ margin-right: 10%;
+}
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock {
+ padding-left: 2.0em;
+ margin-right: 10%;
+}
+div.verseblock > div.content {
+ white-space: pre;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 2px solid silver;
+}
+
+div.exampleblock > div.content {
+ border-left: 2px solid silver;
+ padding: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+div.imageblock img { border: 1px solid silver; }
+span.image img { border-style: none; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead {
+ font-family: sans-serif;
+ font-weight: bold;
+}
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overriden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+@media print {
+ div#footer-badges { display: none; }
+}
+
+div#toctitle {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+/* Workarounds for IE6's broken and incomplete CSS2. */
+
+div.sidebar-content {
+ background: #ffffee;
+ border: 1px solid silver;
+ padding: 0.5em;
+}
+div.sidebar-title, div.image-title {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ margin-top: 0.0em;
+ margin-bottom: 0.5em;
+}
+
+div.listingblock div.content {
+ border: 1px solid silver;
+ background: #f4f4f4;
+ padding: 0.5em;
+}
+
+div.quoteblock-attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock-content {
+ white-space: pre;
+}
+div.verseblock-attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+
+div.exampleblock-content {
+ border-left: 2px solid silver;
+ padding-left: 0.5em;
+}
+
+/* IE6 sets dynamically generated links as visited. */
+div#toc a:visited { color: blue; }
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+window.onload = function(){generateToc(2)}
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, October 2006. License: GPL */
+
+function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+}
+
+function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+}
+
+function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName)
+ if (mo)
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+}
+
+// This function does the work. toclevels = 1..4.
+function generateToc(toclevels) {
+ var toc = document.getElementById("toc");
+ var entries = tocEntries(document.getElementsByTagName("body")[0], toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "toc" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ document.getElementById("header").removeChild(toc);
+}
+/*]]>*/
+</script>
+</head>
+<body>
+<div id="header">
+<h1>Context Framework</h1>
+<div id="toc">
+ <div id="toctitle">Table of Contents</div>
+ <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
+</div>
+</div>
+<div id="preamble">
+<div class="sectionbody">
+<div class="paragraph"><p>The Context Framework provides a uniform, high level API to numerous
+context properties of the device.</p></div>
+<div class="paragraph"><p>Please follow the links for more details:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="libcontextsubscriber">Documention of the high level API for clients</a>
+</p>
+</li>
+<li>
+<p>
+<a href="context-properties.html">Documentation of context properties</a>
+</p>
+</li>
+<li>
+<p>
+<a href="context-providers.html">Documentation for providers of context properties</a>
+</p>
+</li>
+<li>
+<p>
+<a href="context-arch.html">Architecture description</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div id="footer">
+<div id="footer-text">
+Last updated 2009-06-09 08:20:36 EEST
+</div>
+</div>
+</body>
+</html>
diff --git a/doc/context-providers.html b/doc/context-providers.html
new file mode 100644
index 00000000..2018fe45
--- /dev/null
+++ b/doc/context-providers.html
@@ -0,0 +1,611 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 8.4.4" />
+<title>How to provide context properties</title>
+<style type="text/css">
+/* Debug borders */
+p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
+/*
+ border: 1px solid red;
+*/
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+tt {
+ color: navy;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ font-family: sans-serif;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+
+div.sectionbody {
+ font-family: serif;
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+
+pre {
+ padding: 0;
+ margin: 0;
+}
+
+span#author {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+span#email {
+}
+span#revision {
+ font-family: sans-serif;
+}
+
+div#footer {
+ font-family: sans-serif;
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+div#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+div#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+div#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.5em;
+ margin-bottom: 2.5em;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid silver;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid silver;
+ background: #f4f4f4;
+ padding: 0.5em;
+}
+
+div.quoteblock {
+ padding-left: 2.0em;
+ margin-right: 10%;
+}
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock {
+ padding-left: 2.0em;
+ margin-right: 10%;
+}
+div.verseblock > div.content {
+ white-space: pre;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 2px solid silver;
+}
+
+div.exampleblock > div.content {
+ border-left: 2px solid silver;
+ padding: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+div.imageblock img { border: 1px solid silver; }
+span.image img { border-style: none; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead {
+ font-family: sans-serif;
+ font-weight: bold;
+}
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overriden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+@media print {
+ div#footer-badges { display: none; }
+}
+
+div#toctitle {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+/* Workarounds for IE6's broken and incomplete CSS2. */
+
+div.sidebar-content {
+ background: #ffffee;
+ border: 1px solid silver;
+ padding: 0.5em;
+}
+div.sidebar-title, div.image-title {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ margin-top: 0.0em;
+ margin-bottom: 0.5em;
+}
+
+div.listingblock div.content {
+ border: 1px solid silver;
+ background: #f4f4f4;
+ padding: 0.5em;
+}
+
+div.quoteblock-attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock-content {
+ white-space: pre;
+}
+div.verseblock-attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+
+div.exampleblock-content {
+ border-left: 2px solid silver;
+ padding-left: 0.5em;
+}
+
+/* IE6 sets dynamically generated links as visited. */
+div#toc a:visited { color: blue; }
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+window.onload = function(){generateToc(2)}
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, October 2006. License: GPL */
+
+function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+}
+
+function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+}
+
+function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName)
+ if (mo)
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+}
+
+// This function does the work. toclevels = 1..4.
+function generateToc(toclevels) {
+ var toc = document.getElementById("toc");
+ var entries = tocEntries(document.getElementsByTagName("body")[0], toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "toc" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ document.getElementById("header").removeChild(toc);
+}
+/*]]>*/
+</script>
+</head>
+<body>
+<div id="header">
+<h1>How to provide context properties</h1>
+<div id="toc">
+ <div id="toctitle">Table of Contents</div>
+ <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
+</div>
+</div>
+<div id="preamble">
+<div class="sectionbody">
+<div class="paragraph"><p>Any component can provide its own key/value pairs and make them appear
+as a <tt>ContextProperty</tt> for C++ (and in other forms for other
+languages).</p></div>
+<div class="paragraph"><p>As a provider of context properties, you need to drop one or more
+<em>property declaration</em> files into <tt>/usr/share/contextkit/providers/</tt>
+to register your properties with the context framework. This file
+follows a format described below and is used by <tt>libcontextsubscriber</tt>
+and others to find you when someone subscribes to your properties.
+The file is also used by the Context Commander to show descriptions of
+your properties and to learn about the possible values that a property
+can legally have.</p></div>
+<div class="paragraph"><p>The property declaration files also inform the context framework how
+you want to be contacted. Right now, you have to implement the
+<tt>org.freedesktop.ContextKit</tt> D-Bus interface, and register yourself on
+either the system or the session D-Bus with a suitable bus name. The
+choice of system or session bus and your bus name go into the property
+declaration file.</p></div>
+<div class="paragraph"><p>The only supported way right now to implement the
+<tt>org.freedesktop.ContextKit</tt> interface is to use the
+<a href="libcontextprovider"><tt>libcontextprovider</tt></a> library.</p></div>
+<div class="paragraph"><p>The name of the property declaration file must be
+"<em>bus-name</em><tt>.context</tt>".</p></div>
+</div>
+</div>
+<h2 id="_the_property_declaration_file">The property declaration file</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The property declaration file contains XML and must follow
+<a href="context-provider-schema.html">this XML schema</a>. A simple example
+for the <tt>Example.Random</tt> property looks like this:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><tt>&lt;?xml version="1.0"?&gt;
+&lt;provider bus="session"
+ service="com.example.RandomProvider"&gt;
+ &lt;key name="com.example.Random"&gt;
+ &lt;type&gt;double&lt;/type&gt;
+ &lt;doc&gt;
+ A random number between 0 and 1 that changes every now and then.
+ &lt;/doc&gt;
+ &lt;/key&gt;
+&lt;/provider&gt;</tt></pre>
+</div></div>
+<div class="paragraph"><p>This file declares the single property <tt>com.example.Random</tt> and
+instructs the Content Framework to connect to the
+<tt>com.example.RandomProvider</tt> bus name on the session D-Bus. It would
+be stored as
+<tt>/usr/share/contextkit/providers/com.example.RandomProvider.context</tt></p></div>
+<div class="paragraph"><p>You need to be careful when choosing property name; see the
+"Guidelines for property providers" section for how to avoid
+conflicts.</p></div>
+<div class="paragraph"><p>When providing properties from the <a href="context-properties.html">core
+list</a>, you need to follow additional rules to make sure that your
+property declarations and the centrally maintained core list do not
+fall out of synch. See the "Providing core properties" section for
+more about them.</p></div>
+<div class="paragraph"><p>After installing a property declaration file into a directory <tt>$dir</tt>,
+you should usually execute <tt>update-contextkit-providers</tt>. This will
+update the various caches that clients like the <tt>libcontextsubscriber</tt>
+library use.</p></div>
+<div class="paragraph"><p>But, if a property declaration file is installed via a Debian package,
+you should not call <tt>update-contextkit-providers</tt> in your maintainer
+scripts. Triggers in the relevant packages take care of running
+update-contextkit-providers at the right time and only as often as
+necessary.</p></div>
+<div class="paragraph"><p>The XML element tree in the property declaration file simply consists
+of a list of <tt>key</tt> elements.</p></div>
+<div class="paragraph"><p>A <tt>key</tt> element in the property declaration tree can have a <tt>doc</tt>
+child element. The contents of this element should be plain text
+without any additional markup.</p></div>
+<h3 id="_types">Types</h3><div style="clear:left"></div>
+<div class="paragraph"><p><strong>NOTE:</strong> This is preview of things that might come, or not. For now,
+just use a <tt>type</tt> attribute in your <tt>key</tt> elements with one of
+<tt>"TRUTH"</tt>, <tt>"STRING"</tt>, <tt>"INT"</tt>, or <tt>"DOUBLE"</tt> as the value.</p></div>
+<div class="paragraph"><p>ContextKit uses the experimental <a href="context-types.html">Desktop Type
+System</a>. A property declaration should have a <tt>type</tt> element that
+conforms to the Desktop Type System.</p></div>
+<div class="paragraph"><p>For example, a property that is a enumeration would be declared like
+this:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><tt>&lt;key name="Economy"&gt;
+ &lt;type&gt;
+ &lt;int-enum&gt;
+ &lt;up val="1" doc="Getting better"/&gt;
+ &lt;down val="2" doc="Getting worse"/&gt;
+ &lt;even val="3" doc="Getting boring"/&gt;
+ &lt;/int-enum&gt;
+ &lt;/type&gt;
+ &lt;doc&gt;
+ The current economic trend, as an enumerated value.
+ &lt;/doc&gt;
+&lt;/key&gt;</tt></pre>
+</div></div>
+</div>
+<h2 id="_guidelines_for_property_providers">Guidelines for property providers</h2>
+<div class="sectionbody">
+<h3 id="_names">Names</h3><div style="clear:left"></div>
+<div class="paragraph"><p>Context property names can contain any character except "/".</p></div>
+<div class="paragraph"><p>Only core property names are allowed to start with a capital ASCII
+letter ("A" to "Z").</p></div>
+<div class="paragraph"><p>When defining a new non-core property, you need to choose a unique
+prefix. Start with a reversed fully qualified domainname that you
+control, such as "com.nokia." or "org.gnome.". Then, if the first
+component is "org" and the second component is not a top-level domain,
+drop "org". Then convert the first character of the prefix to
+lower-case if it is one of "A" to "Z".</p></div>
+<div class="paragraph"><p>For example, the GNOME project can use "gnome." as their prefix, KDE
+can use "kde.", and Nokia can use "com.nokia.".</p></div>
+</div>
+<h2 id="_providing_core_properties">Providing core properties</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The Context Framework project maintains a list of <em>core properties</em>.
+These core properties are intended to cover the needs of most
+applications and be meaningful for many different devices.</p></div>
+<div class="paragraph"><p>When you are implementing a provider for some of the core properties,
+you must of course make sure that you follow the specification of that
+property. You can not redefine its type or description in your
+property declaration file, obviously.</p></div>
+<div class="paragraph"><p>Thus, for core properties, you should not include any <tt>type</tt> or <tt>doc</tt>
+elements in your key declarations, just a <tt>name</tt> element. The list of
+core properties is also known to context subcribers at run-time and
+will be used to fill in the missing details.</p></div>
+<div class="paragraph"><p>For example, a property declaration file for core properties could
+look like this:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><tt>&lt;?xml version="1.0"?&gt;
+&lt;provider bus="session"
+ service="com.example.RandomProvider"&gt;
+ &lt;key name="Example.Random"/&gt;
+&lt;/provider&gt;</tt></pre>
+</div></div>
+<div class="paragraph"><p>This just declares that the <tt>Example.Random</tt> property can be
+subscribed to by contacting <tt>com.example.RandomProvider</tt> on the
+session bus. It&#8217;s type and documentation are found elsewhere.</p></div>
+</div>
+<div id="footer">
+<div id="footer-text">
+Last updated 2009-11-26 11:20:27 EEST
+</div>
+</div>
+</body>
+</html>
diff --git a/doc/context-types.html b/doc/context-types.html
new file mode 100644
index 00000000..89352ca0
--- /dev/null
+++ b/doc/context-types.html
@@ -0,0 +1,1138 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 8.4.4" />
+<title>A high-level type system for the Free Desktops</title>
+<style type="text/css">
+/* Debug borders */
+p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
+/*
+ border: 1px solid red;
+*/
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+tt {
+ color: navy;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ font-family: sans-serif;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+
+div.sectionbody {
+ font-family: serif;
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+
+pre {
+ padding: 0;
+ margin: 0;
+}
+
+span#author {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+span#email {
+}
+span#revision {
+ font-family: sans-serif;
+}
+
+div#footer {
+ font-family: sans-serif;
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+div#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+div#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+div#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.5em;
+ margin-bottom: 2.5em;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid silver;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid silver;
+ background: #f4f4f4;
+ padding: 0.5em;
+}
+
+div.quoteblock {
+ padding-left: 2.0em;
+ margin-right: 10%;
+}
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock {
+ padding-left: 2.0em;
+ margin-right: 10%;
+}
+div.verseblock > div.content {
+ white-space: pre;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 2px solid silver;
+}
+
+div.exampleblock > div.content {
+ border-left: 2px solid silver;
+ padding: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+div.imageblock img { border: 1px solid silver; }
+span.image img { border-style: none; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead {
+ font-family: sans-serif;
+ font-weight: bold;
+}
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overriden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+@media print {
+ div#footer-badges { display: none; }
+}
+
+div#toctitle {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+/* Workarounds for IE6's broken and incomplete CSS2. */
+
+div.sidebar-content {
+ background: #ffffee;
+ border: 1px solid silver;
+ padding: 0.5em;
+}
+div.sidebar-title, div.image-title {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ margin-top: 0.0em;
+ margin-bottom: 0.5em;
+}
+
+div.listingblock div.content {
+ border: 1px solid silver;
+ background: #f4f4f4;
+ padding: 0.5em;
+}
+
+div.quoteblock-attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock-content {
+ white-space: pre;
+}
+div.verseblock-attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+
+div.exampleblock-content {
+ border-left: 2px solid silver;
+ padding-left: 0.5em;
+}
+
+/* IE6 sets dynamically generated links as visited. */
+div#toc a:visited { color: blue; }
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+window.onload = function(){generateToc(2)}
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, October 2006. License: GPL */
+
+function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+}
+
+function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+}
+
+function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName)
+ if (mo)
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+}
+
+// This function does the work. toclevels = 1..4.
+function generateToc(toclevels) {
+ var toc = document.getElementById("toc");
+ var entries = tocEntries(document.getElementsByTagName("body")[0], toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "toc" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ document.getElementById("header").removeChild(toc);
+}
+/*]]>*/
+</script>
+</head>
+<body>
+<div id="header">
+<h1>A high-level type system for the Free Desktops</h1>
+<div id="toc">
+ <div id="toctitle">Table of Contents</div>
+ <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
+</div>
+</div>
+<div id="preamble">
+<div class="sectionbody">
+<div class="paragraph"><p>Desktop environments are not just for starting applications anymore.
+Data is flowing freely between well-integrated components, and the
+easier the data flows, the better the integration of the components.</p></div>
+<div class="paragraph"><p>Not all components are written in the same programming language, of
+course, and when letting data flow between them, it needs to be
+represented in many different ways. For example, GConf stores values
+differently than they travel over D-Bus, which is different again from
+how they are passed as GValues to signal handlers, which is different
+from how Perl wants to store it.</p></div>
+<div class="paragraph"><p>The desktop environment is heading towards a cooperative, dynamic
+environment, and it needs a rich and strong type system to tie its
+components together. Sending lines of text over pipes and matching
+them against ad-hoc regular expressions just doesn&#8217;t cut it.</p></div>
+<div class="paragraph"><p>In an attempt to define such a common type system, this document
+collects many different systems for representing values, and unifies
+them by mapping the common dynamic type system into them.</p></div>
+<div class="paragraph"><p>The common type system defined here is rich enough to represent any
+reasonable value; it&#8217;s roughly equivalent to what dynamic languages
+like Perl and Python have.</p></div>
+<div class="paragraph"><p>But it goes one crucial step further: it allows the definition of new
+abstract, intentional types. Intentional types give additional
+information about a value that is not available from the
+representation alone.</p></div>
+<div class="paragraph"><p>For example, a integer can be used to denote a point in time by saying
+that it is the number of seconds since a certain epoch. All places
+that interact with such a value need to agree on this intention.</p></div>
+<div class="paragraph"><p>This agreement can happen informally, via documentation or just plain
+common sense. Nothing wrong with that. It is, however, also helpful
+to formalize this so that documentation can be precise without much
+extra effort, up to a level where the machine itself is able to check
+whether everybody agrees on the intentional types.</p></div>
+<div class="paragraph"><p>The age old battle between static and dynamic types also matters here:
+how much type information should be associated with the values
+themselves? The boundary is exactly between intentional and
+representational types. Intentional types are those that only the
+programmer or compiler know about, representational types are those
+that are only known at run-time.</p></div>
+<div class="paragraph"><p>In a completely statically typed language, we only have raw bytes at
+run-time without any representational type information. All parts of
+the program need to agree that the intention is for those four bytes
+over there to be used as a 32-bit integer. Statically typed programs
+are littered with declarations of intentional types, and language
+processors use them to (more or less) check program consistency and to
+select the right division instruction based on whether the four bytes
+over there are intended to be a signed number or an unsigned one.</p></div>
+<div class="paragraph"><p>In a dynamically typed language, values carry a lot of
+representational type information. Code can easily be polymorphic and
+do different things depending on whether a value is an integer or a
+string. It can also perform consistency checks at run-time, which is
+more robust than doing it at compile time, but doesn&#8217;t go as far since
+intentional types are not available.</p></div>
+<div class="paragraph"><p>Dynamic languages often don&#8217;t have any means to declare intentional
+types for the benefit of the compiler; they only exist in the head of
+the programmer who expresses them by selecting the right operation
+manually. For example, if a string is intended to be a URL, you need
+to use <em>utils.net.web.url.get_scheme (url)</em> explicitly. If the
+intentional type could have been declared in the language, it could
+have selected the right function automatically from just <em>url.scheme()</em>.</p></div>
+<div class="paragraph"><p>Thus, and coming back to the ground now, we define a concrete type
+system here with a rich representational part and a lightweight and
+flexible intentional part.</p></div>
+<div class="paragraph"><p>For the representational part, we define how it is implemented for a
+number of existing value systems. For the intentional part, we define
+how it can be translated into a number of languages, both those with
+static type declaration and those where intent is mainly expressed by
+manually selecting the right operations.</p></div>
+<div class="paragraph"><p>Intentional types are not optional; they are generally needed to make
+sense of values. A programmer learns about them by reading
+documentation; if a debugging tool needs to find out a intentional
+type at run-time, there must be some way to find it.</p></div>
+<div class="paragraph"><p>This means that declaration languages like D-Bus introspection
+facilities and GConf schemas need to be extended to support our
+intentional types. Thus, purely declarative languages like these are
+also included in our list of supported languages.</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><tt>/* Witty example here. */</tt></pre>
+</div></div>
+<div class="paragraph"><p>We also give a list of common intentional types, of course.</p></div>
+<div class="paragraph"><p>This document then has three dimensions of extensibility:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+A new value system can be added by defining how the representational
+ part of the common type system maps to it.
+</p>
+</li>
+<li>
+<p>
+A new language can be added by defining how intentional types are
+ implemented in it, and by implementing all common intentional types.
+</p>
+</li>
+<li>
+<p>
+A new common intentional type can be added by defining it and
+ implementing it in all languages.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>The representational part of the common type system is not supposed to
+change frequently, but adding a new intentional type should be
+considered routine.</p></div>
+<div class="paragraph"><p>The representation part of the common type system is restricted by the
+lowest common denominator of all the value system implementations that
+we want to include. We don&#8217;t want to distort the existing value
+systems too much, and force people to write code that feels unnatural
+for them.</p></div>
+<div class="paragraph"><p>For example, not all value systems can directly represent complex
+numbers or multiple precision integers, but any grown up type system
+should include them. We solve this conflict by relying on the
+intentional types: Instead of grafting complex numbers onto every
+value system, we only define a intentional type for them.</p></div>
+<div class="paragraph"><p>Currently supported value systems: QVariant, D-Bus messages, GValue,
+GConfValue, GVariant, Python values, Perl values, JavaScript values,
+GKeyFile, JSON, YAML, Nepomuk ontologies, SQL, SparQL, Common Lisp
+values.</p></div>
+<div class="paragraph"><p>Currently supported languages: Python, Perl, JavaScript, Java, C#, C<tt>
+with QVariant, plain C</tt>, C with D-Bus/GValue/GConfValue/GVariant,
+plain C, Vala, D-Bus introspection, D-Bus IDL (didl), GConf schema,
+our own XML schema.</p></div>
+</div>
+</div>
+<h2 id="_representational_types">Representational types</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Converting a value from one representation to another is not
+guaranteed to be loss-less: if you convert the value back, it might be
+different and even have a different type. Intentional types are used
+to make sense of the value anyway. [ XXX - so maybe we shouldn&#8217;t
+bother with representational types at all&#8230; ]</p></div>
+<div class="paragraph"><p>Whenever there is a choice of representation in the following table,
+it should be taken to mean: Represent the value with the first
+alternative in the list that is possible, even if that loses
+precision.</p></div>
+<div class="paragraph"><p>For example, a 64 bit signed integer is represented in GConf as a
+"int" if it fits, and as a "double" if not. It will always fit into a
+double, but it might mean chopping off some low bits.</p></div>
+<div class="paragraph"><p>What we are defining then is nothing more than the rules for
+converting values between different representations.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+null
+</p>
+<div class="paragraph"><p>The null value.</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>QVariant: QVariant::Null
+D-Bus: '()'
+GValue: G_TYPE_NONE
+GConf: empty GCONF_VALUE_LIST with type GCONF_VALUE_BOOL
+GVariant: '()'
+Perl: undef
+Python 2: None
+CL: nil</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+bool
+</p>
+<div class="paragraph"><p>A boolean</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>QVariant: QVariant::Bool
+D-Bus: 'b'
+GValue: G_TYPE_BOOLEAN
+GConf: GCONF_VALUE_BOOL
+GVariant: 'b'
+Perl: number, 0 or 1.
+Python 2: number, 0 or 1.
+CL: nil or t</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+int32
+</p>
+<div class="paragraph"><p>Signed 32 bit integer</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>QVariant: QVariant::Int
+D-Bus: 'i'
+GValue: G_TYPE_INT
+GConf: GCONF_VALUE_INT
+GVariant: 'i'
+Perl: number
+Python 2: int
+CL: number</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+int64
+</p>
+<div class="paragraph"><p>Signed 64 bit integer</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>QVariant: QVariant::LongLong
+D-Bus: 'x'
+GValue: G_TYPE_INT64
+GConf: GCONF_VALUE_INT or GCONF_VALUE_DOUBLE
+GVariant: 'x'
+Perl: number
+Python 2: int or long
+CL: number</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+uint32
+</p>
+<div class="paragraph"><p>Unsigned 32 bit integer</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>QVariant: QVariant::UInt
+D-Bus: 'u'
+GValue: G_TYPE_UINT
+GConf: GCONF_VALUE_INT or GCONF_VALUE_DOUBLE
+GVariant: 'u'
+Perl: number
+Python 2: int or long
+CL: number</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+uint64
+</p>
+<div class="paragraph"><p>Unsigned 64 bit integer</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>QVariant: QVariant::ULongLong
+D-Bus: 't'
+GValue: G_TYPE_UINT64
+GConf: GCONF_VALUE_INT or GCONF_VALUE_DOUBLE
+GVariant: 't'
+Perl: number
+Python 2: int or long
+CL: number</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+double
+</p>
+<div class="paragraph"><p>Double precision floating point number</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>QVariant: QVariant::Double
+D-Bus: 'd'
+GValue: G_TYPE_DOUBLE
+GConf: GCONF_VALUE_DOUBLE
+GVariant: 'd'
+Perl: number
+Python 2: double
+CL: number</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+string
+</p>
+<div class="paragraph"><p>String of Unicode code points</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>QVariant: QVariant::QString
+D-Bus: 's'
+GValue: G_TYPE_STRING
+GConf: GCONF_VALUE_STRING, UTF-8.
+GVariant: 's'
+Perl: string
+Python 2: unicode
+CL: string</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+list
+</p>
+<div class="paragraph"><p>List of values</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>QVariant: QVariant::List
+D-Bus: 'av'
+GValue: G_TYPE_POINTER pointing to a GSList of GValues.
+ (XXX - find something better, must be somewhere.)
+GConf: GCONF_VALUE_LIST or chained GCONF_VALUE_PAIRs
+GVariant: 'av'
+Perl: array
+Python 2: list
+CL: list</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+map
+</p>
+<div class="paragraph"><p>Mapping from strings to values, with no duplicated keys.</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>QVariant: QVariant::Map
+D-Bus: 'a{sv}'
+GValue: G_TYPE_HASH_TABLE (?)
+GConf: Chain of GCONF_VALUE_PAIRs,
+ with the cars being a pair of GCONF_VALUE_STRING and an
+ arbitrary value.
+GVariant: 'a{sv}'
+Perl: hash
+Python: dict
+CL: alist</tt></pre>
+</div></div>
+</li>
+</ul></div>
+</div>
+<h2 id="_association_trees">Association trees</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>A map (or dictionary, or hashtable) is a useful data structure, and by
+nesting them you can express a lot of interesting things. Two things
+are missing however: maps do not preserve the order of their entries,
+and they don&#8217;t allow duplicate keys. These two things are often
+necessary.</p></div>
+<div class="paragraph"><p>So, we like to use lists insteads of maps and define a couple of
+conventions how to express associations between things with them. The
+resulting values are called "association trees".</p></div>
+<div class="paragraph"><p>An association tree always has a name (which is always a string), and
+has either a single value, or a list of subordinate association trees.</p></div>
+<div class="paragraph"><p>An association tree is represented as a list. The first element is
+the name. If the association tree is of the first form, then the list
+always has a second element, which is the value. In the second form,
+the remaining elements of the list after the name are the subordinate
+association trees.</p></div>
+<div class="paragraph"><p>A couple of example will hopefully show that this is all very simple:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The first form, essentially a key/value pair:
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>[ 'foo', 12 ]</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+The second form, with two sub-trees:
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>[ 'foo', [ 'bar', 42 ], [ 'baz', 'quux' ]]</tt></pre>
+</div></div>
+</li>
+</ul></div>
+<div class="paragraph"><p>The second example can be interpreted as mapping the "key path"
+foo/bar to 12, and the path foo/baz to <em>quux</em>.</p></div>
+<div class="paragraph"><p>As you can see, the two forms of a assocation tree can not be reliably
+distinguished from each other just by looking at them. This tree</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>[ 'foo', [ 'bar', 12 ]]</tt></pre>
+</div></div>
+<div class="paragraph"><p>can be interpreted both as mapping foo to the value [ <em>bar</em>, 12 ], and
+as mapping foo/bar to 12. You have to know what is intended and use
+the right interpretation.</p></div>
+<div class="paragraph"><p>As a special case, a association tree with an empty list of sub-trees
+can be expressed just with a string, which is the name of the tree.
+Thus, the following two lines are equivalent:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>[ 'foo ' ]
+'foo'</tt></pre>
+</div></div>
+<div class="paragraph"><p>Language bindings for association trees usually offer the following
+operations:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>name (tree): returns the name of the tree (which is either the first
+ element of tree if it is a list, or tree itself if
+ it isn't)</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>value (tree): returns the value of the tree (which is the second
+ element of tree, which must be a list)</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>node (tree, name): returns the first sub-tree with the given name of tree.</tt></pre>
+</div></div>
+<div class="paragraph"><p>Usually, convenience functions are provided as well that make
+accessing values and nodes at the end of a key path less verbose:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>value (tree, name1) == value (node (tree, name1))
+value (tree, name1, name2) == value (node (node (tree, name1), name2))
+..etc..</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>node (tree, name1, name2) == node (node (tree, name1), name2))
+..etc..</tt></pre>
+</div></div>
+<div class="paragraph"><p>Of course, association trees are one of the pre-defined intentional
+types.</p></div>
+<div class="paragraph"><p>Association trees are very useful. This Desktop Types system uses
+them for type definitions, for example, and also for type references.</p></div>
+</div>
+<h2 id="_a_nano_dom">A Nano-DOM</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Association trees (see above) can be used to represent a subset of
+XML. This is useful when the small subset suffices but you still want
+to be enterprise ready. Intentional type definitions use this subset,
+for example, and are thus easily handled at run-time.</p></div>
+<div class="paragraph"><p>Association trees tht are used to represent XML are called Nano-DOM
+here, since they can fulfill the role of a document object model.</p></div>
+<div class="paragraph"><p>Converting a piece of XML into its Nano-DOM representation proceeds
+according to simple rules:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+First, all attributes of elements are converted to child elements,
+ in order and at the beginning. Thus, the following XML fragments
+ are equivalent:
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>&lt;bar size="12"&gt;...&lt;/bar&gt;</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>&lt;bar&gt;&lt;size&gt;12&lt;/size&gt;...&lt;/bar&gt;</tt></pre>
+</div></div>
+</li>
+<li>
+<p>
+Then, text is turned into strings, and elements are turned into
+ association trees with the name of the tree being the name of the
+ element, and the remaining elements of the association tree list
+ being the children of the element. For example, this XML
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>&lt;foo&gt;hello&lt;/foo&gt;</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>would be turned into this Python value</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>['foo', 'hello']</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>When creating the strings for text, surrounding whitespace is
+removed.</tt></pre>
+</div></div>
+</li>
+</ul></div>
+<div class="paragraph"><p>More examples:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>&lt;key name="Example.Random"
+ type="string"&gt;
+ &lt;doc&gt;
+ A random property.
+ &lt;/doc&gt;
+&lt;/key&gt;</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>=&gt;</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>['key',
+ ['name', 'Example.Random' ],
+ ['type', 'string' ],
+ ['doc', 'A random property.']
+]</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>&lt;key name="Example.Random"&gt;
+ &lt;type&gt;
+ &lt;list type="number"/&gt;
+ &lt;/type&gt;
+&lt;/key&gt;</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>=&gt;</tt></pre>
+</div></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>['key',
+ ['name', 'Example.Random' ],
+ ['type',
+ ['list', ['type', 'number' ] ]
+ ]
+]</tt></pre>
+</div></div>
+<div class="paragraph"><p>You can think of the Nano-DOM representation as a simple abstract
+syntax tree for XML.</p></div>
+</div>
+<h2 id="_intentional_types">Intentional types</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The most important part by far of a intentional type definition is its
+documentation. The documentation is the thing that explains the
+intent to programmers, so that they can <em>reify</em> the abstract
+intentional type into concrete code. For example, by reading the
+documentation, they know how to write a C++ class for the intentional
+type and add useful methods to it, or how to write a UI widget that
+allows displaying and maybe high-level editing of values of that type.</p></div>
+<div class="paragraph"><p>Intentional types are <em>not</em> a static type system. They are only a
+tool for cross-referencing documentation. Sometimes, intentional
+types are mapped into a static type system and the compiler will then
+perform some additonal checks at compile time, and the code using the
+types might look more natural, but that is not the main goal of the
+intentional types.</p></div>
+<div class="paragraph"><p>In essence, intentional types use English as the <em>formal</em> language to
+express their definitions. Their documentation should basically be a
+description of the set of values that are permissible for this type
+(by referring to other already defined intentional types or the
+representational types from above), and what they mean. For example,
+the "calendar-time" type could say that only "uint64" values are
+allowed, and that they are the number of nano-seconds since midnight
+January 1, UTC.</p></div>
+<div class="paragraph"><p>Another example are enumerations: the documentation of
+"compass-direction" can say that the value is one of the four "int32"
+values 0, 90, 180, 270 where 0 means North, 90 means East, etc.</p></div>
+<div class="paragraph"><p>As shown in the examples, intentional types have names, so that you
+can refer to them in the documentation of other types and in other
+places that refer to intentional types, such as in D-Bus introspection
+declarations.</p></div>
+<div class="paragraph"><p>When other people refer to your type, they can provide a set of
+parameters to specialize it. You should document which parameters are
+meaningful and what they do, of course. You should also formally
+declare which paramaters are valid. (See below for concrete
+examples).</p></div>
+<div class="paragraph"><p>Type parameters allow us to define a small set of fundamental and
+general types, which can be instantiated to create a wide range of
+useful types. For example, there is a generic "int-enum" type that
+can be turned into a specific enumeration via its parameters. A
+single UI widget could be written for "int-enum" that is then
+(automatically) parameterized at run-time with the concrete set of
+choices. The "int-enum" type is defined so that its parameters
+include the text to use for each enumeration choice, and the UI widget
+will get access to these parameters at run-time.</p></div>
+<div class="paragraph"><p>A intentional type definition can specify a "base" type for itself, by
+referring to another intentional type. This base can be used to make
+the documentation a bit more formal, and of course to provide
+parameters for the base type. For example, the documentation for the
+"compass-direction" type would not need to explicitly say that the
+numbers are "int32"s; it would just declare its base to be "int32".
+Even better, it sould say that it&#8217;s actually a "int-enum" and specify
+the concrete values.</p></div>
+<div class="paragraph"><p>To recap: when referring to a type, you need to specify its name and
+you can optionally specify values for some or all of its parameters.
+Such a type reference is expressed as a association tree: the name of
+the tree gives the name of the referenced type, and the sub-trees give
+values for parameters. Of course, the name of such a sub-tree names
+the parameter, and the value of the sub-tree usually gives the value
+of that parameter.</p></div>
+<div class="paragraph"><p>Formally, however, it is up to the type definiton to say how a
+association tree that refers to it is being interpreted. The
+"string-enum" type, for example, does not define any parameters for
+itself; instead, it specifies that the sub-trees in a reference to it
+should be interpreted as naming the possible enumeration choices. (If
+that sounds too obscure, just ignore it for now. It will become
+clear.)</p></div>
+<div class="paragraph"><p>Type references are written in XML by following the Nano-DOM rules, of
+course.</p></div>
+<div class="paragraph"><p>A type definition is also expressed as an association tree. The name
+of such a tree is always the string "type", to identify it as a type
+definition. The following key paths can be used in a type definition:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+type/name (string)
+ The symbolic name of the type. Don&#8217;t use too fancy characters here.
+</p>
+</li>
+<li>
+<p>
+type/doc (string)
+ The documentation for the type.
+</p>
+</li>
+<li>
+<p>
+type/base (type)
+ The base type for this type. All values that are valid for this
+ type are valid for the base type, and if a piece of code does not
+ understand this type, it is allowed to use the base type instead.
+</p>
+</li>
+<li>
+<p>
+type/parms (node)
+ The parameters of this type, one per sub-tree of this node. If you
+ want to specify special rules for interpreting association trees
+ that refer to this type, just omit the type/parms node in the
+ definition.
+</p>
+</li>
+<li>
+<p>
+type/parms/&lt;p&gt;/doc (string)
+ The documentation for parameter &lt;p&gt;.
+</p>
+</li>
+<li>
+<p>
+type/parms/&lt;p&gt;/type (type)
+ The type for parameter &lt;p&gt;.
+ XXX - this doesn&#8217;t really work since XML can only express association trees.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>As an example, consider a hypothetical XML schema for describing
+key-value pairs. Let&#8217;s also assume that this schema follows our
+Nano-DOM rules. It has a "key" element which needs name, doc and type
+attributes. The "type" attribute should refer to an intentional type
+of course. We can describe a key for the current temperature,
+expressed as one of "low", "medium", "high", in the following ways.</p></div>
+<div class="paragraph"><p>First, we can refer to the predefined "three-level-enum" type, if
+there would be such a type. Documentation of the possible values is
+left to the definition of "three-level-enum", which presumably would
+tell us that they are the strings "low", "medium", and "high".</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>&lt;key&gt;
+ &lt;name&gt;Temperature&lt;/name&gt;
+ &lt;doc&gt;The current temperature.&lt;/doc&gt;
+ &lt;type&gt;three-level-enum&lt;/type&gt;
+&lt;key&gt;</tt></pre>
+</div></div>
+<div class="paragraph"><p>Using the Nano-DOM rules, this can be shortened to:</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>&lt;key name="Temperature"
+ doc="The current temperature"
+ type="three-level-enum"/&gt;</tt></pre>
+</div></div>
+<div class="paragraph"><p>Instead of referring to the pre-defined "three-level-enum" type, we
+can instantiate a "string-enum" explicitly, which is one of the
+pre-defined generic types.</p></div>
+<div class="literalblock">
+<div class="content">
+<pre><tt>&lt;key name="Temperature"
+ doc="The current temperature"&gt;
+ &lt;type&gt;
+ &lt;string-enum&gt;
+ &lt;low doc="Brrrr"/&gt;
+ &lt;medium doc="Comfy."/&gt;
+ &lt;high doc="Siesta!"/&gt;
+ &lt;/string-enum&gt;
+ &lt;/type&gt;
+&lt;/key&gt;</tt></pre>
+</div></div>
+<div class="paragraph"><p>The common intentional types are defined <a href="core-types.html">here</a>.</p></div>
+</div>
+<div id="footer">
+<div id="footer-text">
+Last updated 2009-11-26 11:20:27 EEST
+</div>
+</div>
+</body>
+</html>
diff --git a/doc/use-cases.html b/doc/use-cases.html
new file mode 100644
index 00000000..a876d16f
--- /dev/null
+++ b/doc/use-cases.html
@@ -0,0 +1,1183 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 8.4.4" />
+<title>ContextKit Use Cases</title>
+<style type="text/css">
+/* Debug borders */
+p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
+/*
+ border: 1px solid red;
+*/
+}
+
+body {
+ margin: 1em 5% 1em 5%;
+}
+
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
+
+em {
+ font-style: italic;
+ color: navy;
+}
+
+strong {
+ font-weight: bold;
+ color: #083194;
+}
+
+tt {
+ color: navy;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ color: #527bbd;
+ font-family: sans-serif;
+ margin-top: 1.2em;
+ margin-bottom: 0.5em;
+ line-height: 1.3;
+}
+
+h1, h2, h3 {
+ border-bottom: 2px solid silver;
+}
+h2 {
+ padding-top: 0.5em;
+}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
+
+div.sectionbody {
+ font-family: serif;
+ margin-left: 0;
+}
+
+hr {
+ border: 1px solid silver;
+}
+
+p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+ margin-top: 0;
+}
+
+pre {
+ padding: 0;
+ margin: 0;
+}
+
+span#author {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+span#email {
+}
+span#revision {
+ font-family: sans-serif;
+}
+
+div#footer {
+ font-family: sans-serif;
+ font-size: small;
+ border-top: 2px solid silver;
+ padding-top: 0.5em;
+ margin-top: 4.0em;
+}
+div#footer-text {
+ float: left;
+ padding-bottom: 0.5em;
+}
+div#footer-badges {
+ float: right;
+ padding-bottom: 0.5em;
+}
+
+div#preamble {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+div.admonitionblock {
+ margin-top: 2.5em;
+ margin-bottom: 2.5em;
+}
+
+div.content { /* Block element content. */
+ padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ text-align: left;
+ margin-top: 1.0em;
+ margin-bottom: 0.5em;
+}
+div.title + * {
+ margin-top: 0;
+}
+
+td div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content div.title:first-child {
+ margin-top: 0.0em;
+}
+div.content + div.title {
+ margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+ background: #ffffee;
+ border: 1px solid silver;
+ padding: 0.5em;
+}
+
+div.listingblock > div.content {
+ border: 1px solid silver;
+ background: #f4f4f4;
+ padding: 0.5em;
+}
+
+div.quoteblock {
+ padding-left: 2.0em;
+ margin-right: 10%;
+}
+div.quoteblock > div.attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock {
+ padding-left: 2.0em;
+ margin-right: 10%;
+}
+div.verseblock > div.content {
+ white-space: pre;
+}
+div.verseblock > div.attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+ text-align: left;
+}
+
+div.admonitionblock .icon {
+ vertical-align: top;
+ font-size: 1.1em;
+ font-weight: bold;
+ text-decoration: underline;
+ color: #527bbd;
+ padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+ padding-left: 0.5em;
+ border-left: 2px solid silver;
+}
+
+div.exampleblock > div.content {
+ border-left: 2px solid silver;
+ padding: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+div.imageblock img { border: 1px solid silver; }
+span.image img { border-style: none; }
+
+dl {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+dt {
+ margin-top: 0.5em;
+ margin-bottom: 0;
+ font-style: normal;
+ color: navy;
+}
+dd > *:first-child {
+ margin-top: 0.1em;
+}
+
+ul, ol {
+ list-style-position: outside;
+}
+ol.arabic {
+ list-style-type: decimal;
+}
+ol.loweralpha {
+ list-style-type: lower-alpha;
+}
+ol.upperalpha {
+ list-style-type: upper-alpha;
+}
+ol.lowerroman {
+ list-style-type: lower-roman;
+}
+ol.upperroman {
+ list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+ margin-top: 0.1em;
+ margin-bottom: 0.1em;
+}
+
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead {
+ font-family: sans-serif;
+ font-weight: bold;
+}
+tfoot {
+ font-weight: bold;
+}
+td > div.verse {
+ white-space: pre;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overriden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+ border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
+}
+
+
+div.hdlist {
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+}
+div.hdlist tr {
+ padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+ font-weight: bold;
+}
+td.hdlist1 {
+ vertical-align: top;
+ font-style: normal;
+ padding-right: 0.8em;
+ color: navy;
+}
+td.hdlist2 {
+ vertical-align: top;
+}
+div.hdlist.compact tr {
+ margin: 0;
+ padding-bottom: 0;
+}
+
+.comment {
+ background: yellow;
+}
+
+@media print {
+ div#footer-badges { display: none; }
+}
+
+div#toctitle {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+/* Workarounds for IE6's broken and incomplete CSS2. */
+
+div.sidebar-content {
+ background: #ffffee;
+ border: 1px solid silver;
+ padding: 0.5em;
+}
+div.sidebar-title, div.image-title {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-weight: bold;
+ margin-top: 0.0em;
+ margin-bottom: 0.5em;
+}
+
+div.listingblock div.content {
+ border: 1px solid silver;
+ background: #f4f4f4;
+ padding: 0.5em;
+}
+
+div.quoteblock-attribution {
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+div.verseblock-content {
+ white-space: pre;
+}
+div.verseblock-attribution {
+ padding-top: 0.75em;
+ text-align: left;
+}
+
+div.exampleblock-content {
+ border-left: 2px solid silver;
+ padding-left: 0.5em;
+}
+
+/* IE6 sets dynamically generated links as visited. */
+div#toc a:visited { color: blue; }
+</style>
+<script type="text/javascript">
+/*<![CDATA[*/
+window.onload = function(){generateToc(2)}
+/* Author: Mihai Bazon, September 2002
+ * http://students.infoiasi.ro/~mishoo
+ *
+ * Table Of Content generator
+ * Version: 0.4
+ *
+ * Feel free to use this script under the terms of the GNU General Public
+ * License, as long as you do not remove or alter this notice.
+ */
+
+ /* modified by Troy D. Hanson, September 2006. License: GPL */
+ /* modified by Stuart Rackham, October 2006. License: GPL */
+
+function getText(el) {
+ var text = "";
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
+ text += i.data;
+ else if (i.firstChild != null)
+ text += getText(i);
+ }
+ return text;
+}
+
+function TocEntry(el, text, toclevel) {
+ this.element = el;
+ this.text = text;
+ this.toclevel = toclevel;
+}
+
+function tocEntries(el, toclevels) {
+ var result = new Array;
+ var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ // Function that scans the DOM tree for header elements (the DOM2
+ // nodeIterator API would be a better technique but not supported by all
+ // browsers).
+ var iterate = function (el) {
+ for (var i = el.firstChild; i != null; i = i.nextSibling) {
+ if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
+ var mo = re.exec(i.tagName)
+ if (mo)
+ result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
+ iterate(i);
+ }
+ }
+ }
+ iterate(el);
+ return result;
+}
+
+// This function does the work. toclevels = 1..4.
+function generateToc(toclevels) {
+ var toc = document.getElementById("toc");
+ var entries = tocEntries(document.getElementsByTagName("body")[0], toclevels);
+ for (var i = 0; i < entries.length; ++i) {
+ var entry = entries[i];
+ if (entry.element.id == "")
+ entry.element.id = "toc" + i;
+ var a = document.createElement("a");
+ a.href = "#" + entry.element.id;
+ a.appendChild(document.createTextNode(entry.text));
+ var div = document.createElement("div");
+ div.appendChild(a);
+ div.className = "toclevel" + entry.toclevel;
+ toc.appendChild(div);
+ }
+ if (entries.length == 0)
+ document.getElementById("header").removeChild(toc);
+}
+/*]]>*/
+</script>
+</head>
+<body>
+<div id="header">
+<h1>ContextKit Use Cases</h1>
+<div id="toc">
+ <div id="toctitle">Table of Contents</div>
+ <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
+</div>
+</div>
+<h2 id="_must_have">Must Have</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+3
+</dt>
+<dd>
+<p>
+Visualizing the situation - Connected/Disconnected. The menu items
+will have different visuals when offline if they require a connection
+to function optimally e.g. Email and online browsing. This should be
+integrated with the appearance of the home screen and within
+applications. (Homecreen, Menu, Connectivity)
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>Connectivity.HasInternet</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+5
+</dt>
+<dd>
+<p>
+Automatic theme change e.g. time / location based themes
+(fun/entertainment). During working hours the theme indicates the user
+is at work, the time and location. The theme can change when work
+hours are typically finished or according to a calendar. When a
+workday is over or it is the weekend the theme could have a different
+feel.
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>State.Situation</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+10
+</dt>
+<dd>
+<p>
+Create reminder to show the note (e.g. shopping list) next time
+visiting local store, create reminder to buy or do X when entering
+store / shopping mall / specific location and time.
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>Location.PointOfInterest</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+11
+</dt>
+<dd>
+<p>
+Device informs me of timezone differences that may affect my
+communications: e.g. calling a contact in LA when in Finland a query
+is shown "it&#8217;s 3am in LA - are you sure you wish to make the call?"
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>Location.TimezoneOffset</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+14
+</dt>
+<dd>
+<p>
+If user is running and playlist ends then player will repeat the
+playlist rather than stop and require user action to reselect. There
+could be a visual to show the user the playlist is on repeat so they
+know what has happened when they stop.
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>State.Situation == Running</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+15
+</dt>
+<dd>
+<p>
+View meeting location from Calendar meeting invitation, possibility
+to navigate to location from current position
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>(maps people)</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+16
+</dt>
+<dd>
+<p>
+Device offers a city guide or map if in a new location (after
+checking that the local guide/map does not exist). User can choose to
+purchase and use.
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>Location.City etc</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+18
+</dt>
+<dd>
+<p>
+Text-to-speech preview of messages (make "listen" option visible),
+learn if user always wants to hear messages in the car or not
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>State.Situation == InCar (no learning)</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+19
+</dt>
+<dd>
+<p>
+The device becomes aware of the fact, that it is in an office
+environment and assumes a special “profile”, with e.g. discreet
+alarms, homescreen, theme
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>State.Situation == InOffice</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+20
+</dt>
+<dd>
+<p>
+Get location and orientation data when using the device camera. For
+example, this data can be used to created automatic metadata and tags
+to photos and videos when combined with reverse geocoding online
+service or utilized to show nearby POIs and tappable links to them to
+see more info from web/Maps application when watching through the
+camera viewfinder (GPS+accelerometer+magnetometer)
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>Map context into content ontology.</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+21
+</dt>
+<dd>
+<p>
+Automatically disable media online services and RSS feed updates
+when user is roaming or no free Wi-Fi connection available based on
+user preferences/settings
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>Connectivity.HasInternet
+Connectivity.InternetIsFlatRate</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+22
+</dt>
+<dd>
+<p>
+When user is moving enlarge some of the buttons, so that it is
+easier to press those in all media applications
+(GPS+accelerometer). Adjusting the maps interface and/or available
+tools based on user&#8217;s current activity or mode of traveling (walking,
+driving, etc.)
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>State.Situation</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+29
+</dt>
+<dd>
+<p>
+Highlighted in the soup content and in contacts. Also related
+content can be highlighted in different applications (e.g. browsing
+photos, Jack comes near, all Jack’s pictures are highlighted)
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>Environment.NearbyContacts
+Environment.ConnectedContacts</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+30
+</dt>
+<dd>
+<p>
+Displays relevant content useful for the user - traffic report
+widget in car and during commute time - transit (bus/train schedule,
+stops) information before and during commute time.
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>State.Situation == Commuting</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+32
+</dt>
+<dd>
+<p>
+Connecting to best available connection. If Wlan is available and
+reliable the the device will connect through this. When it is not
+available the device will connect through the next best connect
+possibility. There may be settings for the device to behave
+differently on different connection types.
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>State.Situation, but mostly connectivity people</tt></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
+41
+</dt>
+<dd>
+<p>
+Screen brightness increases/decreases depending on the
+environment. For example; driving car at night time, screen is not
+100% bright to save your eyes and not blind you.
+</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>Hmmm.</tt></pre>
+</div></div>
+</dd>
+</dl></div>
+</div>
+<h2 id="_should_have">Should Have</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+4
+</dt>
+<dd>
+<p>
+Most used applications, links, data (device learns usage
+frequency) appear on the home screen. Or the user can be prompted when
+accessing most used apps whether apps should be added to home screen
+for easy access. Unused apps on the home screen can fade away if not
+used e.g. in a few months? (Except when S&amp;S service priority?)
+</p>
+<div class="paragraph"><p>Dynamic widgets on the Home screen based on context e.g. if user
+checks weather.com everyday via browser offer to add permanent weather
+widget to home screen.</p></div>
+</dd>
+<dt class="hdlist1">
+9
+</dt>
+<dd>
+<p>
+Create reminder about telling a friend something e.g. when meeting
+him/her the next time (bluetooth/wlan proximity) or when calling next
+time. E.g. see a picture of daughter in Gallery &#8658; place reminder to
+book a dentist to her in the next "booking slot". This could also work
+with specific and related files being presented when in a meeting.
+</p>
+</dd>
+<dt class="hdlist1">
+12
+</dt>
+<dd>
+<p>
+The device suggests volume increases in noisy environments. This
+may relate to ringing tone, music playback, movies etc. The volume
+increases in noisy environments and back to the original setting when
+the surrounding alters. The device learns the user patterns e.g. if
+the user regularly overrules suggested adjustments then after a while
+it is switched off.
+</p>
+</dd>
+<dt class="hdlist1">
+17
+</dt>
+<dd>
+<p>
+Reduce WLAN energy consumption by optimizing
+activity. Automatically turn on / increase frequency of WLAN search
+when there is likely to be a hotspot nearby - turn scanning
+off/decrease frequency when it is unlikely (learning user&#8217;s
+environments and schedule) - user does not have to manually
+activate/disable WLAN search.
+</p>
+</dd>
+<dt class="hdlist1">
+23
+</dt>
+<dd>
+<p>
+Settings: The device learns what the most often used setting items
+are by the user, and always shows those most often used Setting items
+out of the category /or show them on the top of the list.
+</p>
+</dd>
+<dt class="hdlist1">
+26
+</dt>
+<dd>
+<p>
+User is navigating from A to B, in search items "along the route"
+are emphasized (if not navigating, items "close to current location"
+are more important)
+</p>
+</dd>
+<dt class="hdlist1">
+27
+</dt>
+<dd>
+<p>
+User has indicated that he has to be in certain location at certain
+time (e.g. calendar event, setting a "target location" in maps), alarm
+when it&#8217;s time to leave (based on distance and optionally also traffic
+conditions, mode of traveling, etc.)
+</p>
+</dd>
+<dt class="hdlist1">
+28
+</dt>
+<dd>
+<p>
+Some context-based recommendations, suggestions, etc. showed
+occasionally on the map (needs to be tested with the user if they like
+this..)
+</p>
+</dd>
+<dt class="hdlist1">
+34
+</dt>
+<dd>
+<p>
+When device is on a desk or other hard surface the vibra is not
+used for alerting, just the nice ring tone I&#8217;ve selected
+</p>
+</dd>
+<dt class="hdlist1">
+35
+</dt>
+<dd>
+<p>
+When the device is pulled from pocket/bag turn the background light
+on and show the now playing song/FM radio channel/Internet radio
+channel information on the screen automatically instead of tapping the
+screen or opening the screen lock (ambient light sensor)
+</p>
+</dd>
+<dt class="hdlist1">
+38
+</dt>
+<dd>
+<p>
+When the device is in pocket, the sensitive level of touch screen
+could be lifted to allow small set of gestures even if the device is
+in the pocket (gestures through fabric)
+</p>
+</dd>
+<dt class="hdlist1">
+40
+</dt>
+<dd>
+<p>
+When device is steadily on table and music is playing, the now
+playing view could start showing the song &amp; artist names in large font
+sizes (easy to read even from long distance)
+</p>
+</dd>
+<dt class="hdlist1">
+42
+</dt>
+<dd>
+<p>
+Unplugging headset pauses the music
+</p>
+</dd>
+</dl></div>
+</div>
+<h2 id="_nice_to_have">Nice to Have</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+7
+</dt>
+<dd>
+<p>
+Phone learns from the users behavior, e.g. a user calls home when
+leaving the office every weekday. The device adapts to this and
+provides easy and quick way to perform the task, the user may not be
+aware as the application will be launched in the background. This may
+be in the ‘soup’…the user can look into the future. They can see
+calendar events, and possibilities relating to their usage
+patterns…user can flick the item away if it is not right.
+</p>
+</dd>
+<dt class="hdlist1">
+8
+</dt>
+<dd>
+<p>
+Meeting application: When in the meeting, business cards (with
+photos) are automatically exchanged and visualized in the UI so that
+they help the user to connect names with faces with sitting
+order. This also means contact details can be exchanged.
+</p>
+</dd>
+<dt class="hdlist1">
+24
+</dt>
+<dd>
+<p>
+Application manager: Building In-device recommendation system: The
+devices learns the user’s preferences of applications (by
+analyzing/counting the usage of applications), the recommend the new
+applications to the user to download and install.
+</p>
+</dd>
+<dt class="hdlist1">
+25
+</dt>
+<dd>
+<p>
+Personalization: The device learns the user’s personalization
+preferences (the device could learn this if the user transferring some
+personalization data from the old phone on the first time using the
+new device), and set automatically some personalization settings for
+the user (e.g. Ringing tone, background color, etc.)
+</p>
+</dd>
+<dt class="hdlist1">
+31
+</dt>
+<dd>
+<p>
+The device is set to behave differently in certain modes. For
+example when you are driving you do not want to access your email and
+text messages so automatic messages are broadcasted to any contacts
+letting them know you are driving and will get back them when you are
+done&#8230;and possible provide more information.
+</p>
+</dd>
+<dt class="hdlist1">
+33
+</dt>
+<dd>
+<p>
+Shouting “where are you” to the handbag, device turns the lights on
+(easier to find)
+</p>
+</dd>
+<dt class="hdlist1">
+36
+</dt>
+<dd>
+<p>
+Shake device to play/show random media item
+</p>
+</dd>
+<dt class="hdlist1">
+37
+</dt>
+<dd>
+<p>
+When jogging/walking detect the pace and UI could propose songs
+that would fit to the pace
+</p>
+</dd>
+<dt class="hdlist1">
+39
+</dt>
+<dd>
+<p>
+Turn device to jump to next media item + turn to another direction
+to jump to previous media item (same with left/right swipes on touch
+screen)
+</p>
+</dd>
+</dl></div>
+</div>
+<h2 id="_to_be_prioritized">To be prioritized</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+6
+</dt>
+<dd>
+<p>
+Automatic connections and downloading content. The device
+automatically pulls relevant content, alerts, feed updates, people etc
+when it is connected (this may be set to a specific type of
+connection). The user can review this updated content when they have
+time. There could be a visual feature to show the user what content is
+new/updated. The user may need the ability to teach the device what
+they want to see and when. The device can also learn what the user
+looks at and their usage patterns. This may inform content management
+and filtering information.
+</p>
+</dd>
+<dt class="hdlist1">
+13
+</dt>
+<dd>
+<p>
+If there are new albums available from my favorite artists my
+device has already gone and got if for me. I can do preview when
+convenient and then purchase the album if I want. The device suggests
+what I will like based on my usage patterns and links with relevant
+networks and friends. Content could be a playlist entitled "new music
+to try" or somehow be highlighted when appropriate e.g. when listening
+to music which connects in some way to what you&#8217;re listening to at the
+time e.g. same artist. But as said before it bubbles to the surface,
+or catches you eye in some way, NOT with a pop-up looking for a yes/no
+response. Over time if you don’t play it, it would auto delete. Once
+it catches your eye it would then preview it, then if you want to keep
+it you do one click buy, no further download required, no waiting?
+(just download), just spontaneous enjoyment. Trick we learnt through a
+study is not to start 2nd guessing too soon as it takes time to learn
+and gain trust, on both sides of the relationship.
+</p>
+</dd>
+<dt class="hdlist1">
+43
+</dt>
+<dd>
+<p>
+Weather and Location: Kate is now in Paris. She plans a bit about
+what she wants to do in Paris but she would like more suggestions. She
+checks her mobileand gets some suggestion about where she can go
+today. The mobile suggests that she’d better go to the Louvre museum
+rather than Eiffel tower today because it will be windy and cloudy.
+</p>
+</dd>
+<dt class="hdlist1">
+44
+</dt>
+<dd>
+<p>
+Weather, location and speed: Michi is in Espoo and needs to go to
+Stockmann to meet his wife. He wants to buy some presents for his
+friends. He drives his car to the city center and worries about the
+heavy traffic jam. He put his mobile on the car dock to check a
+possible route. The mobile recommends to park his car at the nearest
+parking lot and take the subway directly to Stockmann.
+</p>
+</dd>
+<dt class="hdlist1">
+45
+</dt>
+<dd>
+<p>
+Weather, location and time: Kate and friends are enjoying the open
+concert near Olympia stadium. The concert started at 7:00 PM and will
+end around 9:00 PM. The mobile suggests some places to get food after
+the concert. The recommended places are mostly in open areas as the
+weather is beautiful. There are free beer coupons on the screen with
+the recommendations. It is sunny outside so they pick on of the
+recommendations.
+</p>
+</dd>
+<dt class="hdlist1">
+46
+</dt>
+<dd>
+<p>
+Weather, location and light: Roope is listening the music he owns
+on his mobile. It seems to be snowy outside and gets dark. His has his
+mobile set to offer him suggestions based on the weather and his
+listening patterns so his playlist suugests a playlist related to the
+snowing season and also has Christmas carols. This selection seems to
+be based on his listening pattern including favorite genre and
+artist. He’s satisfied with some of music on the list and starts play
+one of them.
+</p>
+</dd>
+<dt class="hdlist1">
+47
+</dt>
+<dd>
+<p>
+When tagging there will be keyword suggestions from the context
+engine. E.g. Name of location, weather, office/home and so on. The
+user can browse contents by "cloudy" and photos shows cloudy pictures,
+as previously tagged by the user.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>48</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+49
+</dt>
+<dd>
+<p>
+User is enjoying media e.g. music player, (internet) radio, images,
+video or television and relevant adverts appear. Example: while
+viewing photos an advert for the local print shop is displayed
+</p>
+</dd>
+<dt class="hdlist1">
+50
+</dt>
+<dd>
+<p>
+User creates or accepts an entry to calendar, maps or to-do-list,
+etc. and related adverts are shown. Example: user ads mom’s birthday
+into calendar and an advert for flowers appears or user plans a route
+in maps and special “Ibis” hotel offers appear along the route
+</p>
+</dd>
+<dt class="hdlist1">
+51
+</dt>
+<dd>
+<p>
+User does a search for adverts based on a specific location or
+context (ad pull).
+</p>
+<div class="paragraph"><p>Example: a vegetarian tourist arrives at a railway station in an
+unknown city at Sunday 5pm, an ad-search shows English ads for
+vegetarian restaurants in the area which are open now</p></div>
+</dd>
+<dt class="hdlist1">
+52
+</dt>
+<dd>
+<p>
+Users installs an application or widget on her phone which merges
+adverts with other content like weather, news or timetables. Example:
+user installs the “Helsinki weather” widget to her home screen which
+also shows the most appropriate local activities for the current
+weather
+</p>
+</dd>
+<dt class="hdlist1">
+53
+</dt>
+<dd>
+<p>
+If the user visits selected services with Direct UI then adverts
+are more relevant. Example: if the user uses Hotmail from Direct UI
+then advertisers are allowed to know that she belongs to a specific
+target group and that she is currently in Helsinki
+</p>
+</dd>
+</dl></div>
+</div>
+<h2 id="_notes">Notes</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Widget recommendation in widget library based on users
+interestes, needs and most used applications</p></div>
+<div class="paragraph"><p>Updates management: the canvas probably will be very long,
+there is no sense to update the widget all the time if they
+are invisible in the canvas. So we need some smart management
+system.</p></div>
+<div class="paragraph"><p>Widget functionality: as we all know, the widget is very
+compact and only be able to provide limited functions, so it
+would be great if the widget can provide the functionality
+based on the context.</p></div>
+<div class="paragraph"><p>Widget configuration: if the configuration in the
+corresponding applications has been changed, the widget itself
+might need to be updated too.This can happen automatically.</p></div>
+<div class="paragraph"><p>Prioritize the sharing options based on the context. For
+example, if I am chatting with you, and then I go to share
+with friend, maybe your name should show up on the top. Or if
+the contact bluetooth device is nearby, it would be good if we
+can show it as options for the user.</p></div>
+<div class="paragraph"><p>Send email to nearby contacts. E.g. People in the same meeting
+room to hare some documents</p></div>
+<div class="paragraph"><p>Recipient status. It can give some indication when you can
+expect a reply</p></div>
+<div class="paragraph"><p>Email must react somehow to changes in
+connectivity. E.g. Offering chance for offline browsing, if
+there is no connectivity</p></div>
+<div class="paragraph"><p>Reacting to events. E.g. Silencing notifications of new
+messages when user is in a meeting.</p></div>
+<div class="paragraph"><p>Kath and Hanna have activated WayFinder application, which
+dynamically shows the direction and distance to the other
+person. During the day, Hanna has found an interesting
+Portuguese restaurant and defined a WayFinder anchor point
+there. She now activates the anchor point and her phone shows
+the distance and direction to the restaurant. Kath and Hanna
+start walking towards the restaurant and are ready for a great
+night in Portugal.</p></div>
+<div class="paragraph"><p>Kath has found a nice youth hostel. She takes a photo and
+phone adds compass and GPS information to it. Kath sends the
+MMS to Hanna so that they can find the place
+easily. Additionally location data can also be used in picture
+browser at home.</p></div>
+<div class="paragraph"><p>These areas still need to provide use cases. I am chasing up
+asap.</p></div>
+<div class="paragraph"><p>Assobrowsing
+Tagging
+Sharing
+Advertising - ideas in the vision document. The server is currenly down so this will be done tomorrow.
+Search - suggestions in general should utilize heavily the context information
+Clock &amp; Calendar
+People - contacts
+Places &amp; browser</p></div>
+</div>
+<div id="footer">
+<div id="footer-text">
+Last updated 2009-05-26 13:59:43 EEST
+</div>
+</div>
+</body>
+</html>