D:/Storage/CVS_Head/h323plus/include/opalvxml.h

00001 /*
00002  * opalvxml.h
00003  *
00004  * Header file for IVR code
00005  *
00006  * A H.323 IVR application.
00007  *
00008  * Copyright (C) 2002 Equivalence Pty. Ltd.
00009  *
00010  * The contents of this file are subject to the Mozilla Public License
00011  * Version 1.0 (the "License"); you may not use this file except in
00012  * compliance with the License. You may obtain a copy of the License at
00013  * http://www.mozilla.org/MPL/
00014  *
00015  * Software distributed under the License is distributed on an "AS IS"
00016  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00017  * the License for the specific language governing rights and limitations
00018  * under the License.
00019  *
00020  * The Original Code is Portable Windows Library.
00021  *
00022  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
00023  *
00024  * Contributor(s): ______________________________________.
00025  *
00026  * $Log: opalvxml.h,v $
00027  * Revision 1.1  2007/08/06 20:50:50  shorne
00028  * First commit of h323plus
00029  *
00030  * Revision 1.16  2004/07/15 11:20:37  rjongbloed
00031  * Migrated changes from crs_vxnml_devel branch into main trunk
00032  *
00033  * Revision 1.15.6.1  2004/07/07 07:10:11  csoutheren
00034  * Changed to use new factory based PWAVFile
00035  * Removed redundant blocking/unblocking when using G.723.1
00036  *
00037  * Revision 1.15  2002/09/16 01:14:15  robertj
00038  * Added #define so can select if #pragma interface/implementation is used on
00039  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00040  *
00041  * Revision 1.14  2002/08/27 02:21:07  craigs
00042  * Added silence detection capability to fake G.723.1codec
00043  *
00044  * Revision 1.13  2002/08/15 08:22:25  craigs
00045  * Added P_EXPAT test back in
00046  *
00047  * Revision 1.12  2002/08/15 04:55:26  robertj
00048  * Fixed shutdown problems with closing vxml session, leaks a thread.
00049  * Fixed potential problems with indirect channel Close() function.
00050  *
00051  * Revision 1.11  2002/08/06 06:00:38  craigs
00052  * Removed ifdef test for EXPLATFLAG
00053  *
00054  * Revision 1.10  2002/08/06 05:11:24  craigs
00055  * Moved most of stuff to ptclib
00056  *
00057  * Revision 1.9  2002/08/05 09:43:30  robertj
00058  * Added pragma interface/implementation
00059  * Moved virtual into .cxx file
00060  *
00061  * Revision 1.8  2002/07/29 15:13:51  craigs
00062  * Added autodelete option to PlayFile
00063  *
00064  * Revision 1.7  2002/07/18 04:17:12  robertj
00065  * Moved virtuals to source and changed name of G.723.1 file capability
00066  *
00067  * Revision 1.6  2002/07/10 13:16:19  craigs
00068  * Moved some VXML classes from Opal back into PTCLib
00069  * Added ability to repeat outputted data
00070  *
00071  * Revision 1.5  2002/07/09 08:27:23  craigs
00072  * Added GetMediaFormat to channels
00073  *
00074  * Revision 1.4  2002/07/03 01:53:58  craigs
00075  * Added newline to the end of the file for Linux
00076  *
00077  * Revision 1.3  2002/07/02 06:32:04  craigs
00078  * Added recording functions
00079  *
00080  * Revision 1.2  2002/06/28 02:42:54  craigs
00081  * Fixed problem with G.723.1 file codec not identified as native format
00082  *
00083  * Revision 1.1  2002/06/27 05:44:39  craigs
00084  * Initial version
00085  *
00086  * Revision 1.2  2002/06/26 09:05:28  csoutheren
00087  * Added ability to utter various "sayas" types within prompts
00088  *
00089  * Revision 1.1  2002/06/26 01:13:53  csoutheren
00090  * Disassociated VXML and Opal/OpenH323 specific elements
00091  *
00092  *
00093  */
00094 
00095 #ifndef _OpenIVR_OPALVXML_H
00096 #define _OpenIVR_OPALVXML_H
00097 
00098 #ifdef P_USE_PRAGMA
00099 #pragma interface
00100 #endif
00101 
00102 #include <ptclib/vxml.h>
00103 #include <opalwavfile.h>
00104 #include <ptclib/delaychan.h>
00105 #include <h323caps.h>
00106 #include <h245.h>
00107 #include <h323con.h>
00108 
00110 
00111 class G7231_File_Codec : public H323AudioCodec
00112 {
00113   PCLASSINFO(G7231_File_Codec, H323AudioCodec);
00114 
00115   public:
00116     G7231_File_Codec(Direction dir);
00117 
00118     unsigned GetBandwidth() const;
00119     static int GetFrameLen(int val);
00120       
00121     BOOL Read(BYTE * buffer, unsigned & length, RTP_DataFrame &);
00122     BOOL Write(const BYTE * buffer, unsigned length, const RTP_DataFrame & rtp, unsigned & frames);
00123 
00124     BOOL IsRawDataChannelNative() const;
00125 
00126     unsigned GetAverageSignalLevel();
00127 
00128   protected:
00129     int lastFrameLen;
00130 };  
00131 
00132 
00133 class G7231_File_Capability : public H323AudioCapability
00134 {
00135   PCLASSINFO(G7231_File_Capability, H323AudioCapability)
00136 
00137   public:
00138     G7231_File_Capability();
00139 
00140     unsigned GetSubType() const;
00141     PString GetFormatName() const;
00142 
00143     H323Codec * CreateCodec(H323Codec::Direction direction) const;
00144 
00145     BOOL OnSendingPDU(H245_AudioCapability & cap, unsigned packetSize) const;
00146     BOOL OnReceivedPDU(const H245_AudioCapability & pdu, unsigned & packetSize);
00147     PObject * Clone() const;
00148 };
00149 
00150 
00152 
00153 
00154 #if P_EXPAT
00155 
00156 class PTextToSpeech;
00157 
00158 class OpalVXMLSession : public PVXMLSession 
00159 {
00160   PCLASSINFO(OpalVXMLSession, PVXMLSession);
00161   public:
00162     OpalVXMLSession(H323Connection * _conn, PTextToSpeech * tts = NULL, BOOL autoDelete = FALSE);
00163     BOOL Close();
00164 
00165   protected:
00166     H323Connection * conn;
00167 };
00168 
00169 #endif
00170 
00171 #endif
00172 

Generated on Thu Oct 25 13:42:36 2007 for h323plus by  doxygen 1.5.2