
Definition at line 61 of file errrecordfile.h.
| OSB_LIB::ErrRecordFile::ErrRecordFile | ( | Asn1Writer & | writer, | |
| const std::string & | format, | |||
| RecordStream::Type | type, | |||
| const size_t | blockSize = 0, |
|||
| const char | filler = 0x00 | |||
| ) |
Constructor with format and stream type.
| writer | ASN.1 writer to use. | |
| format | Format of the output file. | |
| type | Type of the record stream: it should be RecordStream::stError or RecordStream::stFilter. | |
| blockSize | Set the size of the ASN.1 block. | |
| filler | Character used to fill up the ASN.1 block. |
| OSB_LIB::ErrRecordFile::ErrRecordFile | ( | const ErrRecordFile & | ) | [private] |
Prevent copying: not implemented.
| OsbError OSB_LIB::ErrRecordFile::beginStream | ( | const OSB_DB::Session & | session, | |
| const RecordStreamInfo & | input | |||
| ) |
Prepare to process a new batch of CDR records.
| session | Database session to use. | |
| input | Information about the input record stream being processed. |
| OsbException | if processing of a stream is currently ongoing. |
| OsbError OSB_LIB::ErrRecordFile::closeFile | ( | ) |
| OsbError OSB_LIB::ErrRecordFile::endStream | ( | ) |
Finalize the processing of an input stream.
The function is called after the database transactions from storeCdrs() have been committed.
| ErrRecordFile& OSB_LIB::ErrRecordFile::operator= | ( | const ErrRecordFile & | ) | [private] |
Prevent assignment: not implemented.
| void OSB_LIB::ErrRecordFile::setBaseDir | ( | const std::string & | baseDir | ) |
Set the CDR base directory.
| OsbError OSB_LIB::ErrRecordFile::storeCdrs | ( | const OSB_DB::Session & | session, | |
| const RecordStreamInfo & | input | |||
| ) |
Maintain the database and rename file to final name.
| session | Database session to use. | |
| input | Information about the processed input record stream. |
| bool OSB_LIB::ErrRecordFile::undoChanges | ( | OSB_DB::Session & | session | ) |
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.
Write binary ASN.1 data to the file.
| asn1 | ASN.1 data to write to add. | |
| error | Gets error information. |
| bool OSB_LIB::ErrRecordFile::write | ( | const std::string & | record, | |
| const DateTime & | timeStamp, | |||
| OsbError & | error | |||
| ) |
Add an erroneous network CDR to the file.
| record | CDR as coming from the network or element. | |
| timeStamp | Timestamp of the CDR, it is not set if not available. | |
| error | Gets error information. |
Add a CDR to the result set.
| cdr | CDR to add. | |
| error | Gets error information. |
Asn1Writer& OSB_LIB::ErrRecordFile::asn1Writer_ [private] |
std::string OSB_LIB::ErrRecordFile::cdrBaseDir_ [private] |
std::string OSB_LIB::ErrRecordFile::format_ [private] |
1.4.7