]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua.h
kes Modify job report to include director name and Build OS.
[bacula/bacula] / bacula / src / dird / ua.h
index 9b71b8d856e49e238ff635447c1277a188e8258e..aabb2e1f6d0834fdf8793cfa46a86d7b3506c4e2 100644 (file)
@@ -1,14 +1,7 @@
-/*
- * Includes specific to the Director User Agent Server
- *
- *     Kern Sibbald, August MMI
- *
- *     Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2001-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2001-2007 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ * Includes specific to the Director User Agent Server
+ *
+ *     Kern Sibbald, August MMI
+ *
+ *     Version $Id$
+ */
 
 #ifndef __UA_H_
 #define __UA_H_ 1
 
-struct UAContext {
+class UAContext {
+public:
    BSOCK *UA_sock;
    BSOCK *sd;
    JCR *jcr;
@@ -51,6 +52,7 @@ struct UAContext {
    char **prompt;                     /* list of prompts */
    int max_prompts;                   /* max size of list */
    int num_prompts;                   /* current number in list */
+   int api;                           /* For programs want an API */
    bool auto_display_messages;        /* if set, display messages */
    bool user_notified_msg_pending;    /* set when user notified */
    bool automount;                    /* if set, mount after label */
@@ -61,6 +63,14 @@ struct UAContext {
    uint32_t pint32_val;               /* positive integer */
    int32_t  int32_val;                /* positive/negative */
    int64_t  int64_val;                /* big int */
+
+   void signal(int sig) { UA_sock->signal(sig); };
+
+   /* The below are in ua_output.c */
+   void send_msg(const char *fmt, ...);
+   void error_msg(const char *fmt, ...);
+   void warning_msg(const char *fmt, ...);
+   void info_msg(const char *fmt, ...);
 };
 
 /* Context for insert_tree_handler() */
@@ -113,5 +123,4 @@ struct RESTORE_CTX {
 
 #define MAX_ID_LIST_LEN 2000000
 
-
 #endif