]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/message.h
Add the updated version of the the win32 pathname fix.
[bacula/bacula] / bacula / src / lib / message.h
index e49a69741823548dbf634eda1bbfd43473c16c43..328dc588640e0a51d5ba5385bd4d372edc0a4e18 100644 (file)
@@ -5,22 +5,17 @@
  *   Version $Id$
  */
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
@@ -38,6 +33,7 @@
 #undef  M_RESTORED
 #undef  M_SECURITY
 #undef  M_ALERT
+#undef  M_VOLMGMT
 
 /*
  * Most of these message levels are more or less obvious.
@@ -68,6 +64,7 @@
  *
  *  M_ALERT       For Tape Alert messages.
  *
+ *  M_VOLMGMT     Volume Management message
  */
 
 enum {
@@ -86,10 +83,11 @@ enum {
    M_TERM,                            /* Terminating daemon normally */
    M_RESTORED,                        /* ls -l of restored files */
    M_SECURITY,                        /* security violation */
-   M_ALERT                            /* tape alert messages */
+   M_ALERT,                           /* tape alert messages */
+   M_VOLMGMT                          /* Volume management messages */
 };
 
-#define M_MAX      M_ALERT            /* keep this updated ! */
+#define M_MAX      M_VOLMGMT          /* keep this updated ! */
 
 /* Define message destination structure */
 /* *** FIXME **** where should be extended to handle multiple values */
@@ -105,16 +103,19 @@ typedef struct s_dest {
 } DEST;
 
 /* Message Destination values for dest field of DEST */
-#define MD_SYSLOG    1                /* send msg to syslog */
-#define MD_MAIL      2                /* email group of messages */
-#define MD_FILE      3                /* write messages to a file */
-#define MD_APPEND    4                /* append messages to a file */
-#define MD_STDOUT    5                /* print messages */
-#define MD_STDERR    6                /* print messages to stderr */
-#define MD_DIRECTOR  7                /* send message to the Director */
-#define MD_OPERATOR  8                /* email a single message to the operator */
-#define MD_CONSOLE   9                /* send msg to UserAgent or console */
-#define MD_MAIL_ON_ERROR 10           /* email messages if job errors */
+enum {
+   MD_SYSLOG = 1,                     /* send msg to syslog */
+   MD_MAIL,                           /* email group of messages */
+   MD_FILE,                           /* write messages to a file */
+   MD_APPEND,                         /* append messages to a file */
+   MD_STDOUT,                         /* print messages */
+   MD_STDERR,                         /* print messages to stderr */
+   MD_DIRECTOR,                       /* send message to the Director */
+   MD_OPERATOR,                       /* email a single message to the operator */
+   MD_CONSOLE,                        /* send msg to UserAgent or console */
+   MD_MAIL_ON_ERROR,                  /* email messages if job errors */
+   MD_CATALOG                         /* sent to catalog Log table */
+};
 
 /* Queued message item */
 struct MQUEUE_ITEM {
@@ -124,15 +125,23 @@ struct MQUEUE_ITEM {
    char msg[1];
 };
 
-
 void d_msg(const char *file, int line, int level, const char *fmt,...);
 void e_msg(const char *file, int line, int type, int level, const char *fmt,...);
 void Jmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...);
 void Qmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...);
+bool get_trace(void);
+
+typedef void (*sql_query)(JCR *jcr, const char *cmd);
+extern sql_query p_sql_query;
+
+extern int           DLL_IMP_EXP debug_level;
+extern int           DLL_IMP_EXP verbose;
+extern char          DLL_IMP_EXP my_name[];
+extern const char *  DLL_IMP_EXP working_directory;
+extern time_t        DLL_IMP_EXP daemon_start_time;
+extern char                      catalog_db[];
 
-extern int debug_level;
-extern int verbose;
-extern char my_name[];
-extern const char *working_directory;
-extern time_t daemon_start_time;
-extern char catalog_db[];
+extern int           DLL_IMP_EXP console_msg_pending;
+extern FILE *        DLL_IMP_EXP con_fd;                 /* Console file descriptor */
+extern brwlock_t     DLL_IMP_EXP con_lock;               /* Console lock structure */