/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2010 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.
*/
-/*
+/**
* Bacula Catalog Database Get record interface routines
* Note, these routines generally get a record by id or
* by name. If more logic is involved, the routine
*/
-/* The following is necessary so that we do not include
+/**
+ * The following is necessary so that we do not include
* the dummy external definition of DB.
*/
#define __SQL_C /* indicate that this is sql.c */
static int db_get_filename_record(JCR *jcr, B_DB *mdb);
-/*
+/**
* Given a full filename (with path), look up the File record
* (with attributes) in the database.
*
}
-/*
+/**
* Get a File record
* Returns: 0 on failure
* 1 on success
edit_int64(jr->ClientId,ed3));
} else if (jr != NULL) {
- /* Called from Verify so jr->FileIndex is valid */
+ /*
+ * Note, if jr given jr->FileIndex must be valid
+ * This is probably no longer used.
+ */
Mmsg(mdb->cmd,
"SELECT FileId, LStat, MD5 FROM File WHERE File.JobId=%s AND File.PathId=%s AND "
"File.FilenameId=%s AND FileIndex=%u",
}
-/* Get Filename record
+/**
+ * Get Filename record
* Returns: 0 on failure
* FilenameId on success
*
return FilenameId;
}
-/* Get path record
+/**
+ * Get path record
* Returns: 0 on failure
* PathId on success
*
}
-/*
+/**
* Get Job record for given JobId or Job name
* Returns: false on failure
* true on success
return true;
}
-/*
+/**
* Find VolumeNames for a given JobId
* Returns: 0 on error or no Volumes found
* number of volumes on success
return stat;
}
-/*
+/**
* Find Volume parameters for a give JobId
* Returns: 0 on error or no Volumes found
* number of volumes on success
-/*
+/**
* Get the number of pool records
*
* Returns: -1 on failure
return stat;
}
-/*
+/**
* This function returns a list of all the Pool record ids.
* The caller must free ids if non-NULL.
*
return stat;
}
-/*
+/**
* This function returns a list of all the Client record ids.
* The caller must free ids if non-NULL.
*
-/* Get Pool Record
+/**
+ * Get Pool Record
* If the PoolId is non-zero, we get its record,
* otherwise, we search on the PoolName
*
return ok;
}
-/* Get Client Record
+/**
+ * Get Client Record
* If the ClientId is non-zero, we get its record,
* otherwise, we search on the Client Name
*
return stat;
}
-/*
+/**
* Get Counter Record
*
* Returns: 0 on failure
}
-/* Get FileSet Record
+/**
+ * Get FileSet Record
* If the FileSetId is non-zero, we get its record,
* otherwise, we search on the name
*
}
-/*
+/**
* Get the number of Media records
*
* Returns: -1 on failure
return stat;
}
-/*
+/**
* This function returns a list of all the Media record ids for
* the current Pool, the correct Media Type, Recyle, Enabled, StorageId, VolBytes
* VolumeName if specified
}
-/*
+/**
* This function returns a list of all the DBIds that are returned
* for the query.
*
return ok;
}
-/* Get Media Record
+/**
+ * Get Media Record
*
* Returns: false: on failure
* true: on success
return ok;
}
-/*
+/**
* Find the last "accurate" backup state (that can take deleted files in
* account)
* 1) Get all files with jobid in list (F subquery)
return db_sql_query(mdb, buf.c_str(), result_handler, ctx);
}
-/*
+/**
* This procedure gets the base jobid list used by jobids,
*/
bool db_get_used_base_jobids(JCR *jcr, B_DB *mdb,
return db_sql_query(mdb, buf.c_str(), db_list_handler, result);
}
-/* The decision do change an incr/diff was done before
+/**
+ * The decision do change an incr/diff was done before
* Full : do nothing
* Differential : get the last full id
* Incremental : get the last full + last diff + last incr(s) ids