Enlightenment CVS committal Author : technikolor Project : web Module : e
Dir : web/e/data Modified Files: edb.html Log Message: EDB page complete. =================================================================== RCS file: /cvsroot/enlightenment/web/e/data/edb.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- edb.html 2 Feb 2004 07:15:29 -0000 1.7 +++ edb.html 3 Feb 2004 10:48:53 -0000 1.8 @@ -4,10 +4,83 @@ <img src="img/titles/edb.png"> -<p>This is a database library based on Berkeley DB 2.7.7 from - <a href="http://www.sleepycat.com">http://www.sleepycat.com</a>. - It is intended to make accessing database information portable, - easy, fast and efficient.</p> +<p> +EDB is a database convenience library wrapped around the Berkeley DB 2.7.7 by +<a href="http://www.sleepycat.com">Sleepycat Software</a>. It is intended to +make accessing database information portable, easy, fast and efficient. +</p> + +<p> +EDB provides an excellent method of storing and retrieving application +configuration information, although it can be used for more extensively +than that. Ebits, the predecessor to Edje, even used EDB as a container +for Ebits themes prior to EET. An Edb consists of a series of key/value +pairs, which can consist of a variety of data types, including +integers, floating point values, strings, and binary data. The simplified +API provides simple, complete, and unified functions for managing and +accessing your database. +</p> + +<p> +In addition to the library, a variety of tools are available to access +and modify your EDBs. edb_ed provides a simple command line interface +that can easily be scripted, especially useful for use with the GNU autotools +suite. edb_vt_ed provides an easy to use curses interface. And edb_gtk_ed +provides an elegant and easy GUI interface, especially useful for end user +editing of configuration data contained in EDBs. +</p> + +<p> +Here is a simple example of EDB usage... +</p> + +<div class="code"> + +<pre> +#include <Edb.h> +#include <stdio.h> + +int main() { + + E_DB_File * my_edb; + E_DB_File * our_edb; + float var1 = 12.11; + int my_int; + float my_float; + + printf("Writing...\n"); + my_edb = e_db_open("/tmp/example.db"); + + e_db_property_set(my_edb, "Application", "My App"); + e_db_int_set(my_edb, "Elements", 10); + e_db_float_set(my_edb, "Percent Complete", var1); + e_db_str_set(my_edb, "Font", "/path/to/font.ttf"); + + e_db_close(my_edb); + + printf("Reading...\n"); + our_edb = e_db_open_read("/tmp/example.db"); + + if(e_db_int_get(our_edb, "Elements", &my_int)) + printf("Elements has value %d\n", my_int); + + if(e_db_float_get(our_edb, "Percent Complete", &my_float)) + printf("Completion has value %f\n", my_float); + + e_db_close(our_edb); +} +</pre> +</div> + +<p> +This code is compiled in the following manner: gcc `edb-config --libs --cflags` edb_test.c -o edb_test +</p> + +<p>The EDB that results from the above code when viewed in edb_gtk_ed looks like this:</p> + +<center> +<a href="img/edb_gtk_example.png"><img src="img/tn2_edb_gtk_example.png" class="sshot"></a> +</center> <p class="manager">EDB's project manager is <a href="team.html" class="lite">Carsten "Rasterman" Haitzler</a>.</p> ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs