Definition at line 61 of file filecdrstorage.h.
OSB_LIB::FileCdrStorage::FileCdrStorage | ( | Asn1Writer & | writer, | |
const std::string & | format | |||
) |
Constructor.
writer | ASN.1 writer to use. | |
format | Format of the generated stream. |
OSB_LIB::FileCdrStorage::FileCdrStorage | ( | const FileCdrStorage & | ) | [private] |
Prevent copying: not implemented.
OsbError OSB_LIB::FileCdrStorage::beginStream | ( | const OSB_DB::Session & | session, | |
const RecordStreamInfo & | input | |||
) | [virtual] |
Prepare to process a new batch of CDR records.
session | Database session to use. | |
input | Information about the input record stream being processed. |
StreamPending | (see StreamPending). |
Implements OSB_LIB::CdrStorage.
OsbError OSB_LIB::FileCdrStorage::endStream | ( | ) | [virtual] |
Finalize the processing of an input stream.
The function is called after the database transactions from storeCdrs() have been committed.
Implements OSB_LIB::CdrStorage.
FileCdrStorage& OSB_LIB::FileCdrStorage::operator= | ( | const FileCdrStorage & | ) | [private] |
Prevent assignment: not implemented.
OsbError OSB_LIB::FileCdrStorage::prepareWrite | ( | OSB_DB::Session & | session | ) | [virtual] |
Prepare to write the CDRs into files.
session | Database session that can be used to mark the CDR files as being changed. Transactions must be committed. |
Implements OSB_LIB::CdrStorage.
Add a CDR to the result set.
cdr | CDR to add. | |
error | Gets error information. |
OsbException | if a fatal error occurred. |
Implements OSB_LIB::CdrStorage.
void OSB_LIB::FileCdrStorage::setBaseDir | ( | const std::string & | baseDir | ) |
Set the CDR base directory.
OsbError OSB_LIB::FileCdrStorage::storeCdrs | ( | const OSB_DB::Session & | session, | |
CdrList & | errors | |||
) | [virtual] |
Maintain the database and rename files to final name.
Closes the output file.
session | Database session to use. | |
errors | List to store CDRs that can not be stored. |
Implements OSB_LIB::CdrStorage.
bool OSB_LIB::FileCdrStorage::undoChanges | ( | OSB_DB::Session & | session | ) | [virtual] |
Undo all changes on the CDR files and database.
session | Database session to undo and commit the transactions done in prepareWrite(). |
The rollback operation must proceed as much as possible!
This means the function should not throw (unless there's a real emergency), instead appropriate errors should be written to Log.
Implements OSB_LIB::CdrStorage.
OsbError OSB_LIB::FileCdrStorage::writeCdrFiles | ( | ) | [virtual] |
Write the CDRs to file(s).
Implements OSB_LIB::CdrStorage.
Asn1Writer& OSB_LIB::FileCdrStorage::asn1Writer_ [private] |
std::string OSB_LIB::FileCdrStorage::cdrBaseDir_ [private] |
std::string OSB_LIB::FileCdrStorage::format_ [private] |