+
+static int poolscmd(UAContext *ua, char *cmd)
+{
+ POOL *pool = NULL;
+ LockRes();
+ while ( (pool = (POOL *)GetNextRes(R_POOL, (RES *)pool)) ) {
+ bsendmsg(ua, "%s\n", pool->hdr.name);
+ }
+ UnlockRes();
+ return 1;
+}
+
+static int storagecmd(UAContext *ua, char *cmd)
+{
+ STORE *store = NULL;
+ LockRes();
+ while ( (store = (STORE *)GetNextRes(R_STORAGE, (RES *)store)) ) {
+ bsendmsg(ua, "%s\n", store->hdr.name);
+ }
+ UnlockRes();
+ return 1;
+}
+
+
+static int typescmd(UAContext *ua, char *cmd)
+{
+ bsendmsg(ua, "Backup\n");
+ bsendmsg(ua, "Restore\n");
+ bsendmsg(ua, "Admin\n");
+ bsendmsg(ua, "Verify\n");
+ return 1;
+}
+
+static int levelscmd(UAContext *ua, char *cmd)
+{
+ bsendmsg(ua, "Incremental\n");
+ bsendmsg(ua, "Full\n");
+ bsendmsg(ua, "Differential\n");
+ bsendmsg(ua, "Catalog\n");
+ bsendmsg(ua, "InitCatalog\n");
+ bsendmsg(ua, "VolumeToCatalog\n");
+ return 1;
+}
+
+
+
+/*
+ * Return default values for a job
+ */
+static int defaultscmd(UAContext *ua, char *cmd)
+{
+ JOB *job;
+ if (ua->argc == 2 && strcmp(ua->argk[1], "job") == 0) {
+ job = (JOB *)GetResWithName(R_JOB, ua->argv[1]);
+ if (job) {
+ bsendmsg(ua, "job=%s", job->hdr.name);
+ bsendmsg(ua, "pool=%s", job->pool->hdr.name);
+ bsendmsg(ua, "messages=%s", job->messages->hdr.name);
+ bsendmsg(ua, "client=%s", job->client->hdr.name);
+ bsendmsg(ua, "storage=%s", job->storage->hdr.name);
+ bsendmsg(ua, "where=%s", job->RestoreWhere?job->RestoreWhere:"");
+ bsendmsg(ua, "level=%s", level_to_str(job->level));
+ bsendmsg(ua, "type=%s", job_type_to_str(job->JobType));
+ bsendmsg(ua, "fileset=%s", job->fileset->hdr.name);
+ }
+ }
+ return 1;
+}