]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/message.h
Ignore UTF-8 marker at the start of .conf files.
[bacula/bacula] / bacula / src / lib / message.h
index a9a6152229e0b7f385dafec8c52cf88a5cde654d..66b0f82dd89bfbe8a3617ac525487dcafd4efba2 100644 (file)
@@ -33,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.
@@ -63,6 +64,7 @@
  *
  *  M_ALERT       For Tape Alert messages.
  *
+ *  M_VOLMGMT     Volume Management message
  */
 
 enum {
@@ -81,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 */
@@ -110,7 +113,8 @@ enum {
    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_MAIL_ON_ERROR,                  /* email messages if job errors */
+   MD_CATALOG                         /* sent to catalog Log table */
 };
 
 /* Queued message item */
@@ -121,21 +125,22 @@ 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 DLL_IMP_EXP 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 DLL_IMP_EXP int           debug_level;
+extern DLL_IMP_EXP int           verbose;
+extern DLL_IMP_EXP char          my_name[];
+extern DLL_IMP_EXP const char *  working_directory;
+extern DLL_IMP_EXP time_t        daemon_start_time;
 
-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 */
+extern DLL_IMP_EXP int           console_msg_pending;
+extern DLL_IMP_EXP FILE *        con_fd;                 /* Console file descriptor */
+extern DLL_IMP_EXP brwlock_t     con_lock;               /* Console lock structure */