/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2008 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.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
bstrncpy(msg, jobstat, maxlen);
}
+/*
+ * Convert a JobStatus code into a human readable form - gui version
+ */
+void jobstatus_to_ascii_gui(int JobStatus, char *msg, int maxlen)
+{
+ const char *cnv = NULL;
+ switch (JobStatus) {
+ case JS_Terminated:
+ cnv = _("Completed successfully");
+ break;
+ case JS_ErrorTerminated:
+ cnv = _("Terminated with errors");
+ break;
+ case JS_FatalError:
+ cnv = _("Fatal error");
+ break;
+ case JS_Created:
+ cnv = _("Created, not yet running");
+ break;
+ case JS_Canceled:
+ cnv = _("Canceled by user");
+ break;
+ case JS_Differences:
+ cnv = _("Verify found differences");
+ break;
+ case JS_WaitFD:
+ cnv = _("Waiting for File daemon");
+ break;
+ case JS_WaitSD:
+ cnv = _("Waiting for Storage daemon");
+ break;
+ case JS_WaitPriority:
+ cnv = _("Waiting for higher priority jobs");
+ break;
+ case JS_AttrInserting:
+ cnv = _("Batch inserting file records");
+ break;
+ };
+
+ if (cnv) {
+ bstrncpy(msg, cnv, maxlen);
+ } else {
+ jobstatus_to_ascii( JobStatus, msg, maxlen);
+ }
+}
+
+
/*
* Convert Job Termination Status into a string
*/
case L_VERIFY_DATA:
str = _("Verify Data");
break;
+ case L_VIRTUAL_FULL:
+ str = _("Virtual Full");
+ break;
case L_NONE:
str = " ";
break;
return str;
}
+const char *volume_status_to_str(const char *status)
+{
+ int pos;
+ const char *vs[] = {
+ NT_("Append"), _("Append"),
+ NT_("Archive"), _("Archive"),
+ NT_("Disabled"), _("Disabled"),
+ NT_("Full"), _("Full"),
+ NT_("Used"), _("Used"),
+ NT_("Cleaning"), _("Cleaning"),
+ NT_("Purged"), _("Purged"),
+ NT_("Recycle"), _("Recycle"),
+ NT_("Read-Only"), _("Read-Only"),
+ NT_("Error"), _("Error"),
+ NULL, NULL};
+
+ if (status) {
+ for (pos = 0 ; vs[pos] ; pos += 2) {
+ if ( !strcmp(vs[pos],status) ) {
+ return vs[pos+1];
+ }
+ }
+ }
+
+ return _("Invalid volume status");
+}
+
/***********************************************************************
* Encode the mode bits into a 10 character string like LS does
break;
case 'l':
if (jcr) {
- str = job_level_to_str(jcr->JobLevel);
+ str = job_level_to_str(jcr->get_JobLevel());
} else {
str = _("*none*");
}
break;
case 't':
if (jcr) {
- str = job_type_to_str(jcr->JobType);
+ str = job_type_to_str(jcr->get_JobType());
} else {
str = _("*none*");
}