summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/generic/print-camera-list.c176
1 files changed, 0 insertions, 176 deletions
diff --git a/packaging/generic/print-camera-list.c b/packaging/generic/print-camera-list.c
index babc9dd8d..744da1f84 100644
--- a/packaging/generic/print-camera-list.c
+++ b/packaging/generic/print-camera-list.c
@@ -836,170 +836,6 @@ empty_end_func (const func_params_t *params, void *data)
}
-
-#ifdef ENABLED_GP2DDB
-
-static int
-ddb_begin_func (const func_params_t *params, void **data)
-{
- printf("# Beginning of gphoto2 device database (PRE-ALPHA format!)\n\n");
- print_version_comment(stdout, "# ", "\n", NULL, "\n");
- return 0;
-}
-
-
-static int
-ddb_end_func (const func_params_t *params, void *data)
-{
- printf("# End of gphoto2 device database (PRE-ALPHA format!).\n");
- return 0;
-}
-
-
-static void
-ddb_list_out_func(const char *str, void *data)
-{
- int *first = (int *)data;
- printf("%s %s", (*first)?"":",", str);
- *first = 0;
-}
-
-
-static void
-ddb_delayed_head(const func_params_t *params,
- const int i,
- const int total,
- const CameraAbilities *a,
- const char *camlib_basename)
-{
- int first = 1;
- printf("# This is a PRE-ALPHA data format. Do not use it.\n\n");
-
- if (params->add_comments) {
- printf ("# %s\n", a->model);
- }
-
- printf("# automatically generated camera record %d/%d\n", i+1, total);
- printf("device \"%s\" {\n", a->model);
-
- printf(" device_type");
- printf(" %s;\n", gpi_enum_to_string(a->device_type,
- gpi_gphoto_device_type_map);
-
- printf(" driver \"%s\";\n", camlib_basename);
-
- printf(" driver_status");
- printf(" %s;\n", gpi_enum_to_string(a->status,
- gpi_camera_driver_status_map);
-
- printf(" operations");
- first = 1;
- gpi_flags_to_string_list(a->operations,
- gpi_camera_operation_map,
- ddb_list_out_func,
- (void *) &first);
- printf(";\n");
-
- printf(" file_operations");
- first = 1;
- gpi_flags_to_string_list(a->file_operations,
- gpi_file_operation_map,
- ddb_list_out_func,
- (void *) &first);
- printf(";\n");
-
- printf(" folder_operations");
- first = 1;
- gpi_flags_to_string_list(a->folder_operations,
- gpi_folder_operation_map,
- ddb_list_out_func,
- (void *) &first);
- printf(";\n");
-}
-
-
-static int
-ddb_camera_func (const func_params_t *params,
- const int i,
- const int total,
- const CameraAbilities *a,
- void *data)
-{
- const char *camlib_basename = path_basename(a->library);
- int head_printed = 0;
-#define DELAYED_HEAD() \
- do { \
- if (!head_printed) { \
- ddb_delayed_head(params, i, total, \
- a, camlib_basename); \
- head_printed = 1; \
- } \
- } while (0)
-
- if ((a->port & GP_PORT_SERIAL)) {
- int first = 1;
- DELAYED_HEAD();
- printf(" interface serial {\n");
- if (a->speed[0] != 0) {
- unsigned int i;
- printf(" speeds");
- for (i=0;
- ((i < (sizeof(a->speed)/sizeof(a->speed[0]))) &&
- (a->speed[i] != 0)); i++) {
- printf("%s %d", (first)?"":",", a->speed[i]);
- first = 0;
- }
- printf(";\n");
- }
- printf(" };\n");
- }
-
- if ((a->port & GP_PORT_USB)) {
- if (a->usb_vendor) {
- /* usb product id may have the legal value zero! */
- DELAYED_HEAD();
- printf(" interface usb {\n");
- printf(" vendor 0x%04x;\n", a->usb_vendor);
- printf(" product 0x%04x;\n", a->usb_product);
- printf(" };\n");
- }
- if ((a->usb_class) && (a->usb_class != 666)) {
- DELAYED_HEAD();
- printf(" interface usb {\n");
- printf(" class 0x%02x;\n", a->usb_class);
- if (a->usb_subclass != -1) {
- printf(" subclass 0x%02x;\n", a->usb_subclass);
- }
- if (a->usb_protocol != -1) {
- printf(" protocol 0x%02x;\n", a->usb_protocol);
- }
- printf(" };\n");
- }
- }
- if ((a->port & GP_PORT_DISK)) {
- DELAYED_HEAD();
- printf(" interface disk;\n");
- }
- if ((a->port & GP_PORT_PTPIP)) {
- DELAYED_HEAD();
- printf(" interface ptpip;\n");
- }
-#undef DELAYED_HEAD
-
- if (head_printed) {
- printf(" # driver_options {\n");
- printf(" # option \"foo\";\n");
- printf(" # option \"bar\" \"bla\";\n");
- printf(" # };\n");
-
- printf("}; # %s\n\n", a->model);
- }
- return 0;
-}
-
-#endif /* ENABLED_GP2DDB */
-
-
/* print_fdi_map
*
* Print FDI Device Information file for HAL with information on
@@ -1615,18 +1451,6 @@ static const output_format_t formats[] = {
NULL,
empty_end_func
},
-#ifdef ENABLED_GP2DDB
- {"gp2ddb",
- "gphoto2 device database (PRE-ALPHA)",
- "PRE-ALPHA test stage, do not use for production! Machine parseable.",
- NULL,
- ddb_begin_func,
- ddb_camera_func,
- NULL,
- NULL,
- ddb_end_func
- },
-#endif
{NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
};