#include <svcctrl.h>
Inheritance diagram for H323CallCreditServiceControl:

Public Member Functions | |
Construction | |
| H323CallCreditServiceControl (const PString &amount, BOOL mode, unsigned duration=0) | |
| H323CallCreditServiceControl (const H225_ServiceControlDescriptor &contents) | |
Operations | |
| virtual BOOL | IsValid () const |
| virtual BOOL | OnReceivedPDU (const H225_ServiceControlDescriptor &contents) |
| virtual BOOL | OnSendingPDU (H225_ServiceControlDescriptor &contents) const |
| virtual void | OnChange (unsigned type, unsigned sessionId, H323EndPoint &endpoint, H323Connection *connection) const |
| serviceType | GetType () |
| void | GetValue (PString &_amount, BOOL &_credit, unsigned &_time) |
Protected Attributes | |
| PString | amount |
| BOOL | mode |
| unsigned | durationLimit |
Definition at line 312 of file svcctrl.h.
| H323CallCreditServiceControl::H323CallCreditServiceControl | ( | const PString & | amount, | |
| BOOL | mode, | |||
| unsigned | duration = 0 | |||
| ) |
Create a new handler for a Service Control.
Definition at line 196 of file svcctrl.cxx.
| H323CallCreditServiceControl::H323CallCreditServiceControl | ( | const H225_ServiceControlDescriptor & | contents | ) |
Create a new handler for a Service Control, initialise to PDU.
Definition at line 206 of file svcctrl.cxx.
References OnReceivedPDU().
| BOOL H323CallCreditServiceControl::IsValid | ( | ) | const [virtual] |
Determine of the session is valid. That is has all of the data it needs to correctly encode a PDU.
Default behaviour returns TRUE if amount or duration is set.
Implements H323ServiceControlSession.
Definition at line 212 of file svcctrl.cxx.
References amount, and durationLimit.
| BOOL H323CallCreditServiceControl::OnReceivedPDU | ( | const H225_ServiceControlDescriptor & | contents | ) | [virtual] |
Handle a received PDU. Update in the internal state from the received PDU.
Default behaviour gets the contents for an e_callCreditServiceControl.
Implements H323ServiceControlSession.
Definition at line 218 of file svcctrl.cxx.
References amount, durationLimit, H225_CallCreditServiceControl::e_amountString, H225_CallCreditServiceControl::e_billingMode, H225_ServiceControlDescriptor::e_callCreditServiceControl, H225_CallCreditServiceControl::e_callDurationLimit, H225_CallCreditServiceControl_billingMode::e_debit, H225_CallCreditServiceControl::m_amountString, H225_CallCreditServiceControl::m_billingMode, H225_CallCreditServiceControl::m_callDurationLimit, and mode.
Referenced by H323CallCreditServiceControl().
| BOOL H323CallCreditServiceControl::OnSendingPDU | ( | H225_ServiceControlDescriptor & | contents | ) | const [virtual] |
Handle a sent PDU. Set the PDU fields from in the internal state.
Default behaviour sets the contents to an e_callCreditServiceControl.
Implements H323ServiceControlSession.
Definition at line 242 of file svcctrl.cxx.
References amount, durationLimit, H225_CallCreditServiceControl::e_amountString, H225_CallCreditServiceControl::e_billingMode, H225_ServiceControlDescriptor::e_callCreditServiceControl, H225_CallCreditServiceControl::e_callDurationLimit, H225_CallCreditServiceControl_billingMode::e_credit, H225_CallCreditServiceControl_billingMode::e_debit, H225_CallCreditServiceControl::e_enforceCallDurationLimit, H225_CallCreditServiceControl::m_amountString, H225_CallCreditServiceControl::m_billingMode, H225_CallCreditServiceControl::m_callDurationLimit, H225_CallCreditServiceControl::m_enforceCallDurationLimit, and mode.
| void H323CallCreditServiceControl::OnChange | ( | unsigned | type, | |
| unsigned | sessionId, | |||
| H323EndPoint & | endpoint, | |||
| H323Connection * | connection | |||
| ) | const [virtual] |
Handle a change of the state of the Service Control Session.
Default behaviour calls endpoint.OnCallCreditServiceControl() and optionally connection->SetEnforceDurationLimit().
Implements H323ServiceControlSession.
Definition at line 267 of file svcctrl.cxx.
References amount, durationLimit, mode, H323EndPoint::OnCallCreditServiceControl(), and H323Connection::SetEnforcedDurationLimit().
1.5.2