From 1702970a3ea3de88f04623f69a3ab5260f77d2c5 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Thu, 8 Mar 2007 21:16:40 -0500 Subject: add a stub for docbook documentation --- Makefile.am | 1 + configure.ac | 102 ++++++++++++++++++++++++++++++++++-------------- doc/.gitignore | 6 +++ doc/ConsoleKit.xml.in | 69 ++++++++++++++++++++++++++++++++ doc/Makefile.am | 37 ++++++++++++++++++ doc/ck-dbus-manager.xml | 52 ++++++++++++++++++++++++ doc/ck-dbus-seat.xml | 39 ++++++++++++++++++ doc/ck-dbus-session.xml | 55 ++++++++++++++++++++++++++ doc/ck-introduction.xml | 23 +++++++++++ doc/config.xsl | 6 +++ doc/docbook.css | 18 +++++++++ 11 files changed, 378 insertions(+), 30 deletions(-) create mode 100644 doc/.gitignore create mode 100644 doc/ConsoleKit.xml.in create mode 100644 doc/Makefile.am create mode 100644 doc/ck-dbus-manager.xml create mode 100644 doc/ck-dbus-seat.xml create mode 100644 doc/ck-dbus-session.xml create mode 100644 doc/ck-introduction.xml create mode 100644 doc/config.xsl create mode 100644 doc/docbook.css diff --git a/Makefile.am b/Makefile.am index 55f71b8..95be344 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,6 +8,7 @@ SUBDIRS = \ src \ tools \ data \ + doc \ libck-connector \ pam-ck-connector \ $(NULL) diff --git a/configure.ac b/configure.ac index 796186f..fce1ff9 100644 --- a/configure.ac +++ b/configure.ac @@ -163,6 +163,73 @@ AM_CONDITIONAL(CK_COMPILE_FREEBSD, test x$CK_BACKEND = xfreebsd, [Compiling for AM_CONDITIONAL(CK_COMPILE_SOLARIS, test x$CK_BACKEND = xsolaris, [Compiling for Solaris]) AC_SUBST(CK_BACKEND) +dnl --------------------------------------------------------------------------- +dnl Check for PAM +dnl --------------------------------------------------------------------------- + +have_pam=no +AC_CHECK_LIB(pam, pam_getenv, have_pam=yes) +AM_CONDITIONAL(HAVE_PAM, test x$have_pam = xyes) +if test "x$have_pam" = "xyes"; then + PAM_LIBS="${PAM_LIBS} -lpam" +fi +AC_SUBST(HAVE_PAM) +AC_SUBST(PAM_LIBS) + + +# Check if we should build the PAM module +msg_pam_module=no +AC_ARG_ENABLE(pam-module, [AC_HELP_STRING([--enable-pam-module], [build PAM module])],, enable_pam_module=no) +if test "x$enable_pam_module" = "xyes"; then + if test "x$have_pam" = "xno"; then + AC_MSG_ERROR([--enable-pam-module requires PAM but PAM was not found]) + fi + AC_DEFINE(ENABLE_PAM_MODULE, [], [Set if we build PAM module]) + msg_pam_module=yes +fi +AM_CONDITIONAL(ENABLE_PAM_MODULE, test "x$enable_pam_module" = "xyes") + +dnl --------------------------------------------------------------------------- +dnl - Where should we put documentation ? +dnl --------------------------------------------------------------------------- + +AC_ARG_WITH(doc-dir, + [AC_HELP_STRING([--with-doc-dir=], + [directory to install documentation])]) +if ! test -z "$with_doc_dir"; then + DOCDIR="$with_doc_dir/ConsoleKit-$VERSION" +else + DOCDIR="$datadir/doc/ConsoleKit-$VERSION" +fi +AC_SUBST(DOCDIR) + +dnl --------------------------------------------------------------------------- +dnl - DocBook Documentation +dnl --------------------------------------------------------------------------- + +AC_ARG_ENABLE(docbook-docs, [ --enable-docbook-docs build documentation (requires xmlto)],enable_docbook_docs=$enableval,enable_docbook_docs=no) +AC_PATH_PROG(XMLTO, xmlto, no) +AC_MSG_CHECKING([whether to build DocBook documentation]) +if test x$XMLTO = xno ; then + have_docbook=no +else + have_docbook=yes +fi +if test x$enable_docbook_docs = xauto ; then + if test x$have_docbook = xno ; then + enable_docbook_docs=no + else + enable_docbook_docs=yes + fi +fi +if test x$enable_docbook_docs = xyes; then + if test x$have_docbook = xno; then + AC_MSG_ERROR([Building DocBook docs explicitly required, but DocBook not found]) + fi +fi +AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes) +AC_MSG_RESULT(yes) + dnl --------------------------------------------------------------------------- dnl Finish dnl --------------------------------------------------------------------------- @@ -207,32 +274,6 @@ else AC_MSG_RESULT(no) fi -# -# Check for pam -# -have_pam=no -AC_CHECK_LIB(pam, pam_getenv, have_pam=yes) -AM_CONDITIONAL(HAVE_PAM, test x$have_pam = xyes) -if test "x$have_pam" = "xyes"; then - PAM_LIBS="${PAM_LIBS} -lpam" -fi -AC_SUBST(HAVE_PAM) -AC_SUBST(PAM_LIBS) - -# -# Check if we should build the PAM module -# -msg_pam_module=no -AC_ARG_ENABLE(pam-module, [AC_HELP_STRING([--enable-pam-module], [build PAM module])],, enable_pam_module=no) -if test "x$enable_pam_module" = "xyes"; then - if test "x$have_pam" = "xno"; then - AC_MSG_ERROR([--enable-pam-module requires PAM but PAM was not found]) - fi - AC_DEFINE(ENABLE_PAM_MODULE, [], [Set if we build PAM module]) - msg_pam_module=yes -fi -AM_CONDITIONAL(ENABLE_PAM_MODULE, test "x$enable_pam_module" = "xyes") - # # Enable Debug # @@ -266,6 +307,8 @@ tools/Makefile tools/linux/Makefile data/Makefile data/ConsoleKit +doc/Makefile +doc/ConsoleKit.xml libck-connector/Makefile libck-connector/ck-connector.pc pam-ck-connector/Makefile @@ -289,9 +332,8 @@ echo " Base libs: ${CONSOLE_KIT_LIBS} Maintainer mode: ${USE_MAINTAINER_MODE} - Backend: ${CK_BACKEND} - dbus-1 system.d dir: ${DBUS_SYS_DIR} - build PAM module: ${msg_pam_module} - + Build backend: ${CK_BACKEND} + Build PAM module: ${msg_pam_module} + Build docs: ${enable_docbook_docs} " diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000..4337b46 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +ConsoleKit.xml +ConsoleKit.html +*.o +*~ diff --git a/doc/ConsoleKit.xml.in b/doc/ConsoleKit.xml.in new file mode 100644 index 0000000..7eb0cb1 --- /dev/null +++ b/doc/ConsoleKit.xml.in @@ -0,0 +1,69 @@ + + + + +]> + + + + ConsoleKit @VERSION@ Documentation + Version @VERSION@ + 8 March, 2007 + + + William Jon + McCann + +
+ mccann@jhu.edu +
+
+
+
+
+ + + Introduction + + + + + + Concepts + + + + + + Reference + + + D-Bus API Reference + + + + ConsoleKit provides a D-Bus API for programs to obtain information about the + users, sessions, and seats that are present on a system. + + + Please see the other sections of this manual for an introduction to + these concepts. + + + This API is not yet stable and is likely to change in the future. + + + + &dbus-Manager; + &dbus-Seat; + &dbus-Session; + + + + + + Index + + +
diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..6f96464 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,37 @@ +NULL = + +SPEC_XML_FILES = \ + ConsoleKit.xml \ + ck-introduction.xml \ + ck-dbus-manager.xml \ + ck-dbus-seat.xml \ + ck-dbus-session.xml \ + $(NULL) + +if DOCBOOK_DOCS_ENABLED + +htmldocdir = $(DOCDIR)/spec +htmldoc_DATA = ConsoleKit.html + +ConsoleKit.html : $(SPEC_XML_FILES) + $(XMLTO) html-nochunks -m config.xsl ConsoleKit.xml + +endif # DOCBOOK_DOCS_ENABLED + +EXTRA_DIST = \ + ConsoleKit.html \ + ConsoleKit.xml.in \ + config.xsl \ + docbook.css \ + $(SPEC_XML_FILES) + $(NULL) + + +MAINTAINERCLEANFILES = \ + *~ \ + Makefile.in \ + $(NULL) + +clean-local: + rm -f *~ + rm -f ConsoleKit.html diff --git a/doc/ck-dbus-manager.xml b/doc/ck-dbus-manager.xml new file mode 100644 index 0000000..77577a5 --- /dev/null +++ b/doc/ck-dbus-manager.xml @@ -0,0 +1,52 @@ + + + org.freedesktop.ConsoleKit.Manager + 1 + + + + org.freedesktop.ConsoleKit.Manager + Primary management interface + + + + Synopsis + + + Interface: + org.freedesktop.ConsoleKit.Manager + + Methods: + GetSeats (out OBJECT_PATH ARRAY seats) + GetSessionsForUser (in UINT32 uid, + out OBJECT_PATH ARRAY sessions) + GetCurrentSession (out OBJECT_PATH session) + GetSessionForUnixProcess (in UINT32 pid, + out OBJECT_PATH session) + GetSessionForCookie (in STRING cookie, + out OBJECT_PATH session) + GetSystemIdleHint (out BOOLEAN hint) + GetSystemIdleSinceHint (out STRING iso8601_datetime) + + OpenSession (out STRING cookie) + OpenSessionWithParameters (int STRING,VARIANT STRUCT ARRAY parameters, + out STRING cookie) + CloseSession (int STRING cookie, + out BOOLEAN result) + + Signals: + SeatAdded (STRING sid) + SeatRemoved (STRING sid) + SystemIdleHintChanged (BOOLEAN hint) + + + + + + + Description + + + + + diff --git a/doc/ck-dbus-seat.xml b/doc/ck-dbus-seat.xml new file mode 100644 index 0000000..738f6e2 --- /dev/null +++ b/doc/ck-dbus-seat.xml @@ -0,0 +1,39 @@ + + + org.freedesktop.ConsoleKit.Seat + 2 + + + + org.freedesktop.ConsoleKit.Seat + Seat interface + + + + Synopsis + + + Interface: + org.freedesktop.ConsoleKit.Seat + + Methods: + GetId (out OBJECT_PATH sid) + ActivateSession (in OBJECT_PATH ssid) + GetActiveSession (out OBJECT_PATH ssid) + GetSessions (out OBJECT_PATH ARRAY sessions) + + Signals: + SessionAdded (STRING ssid) + SessionRemoved (STRING ssid) + ActiveSessionChanged (STRING ssid) + + + + + + Description + + + + + diff --git a/doc/ck-dbus-session.xml b/doc/ck-dbus-session.xml new file mode 100644 index 0000000..77181ec --- /dev/null +++ b/doc/ck-dbus-session.xml @@ -0,0 +1,55 @@ + + + org.freedesktop.ConsoleKit.Session + 3 + + + + org.freedesktop.ConsoleKit.Session + Session interface + + + + Synopsis + + + Interface: + org.freedesktop.ConsoleKit.Session + + Methods: + GetId (out STRING ssid) + GetSeatId (out STRING sid) + GetUser (out INT32 uid) + GetIdleHint (out BOOLEAN hint) + SetIdleHint (in BOOLEAN hint) + GetIdleSinceHint (out STRING iso8601_datetime) + GetCreationTime (out STRING iso8601_datetime) + GetRemoteHostName (out STRING hostname) + GetDisplayDevice (out STRING device) + GetX11DisplayDevice (out STRING device) + GetX11Display (out STRING display) + GetSessionType (out STRING type) + IsLocal (out BOOLEAN local) + IsActive (out BOOLEAN active) + Unlock () + Lock () + Activate () + + Signals: + ActiveChanged (BOOLEAN active) + IdleHintChanged (BOOLEAN hint) + Unlock () + Lock () + + Properties: + + + + + + Description + + + + + diff --git a/doc/ck-introduction.xml b/doc/ck-introduction.xml new file mode 100644 index 0000000..3a23d76 --- /dev/null +++ b/doc/ck-introduction.xml @@ -0,0 +1,23 @@ + + + + + Introduction + + + About + + ConsoleKit is a framework for keeping track of the various + users, sessions, and seats present on a system. It + provides a mechanism for software to react to changes of any of + these items or of any of the metadata associated with them. + + + + + Defining the Problem + + + + + diff --git a/doc/config.xsl b/doc/config.xsl new file mode 100644 index 0000000..7aa9def --- /dev/null +++ b/doc/config.xsl @@ -0,0 +1,6 @@ + + + + diff --git a/doc/docbook.css b/doc/docbook.css new file mode 100644 index 0000000..9a0e72a --- /dev/null +++ b/doc/docbook.css @@ -0,0 +1,18 @@ +body { + font-family: luxi sans,sans-serif; +} + +table { + border: solid 1pt; + border-collapse: collapse; +} + +th { + background: #eeeeee; + padding: 5px; +} + +td { + border: solid 1pt; + padding: 5px; +} -- cgit