Removed libburn/message.[ch]

This commit is contained in:
Thomas Schmitt 2006-09-26 14:53:06 +00:00
parent 6d2164291e
commit 26d929a440
6 changed files with 0 additions and 223 deletions

View File

@ -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)

View File

@ -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"

View File

@ -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

View File

@ -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 <stdlib.h>
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);
}

View File

@ -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

View File

@ -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"