From 13ba790a033ba6e8b9a8c044a48f55a28ba3f913 Mon Sep 17 00:00:00 2001 From: Micke Prag Date: Fri, 6 Feb 2009 09:09:44 +0000 Subject: [PATCH] Added documentation for the functions tdInit() and tdClose() --- docs/telldus-core.dox | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/telldus-core.dox b/docs/telldus-core.dox index 969f247a..63eec9df 100644 --- a/docs/telldus-core.dox +++ b/docs/telldus-core.dox @@ -32,6 +32,11 @@ * * Telldus provides a non-gui library to list, query and control the devices * called telldus-core. + * To initiate the library a call to tdInit() must be made. This call will + * open up all controllers (e.g. a TellStick) and start listen for events from + * them. + * When you are done with telldus-core, call tdClose() to allow the library to + * clean up after itself. * * \subsection sec_bu_listing Listing devices * @@ -42,6 +47,7 @@ * int id = tdGetDeviceId( index ); * char *name = tdGetName( id ); * printf("%d\t%s\n", id, name); + * free(name); * } * \endcode * @@ -60,7 +66,9 @@ * the rest of the program. * * The next two lines of code queries the device for it's name with a call to - * tdGetName() and then displays it to stdout. + * tdGetName() and then displays it to stdout. Since telldus-core gives up the + * ownership of the string we must manualy free up the resource after we are + * done with it. * * \subsection sec_bu_sending Sending commands to TellStick *