From 1a599c2608fd2b337993c39a9d378a176b7077e0 Mon Sep 17 00:00:00 2001 From: Frederic Peters Date: Wed, 18 Aug 2004 15:45:48 +0000 Subject: section about lasso_server_dump and lasso_server_new_from_dump --- docs/lasso-book/writing-a-c-sp.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/lasso-book/writing-a-c-sp.txt b/docs/lasso-book/writing-a-c-sp.txt index 8f6b4cc1..d239d0e3 100644 --- a/docs/lasso-book/writing-a-c-sp.txt +++ b/docs/lasso-book/writing-a-c-sp.txt @@ -108,6 +108,33 @@ if there are more than one identity provider. document are quite helpful in figuring out the message passing. +Serialization +------------- + +``LassoServer`` objects can be serialized into XML files:: + + gchar *dump; + FILE *fd; + + dump = lasso_server_dump(server); + /* write dump into a file, a database, whatever */ + g_free(dump); + +.. note:: ``lasso_server_dump`` (and other Lasso dump functions) allocates + memory through GLib. ``g_free`` is then the function to use instead + of ``free`` to release memory. + +It is then really easy to get back properly constructed objects:: + + LassoServer *server; + gchar *dump; + + /* restore dump from file, database, whatever */ + server = lasso_server_new_from_dump(dump); + + + + Liberty Metadata Files ====================== -- cgit