cfnarecord.hxx

来自「vovida的软交换」· HXX 代码 · 共 89 行

HXX
89
字号
#ifndef CFNARECORD_HXX
#define CFNARECORD_HXX

#include "Record.hxx"
#include <ctime>

/** This class derives from 'Record' superclass to implement
 *  'CallForward on No Answer' Record.
 * 
 *  CFNARecord.hxx     version 1.0 -- 18 Mar 2003
 *                     Suha Cubukcuoglu
 */
 
 class CFNARecord : public Record
 {
     public:
          /** Constructor */
          CFNARecord();
         
          /** Destructor */
          ~CFNARecord();
          
         /**
          * populates this object from the database.
          * key is the key used to retrieve information, dbcon is a connection  
          * to the database (provided by the DBManager)
          */
         virtual bool populateRecord(KeyType key, DBConnection* dbcon);
 
         /**
          * amends this object in the database, returns true if nothing 
          * goes wrong
          */
         virtual bool amendRecord(DBConnection* dbconn);

         /**
          * deletes this object from the database, 
          * returns true if nothing goes wrong
          */
   
         virtual bool deleteRecord(DBConnection* dbconn);

         /**
          * inserts this object in the database, 
          * returns true if nothing goes wrong
          */
         virtual bool insertRecord(DBConnection* dbconn);

         /** 
          * This function queries the database and returns a 
          * list of all the relavent keys that could be used 
          * to retrieve records of this type
          */
         virtual KeyList getAllKeys(DBConnection* dbconn);

         virtual void displayRecord();
         
         /** sets user ID that this record is for */
         void setAccountID (int id) { accountID = id; };
         
         /** Activate/De-activate this feature */
         void setActivation (bool act) { activation = act; };

         /** set the ForwardTo address for 'No Answer' */
         void setForwardTo (string To) { forwardTo = To; };
         
         /** accessor to accountID */
         int getAccountID() { return accountID; };
         
         /** accessor to activation status */
         bool isActive() { return activation; };
 
         /** accessor to ForwardTo address */
         string getForwardTo() { return forwardTo; };        
         
     private:
     
          /** user ID associated with this record */
          int accountID;
          
          /** activation/de-activation constant */          
          bool activation;
          
          /** Address for forwarding a call */
          string forwardTo;
};

#endif /** CFNARECORD_HXX */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?