From 26d929a4402fd06b65d6ebb193696d66b19e9264 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 26 Sep 2006 14:53:06 +0000 Subject: [PATCH] Removed libburn/message.[ch] --- trunk/Makefile.am | 4 -- trunk/libburn/drive.c | 5 -- trunk/libburn/libburn.h | 82 ------------------------------ trunk/libburn/message.c | 108 ---------------------------------------- trunk/libburn/message.h | 19 ------- trunk/libburn/write.c | 5 -- 6 files changed, 223 deletions(-) delete mode 100644 trunk/libburn/message.c delete mode 100644 trunk/libburn/message.h diff --git a/trunk/Makefile.am b/trunk/Makefile.am index 75193dbc..22093c46 100644 --- a/trunk/Makefile.am +++ b/trunk/Makefile.am @@ -57,10 +57,6 @@ libburn_libburn_la_SOURCES = \ libburn/write.h \ version.h -## ts A60924 : Obsoleted -## libburn/message.c \ -## libburn/message.h \ - libisofs_libisofs_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) diff --git a/trunk/libburn/drive.c b/trunk/libburn/drive.c index fd57e220..83b11fc6 100644 --- a/trunk/libburn/drive.c +++ b/trunk/libburn/drive.c @@ -13,11 +13,6 @@ #include "libburn.h" #include "drive.h" #include "transport.h" - -/* ts A60925 : obsoleted by libdax_msgs.h -#include "message.h" -*/ - #include "debug.h" #include "init.h" #include "toc.h" diff --git a/trunk/libburn/libburn.h b/trunk/libburn/libburn.h index e1b89226..7a659392 100644 --- a/trunk/libburn/libburn.h +++ b/trunk/libburn/libburn.h @@ -176,43 +176,6 @@ enum burn_disc_status }; -/* ts A60924 : libburn/message.c gets obsoleted */ -#ifdef BURN_WITH_OBSOLETED_MESSAGE_C - -/** Possible types of messages form the library. */ -enum burn_message_type -{ - /** Diagnostic/Process information. For the curious user. */ - BURN_MESSAGE_INFO, - /** A warning regarding a possible problem. The user should probably - be notified, but its not fatal. */ - BURN_MESSAGE_WARNING, - /** An error message. This usually means the current process will be - aborted, and the user should definately see these. */ - BURN_MESSAGE_ERROR -}; - -/** Possible information messages */ -enum burn_message_info -{ - BURN_INFO_FOO -}; - -/** Possible warning messages */ -enum burn_message_warning -{ - BURN_WARNING_FOO -}; - -/** Possible error messages */ -enum burn_message_error -{ - BURN_ERROR_CANCELLED -}; - -#endif /* BURN_WITH_OBSOLETED_MESSAGE_C */ - - /** Possible data source return values */ enum burn_source_status { @@ -386,37 +349,6 @@ struct burn_drive_info }; -/* ts A60924 : libburn/message.c gets obsoleted */ -#ifdef BURN_WITH_OBSOLETED_MESSAGE_C - -/** Messages from the library */ -struct burn_message -{ - /** The drive associated with the message. NULL if the error is not - related to a specific drive. */ - struct burn_drive *drive; - - /** The type of message this is. See message_type for details. */ - enum burn_message_type type; - - /** The actual message */ - union detail { - struct { - enum burn_message_info message; - } info; - struct { - enum burn_message_warning message; - } warning; - struct { - enum burn_message_error message; - } error; - } detail; -}; - -#endif /* BURN_WITH_OBSOLETED_MESSAGE_C */ - - - /** Operation progress report. All values are 0 based indices. * */ struct burn_progress { @@ -485,20 +417,6 @@ void burn_set_verbosity(int level); */ void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy); -/* ts A60924 : libburn/message.c gets obsoleted */ -#ifdef BURN_WITH_OBSOLETED_MESSAGE_C - -/** Returns a newly allocated burn_message structure. This message should be - freed with burn_message_free() when you are finished with it. - @return A message or NULL when there are no more messages to retrieve. -*/ -struct burn_message* burn_get_message(void); - -/** Frees a burn_message structure */ -void burn_message_free(struct burn_message *msg); - -#endif /* BURN_WITH_OBSOLETED_MESSAGE_C */ - /* ts A60823 */ /** Aquire a drive with known persistent address.This is the sysadmin friendly diff --git a/trunk/libburn/message.c b/trunk/libburn/message.c deleted file mode 100644 index 71f35bc9..00000000 --- a/trunk/libburn/message.c +++ /dev/null @@ -1,108 +0,0 @@ -/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */ - -#include "message.h" -#include "libburn.h" -#include "debug.h" - -#include - -struct message_list -{ - struct message_list *next; - - struct burn_message *msg; -}; - -static struct message_list *queue; - -void burn_message_free(struct burn_message *msg) -{ - free(msg); -} - -void burn_message_clear_queue(void) -{ - struct burn_message *msg; - - if ((msg = burn_get_message())) { - burn_print(0, - "YOU HAVE MESSAGES QUEUED FROM THE LAST OPERATION. " - "YOU SHOULD BE GRABBING THEM ALL!\n"); - do { - burn_message_free(msg); - } while ((msg = burn_get_message())); - } -} - -struct burn_message *burn_get_message() -{ - struct burn_message *msg = NULL; - - if (queue) { - struct message_list *next; - - next = queue->next; - msg = queue->msg; - free(queue); - queue = next; - } - - return msg; -} - -static void queue_push_tail(struct burn_message *msg) -{ - struct message_list *node; - - node = malloc(sizeof(struct message_list)); - node->next = NULL; - node->msg = msg; - - if (!queue) - queue = node; - else { - struct message_list *it; - - for (it = queue; it->next; it = it->next) ; - it->next = node; - } -} - -void burn_message_info_new(struct burn_drive *drive, - enum burn_message_info message) -{ - struct burn_message *msg; - - msg = malloc(sizeof(struct burn_message)); - msg->drive = drive; - msg->type = BURN_MESSAGE_INFO; - msg->detail.info.message = message; - - queue_push_tail(msg); -} - -void burn_message_warning_new(struct burn_drive *drive, - enum burn_message_info message) -{ - struct burn_message *msg; - - msg = malloc(sizeof(struct burn_message)); - msg->drive = drive; - msg->type = BURN_MESSAGE_WARNING; - msg->detail.warning.message = message; - - queue_push_tail(msg); -} - -void burn_message_error_new(struct burn_drive *drive, - enum burn_message_info message) -{ - struct burn_message *msg; - - msg = malloc(sizeof(struct burn_message)); - msg->drive = drive; - msg->type = BURN_MESSAGE_ERROR; - msg->detail.error.message = message; - - queue_push_tail(msg); -} diff --git a/trunk/libburn/message.h b/trunk/libburn/message.h deleted file mode 100644 index 32613cde..00000000 --- a/trunk/libburn/message.h +++ /dev/null @@ -1,19 +0,0 @@ -/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */ - -#ifndef __MESSAGE -#define __MESSAGE - -#include "libburn.h" - -void burn_message_clear_queue(void); - -void burn_message_info_new(struct burn_drive *drive, - enum burn_message_info message); - -void burn_message_warning_new(struct burn_drive *drive, - enum burn_message_info message); - -void burn_message_error_new(struct burn_drive *drive, - enum burn_message_info message); - -#endif diff --git a/trunk/libburn/write.c b/trunk/libburn/write.c index 151ab8fc..5d0f2fdf 100644 --- a/trunk/libburn/write.c +++ b/trunk/libburn/write.c @@ -12,11 +12,6 @@ #include "libburn.h" #include "drive.h" #include "transport.h" - -/* ts A60925 : obsoleted by libdax_msgs.h -#include "message.h" -*/ - #include "crc.h" #include "debug.h" #include "init.h"