OSB_LIB::CdrIo Class Reference

Inheritance diagram for OSB_LIB::CdrIo:

Inheritance graph
[legend]
Collaboration diagram for OSB_LIB::CdrIo:

Collaboration graph
[legend]
List of all members.

Detailed Description

This object is responsible to store and retrieve call details records from file system.

This class is responsible to store the Cdr that belongs to a network partner balance sheet to file system (writing them to CDR file(s) in the corresponding balance page directory structure).

Definition at line 77 of file cdrio.h.

Public Member Functions

Static Public Member Functions

Static Public Attributes


Constructor & Destructor Documentation

virtual OSB_LIB::CdrIo::~CdrIo (  )  [virtual]

Empty virtual destructor.


Member Function Documentation

virtual std::auto_ptr<CdrIo> OSB_LIB::CdrIo::clone (  )  const [pure virtual]

Virtual copy constructor.

Implemented in OSB_LIB::CdrIoImpl.

virtual bool OSB_LIB::CdrIo::commitChanges (  )  [pure virtual]

Remove backup CDR files.

Returns:
true in case of success, else false.
Note:
This member function should not throw if an error occurs. The changes in the database have been commited and the operation should proceed as much as possible.
Instead any errors are written to log.

Implemented in OSB_LIB::CdrIoImpl.

virtual const Id<BsPage>& OSB_LIB::CdrIo::pageId (  )  const [pure virtual]

Id of the supported balance page.

Implemented in OSB_LIB::CdrIoImpl.

virtual void OSB_LIB::CdrIo::prepareWrite (  )  [pure virtual]

Prepare the CDR files for writing.

Exceptions:
OsbException for any error encountered.

Implemented in OSB_LIB::CdrIoImpl.

virtual void OSB_LIB::CdrIo::read ( CdrList dest  )  [pure virtual]

Retrieve the call details records of a balance page.

Parameters:
dest STL-container to store the CDR records.
Exceptions:
OsbException for any error encountered.

Implemented in OSB_LIB::CdrIoImpl.

virtual bool OSB_LIB::CdrIo::remove (  )  [pure virtual]

Remove related CDR files and directories from file system.

This function deletes all regular CDR files and, if empty, the directories below and including baseDir_.

Remarks:
The function does not stop if removal of CDR file fails, but continue to remove as many CDR files as possible.
Returns:
False if a regular CDR file cannnot be removed else true.

Implemented in OSB_LIB::CdrIoImpl.

virtual void OSB_LIB::CdrIo::replace ( const CdrList newCdrs,
Asn1Writer writer 
) [pure virtual]

Replace CDRs on the file system.

Parameters:
newCdrs STL container with new CDRs.
writer ASN.1 writer to use.
Exceptions:
OsbException for any error encountered.

Implemented in OSB_LIB::CdrIoImpl.

static void OSB_LIB::CdrIo::setBaseDir ( const std::string &  dir  )  [static]

Set the base directory.

virtual bool OSB_LIB::CdrIo::undoChanges (  )  [pure virtual]

Undo a previous call to write() or replace().

Returns:
true in case of success, else false.
Note:
This member function should not throw if an error occurs, because the recovery operation should proceed as much as possible. Instead any errors are written to log.

Implemented in OSB_LIB::CdrIoImpl.

virtual void OSB_LIB::CdrIo::write ( const CdrList cdrs,
Asn1Writer writer 
) [pure virtual]

Write CDRs to the file system.

Parameters:
cdrs List of call details records to write.
writer ASN.1 writer to use.
Exceptions:
OsbException for any error encountered.
Note:
Missing directories are created as needed.

Implemented in OSB_LIB::CdrIoImpl.


Member Data Documentation

std::string OSB_LIB::CdrIo::baseDir_ [static]

Base directory where all Cdrs are stored.

Definition at line 176 of file cdrio.h.

long OSB_LIB::CdrIo::maxFileSize_ [static]

Maximum file size for a CDR file (in bytes).

Definition at line 179 of file cdrio.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:15:12 2006 for OSB Library by  doxygen 1.4.7