aboutsummaryrefslogtreecommitdiffstats
path: root/channels/h323/ast_h323.h
diff options
context:
space:
mode:
authorjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-23 02:43:41 +0000
committerjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-23 02:43:41 +0000
commitbd20fa0774b99b20cff58500f50d5fd02073b3f0 (patch)
tree219515e9ad19a7f8dc069f93a3eb579ce786e326 /channels/h323/ast_h323.h
parent56467260392efd129b41efbf5b7f111ffca751bd (diff)
implement type=alias to deprecate type=h323 and a whole lot more code clean up
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4052 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323/ast_h323.h')
-rwxr-xr-xchannels/h323/ast_h323.h129
1 files changed, 33 insertions, 96 deletions
diff --git a/channels/h323/ast_h323.h b/channels/h323/ast_h323.h
index b04f57c95..564d9422b 100755
--- a/channels/h323/ast_h323.h
+++ b/channels/h323/ast_h323.h
@@ -30,8 +30,7 @@
#define AST_H323_H
/** These need to be redefined here because the C++
- side of this driver is blind to the asterisk headers */
-
+ side of this driver is blind to the asterisk headers */
/*! G.723.1 compression */
#define AST_FORMAT_G723_1 (1 << 0)
/*! GSM compression */
@@ -61,31 +60,16 @@ class H323_G7231Capability : public H323AudioCapability
{
PCLASSINFO(H323_G7231Capability, H323AudioCapability);
public:
- H323_G7231Capability(
- BOOL annexA = TRUE /// Enable Annex A silence insertion descriptors
- );
- Comparison Compare(const PObject & obj) const;
-
- PObject * Clone() const;
-
- virtual H323Codec * CreateCodec(
- H323Codec::Direction direction /// Direction in which this instance runs
- ) const;
-
+ H323_G7231Capability(BOOL annexA = TRUE);
+ Comparison Compare(const PObject & obj) const;
+ PObject * Clone() const;
+ virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
unsigned GetSubType() const;
- PString GetFormatName() const;
- BOOL OnSendingPDU(
- H245_AudioCapability & pdu, /// PDU to set information on
- unsigned packetSize /// Packet size to use in capability
- ) const;
-
- BOOL OnReceivedPDU(
- const H245_AudioCapability & pdu, /// PDU to get information from
- unsigned & packetSize /// Packet size to use in capability
- );
-
+ PString GetFormatName() const;
+ BOOL OnSendingPDU(H245_AudioCapability & pdu, unsigned packetSize) const;
+ BOOL OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize);
protected:
- BOOL annexA;
+ BOOL annexA;
};
/**This class describes the (fake) G729 codec capability.
@@ -95,100 +79,56 @@ class AST_G729Capability : public H323AudioCapability
PCLASSINFO(AST_G729Capability, H323AudioCapability);
public:
- /**@name Construction */
- //@{
- /**Create a new G.729 capability.
- */
AST_G729Capability();
- //@}
-
- /**@name Overrides from class PObject */
- //@{
- /**Create a copy of the object.
- */
+ /* Create a copy of the object. */
virtual PObject * Clone() const;
- //@}
-
- /**@name Operations */
- //@{
- /**Create the codec instance, allocating resources as required.
- */
- virtual H323Codec * CreateCodec(
- H323Codec::Direction direction /// Direction in which this instance runs
- ) const;
- //@}
-
- /**@name Identification functions */
- //@{
- /**Get the sub-type of the capability. This is a code dependent on the
+
+ /* Create the codec instance, allocating resources as required. */
+ virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
+
+ /* Get the sub-type of the capability. This is a code dependent on the
main type of the capability.
This returns one of the four possible combinations of mode and speed
- using the enum values of the protocol ASN H245_AudioCapability class.
- */
+ using the enum values of the protocol ASN H245_AudioCapability class. */
virtual unsigned GetSubType() const;
- /**Get the name of the media data format this class represents.
- */
+ /* Get the name of the media data format this class represents. */
virtual PString GetFormatName() const;
- //@}
-};
+};
-/**This class describes the VoiceAge G729A codec capability.
- */
+/* This class describes the VoiceAge G729A codec capability. */
class AST_G729ACapability : public H323AudioCapability
{
PCLASSINFO(AST_G729ACapability, H323AudioCapability);
public:
- /**@name Construction */
- //@{
- /**Create a new G.729A capability.
- */
+ /* Create a new G.729A capability. */
AST_G729ACapability();
- //@}
- /**@name Overrides from class PObject */
- //@{
- /**Create a copy of the object.
- */
+ /* Create a copy of the object. */
virtual PObject * Clone() const;
- //@}
-
- /**@name Operations */
- //@{
- /**Create the codec instance, allocating resources as required.
- */
- virtual H323Codec * CreateCodec(
- H323Codec::Direction direction /// Direction in which this instance runs
- ) const;
- //@}
-
- /**@name Identification functions */
- //@{
- /**Get the sub-type of the capability. This is a code dependent on the
+ /* Create the codec instance, allocating resources as required. */
+ virtual H323Codec * CreateCodec(H323Codec::Direction direction) const;
+
+ /* Get the sub-type of the capability. This is a code dependent on the
main type of the capability.
This returns one of the four possible combinations of mode and speed
- using the enum values of the protocol ASN H245_AudioCapability class.
- */
+ using the enum values of the protocol ASN H245_AudioCapability class. */
virtual unsigned GetSubType() const;
- /**Get the name of the media data format this class represents.
- */
+ /* Get the name of the media data format this class represents. */
virtual PString GetFormatName() const;
- //@}
};
-
class MyH323EndPoint : public H323EndPoint {
PCLASSINFO(MyH323EndPoint, H323EndPoint);
public:
-
- int MakeCall(const PString &, PString &, unsigned int *, unsigned int, char *, char *s);
+ int MakeCall(const PString &, PString &, unsigned int *, unsigned int, char *, char *);
BOOL ClearCall(const PString &);
void OnClosedLogicalChannel(H323Connection &, const H323Channel &);
@@ -198,13 +138,10 @@ class MyH323EndPoint : public H323EndPoint {
void SendUserTone(const PString &, char);
H323Capabilities GetCapabilities(void);
BOOL OnConnectionForwarded(H323Connection &, const PString &, const H323SignalPDU &);
-
BOOL ForwardConnection(H323Connection &, const PString &, const H323SignalPDU &);
-
- PStringArray SupportedPrefixes;
-
void SetEndpointTypeInfo( H225_EndpointType & info ) const;
void SetGateway(void);
+ PStringArray SupportedPrefixes;
};
class MyH323Connection : public H323Connection {
@@ -214,13 +151,14 @@ class MyH323Connection : public H323Connection {
public:
MyH323Connection(MyH323EndPoint &, unsigned, unsigned);
~MyH323Connection();
-
H323Channel * CreateRealTimeLogicalChannel(const H323Capability &,
H323Channel::Directions,
unsigned,
const H245_H2250LogicalChannelParameters *,
RTP_QOS *);
- H323Connection::AnswerCallResponse OnAnswerCall(const PString &, const H323SignalPDU &, H323SignalPDU &);
+ H323Connection::AnswerCallResponse OnAnswerCall(const PString &,
+ const H323SignalPDU &,
+ H323SignalPDU &);
void OnReceivedReleaseComplete(const H323SignalPDU &);
BOOL OnAlerting(const H323SignalPDU &, const PString &);
BOOL OnSendReleaseComplete(H323SignalPDU &);
@@ -253,7 +191,6 @@ class MyH323_ExternalRTPChannel : public H323_ExternalRTPChannel {
Directions direction,
unsigned sessionID);
- /* Destructor */
~MyH323_ExternalRTPChannel();
/* Overrides */
@@ -270,7 +207,7 @@ class MyH323_ExternalRTPChannel : public H323_ExternalRTPChannel {
/**
* The MyProcess is a necessary descendant PProcess class so that the H323EndPoint
- * objected to be created from within that class. (Who owns main() problem).
+ * objected to be created from within that class. (Solves the who owns main() problem).
*/
class MyProcess : public PProcess {