diff options
author | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-10-08 10:04:18 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-10-08 10:05:30 +0200 |
commit | 4e78a33ab00c8437d341a4cb83919e2a67e54493 (patch) | |
tree | 0905d08b69b2a8e5e90171ecfc5942142de6d4ee /tools | |
parent | 5ed330a163073f4aab98995520eebbc15dff83f3 (diff) | |
download | libuca-4e78a33ab00c8437d341a4cb83919e2a67e54493.tar.gz libuca-4e78a33ab00c8437d341a4cb83919e2a67e54493.tar.bz2 libuca-4e78a33ab00c8437d341a4cb83919e2a67e54493.tar.xz libuca-4e78a33ab00c8437d341a4cb83919e2a67e54493.zip |
Generate documentation for the base camera object
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gen-doc.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/gen-doc.c b/tools/gen-doc.c index d9b6b41..86d6ff9 100644 --- a/tools/gen-doc.c +++ b/tools/gen-doc.c @@ -124,25 +124,29 @@ int main(int argc, char *argv[]) { UcaPluginManager *manager; UcaCamera *camera; + gchar *name; GError *error = NULL; g_type_init(); + manager = uca_plugin_manager_new (); if (argc < 2) { - print_usage(); - return 1; + name = g_strdup ("Basic camera"); + camera = g_object_new (UCA_TYPE_CAMERA, NULL); + } + else { + name = argv[1]; + camera = uca_plugin_manager_new_camera (manager, name, &error); } - - manager = uca_plugin_manager_new (); - camera = uca_plugin_manager_new_camera (manager, argv[1], &error); if (camera == NULL) { g_print("Error during initialization: %s\n", error->message); + print_usage(); return 1; } - g_print (html_header, argv[1]); - g_print ("<div id=\"header\"><h1 class=\"title\">Property documentation of %s</h1>", argv[1]); + g_print (html_header, name); + g_print ("<div id=\"header\"><h1 class=\"title\">Property documentation of %s</h1>", name); print_properties (camera); g_print ("%s\n", html_footer); |