diff options
author | Frederic Peters <fpeters@entrouvert.com> | 2004-08-18 15:45:48 +0000 |
---|---|---|
committer | Frederic Peters <fpeters@entrouvert.com> | 2004-08-18 15:45:48 +0000 |
commit | 1a599c2608fd2b337993c39a9d378a176b7077e0 (patch) | |
tree | ac62b939e46e8b76997e8715220ee0319639a25a | |
parent | 131a818d244eea55a4e038c654c72ceee0a17526 (diff) | |
download | lasso-1a599c2608fd2b337993c39a9d378a176b7077e0.tar.gz lasso-1a599c2608fd2b337993c39a9d378a176b7077e0.tar.xz lasso-1a599c2608fd2b337993c39a9d378a176b7077e0.zip |
section about lasso_server_dump and lasso_server_new_from_dump
-rw-r--r-- | docs/lasso-book/writing-a-c-sp.txt | 27 |
1 files changed, 27 insertions, 0 deletions
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 ====================== |