ies.h

Go to the documentation of this file.
00001 /*
00002  *
00003  * Inter Asterisk Exchange 2
00004  * 
00005  * The classes used to hold Information Elements.
00006  * 
00007  * Open Phone Abstraction Library (OPAL)
00008  *
00009  * Copyright (c) 2005 Indranet Technologies Ltd.
00010  *
00011  * The contents of this file are subject to the Mozilla Public License
00012  * Version 1.0 (the "License"); you may not use this file except in
00013  * compliance with the License. You may obtain a copy of the License at
00014  * http://www.mozilla.org/MPL/
00015  *
00016  * Software distributed under the License is distributed on an "AS IS"
00017  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00018  * the License for the specific language governing rights and limitations
00019  * under the License.
00020  *
00021  * The Original Code is Open Phone Abstraction Library.
00022  *
00023  * The Initial Developer of the Original Code is Indranet Technologies Ltd.
00024  *
00025  * The author of this code is Derek J Smithies
00026  *
00027  *  $Log: ies.h,v $
00028  *  Revision 1.9  2007/09/05 04:04:35  csoutheren
00029  *  Fixed spelling mistakes
00030  *
00031  *  Revision 1.8  2007/04/19 06:17:21  csoutheren
00032  *  Fixes for precompiled headers with gcc
00033  *
00034  *  Revision 1.7  2006/09/11 03:08:51  dereksmithies
00035  *  Add fixes from Stephen Cook (sitiveni@gmail.com) for new patches to
00036  *  improve call handling. Notably, IAX2 call transfer. Many thanks.
00037  *  Thanks also to the Google summer of code for sponsoring this work.
00038  *
00039  *  Revision 1.6  2006/08/09 03:46:39  dereksmithies
00040  *  Add ability to register to a remote Asterisk box. The iaxProcessor class is split
00041  *  into a callProcessor and a regProcessor class.
00042  *  Big thanks to Stephen Cook, (sitiveni@gmail.com) for this work.
00043  *
00044  *  Revision 1.5  2006/06/16 01:47:08  dereksmithies
00045  *  Get the OnHold features of IAX2 to work correctly.
00046  *  Thanks to Stephen Cook, (sitiveni@gmail.com) for this work.
00047  *
00048  *  Revision 1.4  2006/01/31 03:28:47  csoutheren
00049  *  Removed compile warnings and changed functions args to const refs
00050  *
00051  *  Revision 1.3  2005/08/26 03:07:38  dereksmithies
00052  *  Change naming convention, so all class names contain the string "IAX2"
00053  *
00054  *  Revision 1.2  2005/08/24 01:38:38  dereksmithies
00055  *  Add encryption, iax2 style. Numerous tidy ups. Use the label iax2, not iax
00056  *
00057  *  Revision 1.1  2005/07/30 07:01:32  csoutheren
00058  *  Added implementation of IAX2 (Inter Asterisk Exchange 2) protocol
00059  *  Thanks to Derek Smithies of Indranet Technologies Ltd. for
00060  *  writing and contributing this code
00061  *
00062  *
00063  *
00064  *
00065  *
00066  */
00067 
00068 #ifndef IES_H
00069 #define IES_H
00070 
00071 #ifndef _PTLIB_H
00072 #include <ptlib.h>
00073 #endif
00074 
00075 #include <opal/buildopts.h>
00076 
00077 #include <ptlib/sockets.h>
00078 #include <iax2/iedata.h>
00079 
00080 #ifdef P_USE_PRAGMA
00081 #pragma interface
00082 #endif
00083 
00084 
00085 class IAX2Ie;
00086 class IAX2Encryption;
00087 
00089 class IAX2Ie : public PObject
00090 { 
00091   PCLASSINFO(IAX2Ie, PObject);
00092  public:
00094   enum IAX2IeTypeCode {    
00095     ie_calledNumber      = 1,     
00096     ie_callingNumber     = 2,     
00097     ie_callingAni        = 3,     
00098     ie_callingName       = 4,     
00099     ie_calledContext     = 5,     
00100     ie_userName          = 6,     
00101     ie_password          = 7,     
00102     ie_capability        = 8,     
00103     ie_format            = 9,     
00104     ie_language          = 10,    
00105     ie_version           = 11,    
00106     ie_adsicpe           = 12,    
00107     ie_dnid              = 13,    
00108     ie_authMethods       = 14,    
00109     ie_challenge         = 15,    
00110     ie_md5Result         = 16,    
00111     ie_rsaResult         = 17,    
00112     ie_apparentAddr      = 18,    
00113     ie_refresh           = 19,    
00114     ie_dpStatus          = 20,    
00115     ie_callNo            = 21,    
00116     ie_cause             = 22,    
00117     ie_iaxUnknown        = 23,    
00118     ie_msgCount          = 24,    
00119     ie_autoAnswer        = 25,    
00120     ie_musicOnHold       = 26,    
00121     ie_transferId        = 27,    
00122     ie_rdnis             = 28,    
00123     ie_provisioning      = 29,    
00124     ie_aesProvisioning   = 30,    
00125     ie_dateTime          = 31,    
00126     ie_deviceType        = 32,    
00127     ie_serviceIdent      = 33,    
00128     ie_firmwareVer       = 34,    
00129     ie_fwBlockDesc       = 35,    
00130     ie_fwBlockData       = 36,    
00131     ie_provVer           = 37,    
00132     ie_callingPres       = 38,    
00133     ie_callingTon        = 39,    
00134     ie_callingTns        = 40,    
00135     ie_samplingRate      = 41,    
00136     ie_causeCode         = 42,    
00137     ie_encryption        = 43,    
00138     ie_encKey            = 44,    
00139     ie_codecPrefs        = 45,    
00140     ie_recJitter         = 46,    
00141     ie_recLoss           = 47,    
00142     ie_recPackets        = 48,    
00143     ie_recDelay          = 49,    
00144     ie_recDropped        = 50,    
00145     ie_recOoo            = 51     
00146   };
00147   
00150   
00152   IAX2Ie();
00153   
00155   virtual ~IAX2Ie() { };
00157   
00161   static IAX2Ie *BuildInformationElement(BYTE _typeCode, BYTE length, BYTE *srcData);     
00162   
00164   virtual PBoolean IsValid() { return validData; }
00165   
00167   virtual BYTE GetLengthOfData() { return 0; }
00168   
00170   int GetBinarySize() { return 2 + GetLengthOfData(); }
00171   
00173   void PrintOn(ostream & str) const;
00174   
00176   virtual BYTE GetKeyValue() const  { return 255; }
00177   
00179   void SetData(int &/*newData*/) { PAssertAlways("Ie class cannnot set data value"); };
00180   
00182   int ReadData() { PAssertAlways("Ie class cannot read the internal data value"); return 0; };
00183   
00186   void WriteBinary(void *data, PINDEX & writeIndex);
00187   
00190   virtual void StoreDataIn(IAX2IeData &/*res*/) { PTRACE(0, "UNIMPLEMENTED FUNCTION"); }     
00192   
00193  protected:
00195   virtual void WriteBinary(BYTE * /*data*/) { PTRACE(0, "UNIMPLEMENTED FUNCTION"); }
00196   
00199   PBoolean   validData;
00200 };
00201 
00203 
00204 class IAX2IeInvalidElement : public IAX2Ie
00205 {
00206   PCLASSINFO(IAX2IeInvalidElement, IAX2Ie);
00207  public:
00208   IAX2IeInvalidElement() : IAX2Ie() {};
00209   
00211   virtual BYTE GetlengthOfData() { return 0; }
00212   
00214   void PrintOn(ostream & str) const
00215     { str << "Invlalid Information Element" << endl; }
00216  protected:
00219   virtual void WriteBinary(BYTE * /*data*/) {  }
00220 };
00222 
00223 class IAX2IeNone : public IAX2Ie
00224 {
00225   PCLASSINFO(IAX2IeNone, IAX2Ie);
00228   
00232   IAX2IeNone(BYTE length, BYTE *srcData);     
00233   
00235   IAX2IeNone() : IAX2Ie() {}
00237   
00241   virtual BYTE GetLengthOfData() { return 0; }
00242   
00244   BYTE GetValue() { return 0; }
00245   
00247   void PrintOn(ostream & str) const;
00248   
00250   void SetData(void * /*newData*/) { PAssertAlways("IeNone cannot set data"); }
00251   
00253   int ReadData() { PAssertAlways("IeNone cannot read the internal data value"); return 0; }
00254   
00256  protected:
00259   virtual void WriteBinary(BYTE * /*data*/) {  }
00260 };
00261 
00263 
00264 class IAX2IeByte : public IAX2Ie
00265 {
00266   PCLASSINFO(IAX2IeByte, IAX2Ie);
00269   
00273   IAX2IeByte(BYTE length, BYTE *srcData);     
00274   
00276   IAX2IeByte(BYTE newValue) : IAX2Ie() { SetData(newValue); }
00277   
00279   IAX2IeByte() : IAX2Ie() { }
00281   
00285   virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
00286   
00288   void PrintOn(ostream & str) const;
00289   
00291   void SetData(BYTE newData) { dataValue = newData; validData = PTrue; }
00292   
00294   BYTE ReadData() { return dataValue; }
00295   
00297  protected:
00299   virtual void WriteBinary(BYTE *data) { data[0] = dataValue; }
00300   
00302   BYTE dataValue;
00303 };
00304 
00306 
00307 class IAX2IeChar : public IAX2Ie
00308 {
00309   PCLASSINFO(IAX2IeChar, IAX2Ie);
00312   
00316   IAX2IeChar(BYTE length, BYTE *srcData);     
00317   
00319   IAX2IeChar(char newValue) : IAX2Ie() { SetData(newValue); }
00320   
00322   IAX2IeChar() : IAX2Ie() { }
00324   
00328   virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
00329   
00331   void PrintOn(ostream & str) const;
00332   
00334   void SetData(char newData) { dataValue = newData; validData = PTrue; }
00335   
00337   char ReadData() { return dataValue; }
00338   
00340  protected:
00342   virtual void WriteBinary(BYTE *data) { data[0] = dataValue; }
00343   
00345   char dataValue;
00346 };
00347 
00349 
00350 class IAX2IeShort : public IAX2Ie
00351 {
00352   PCLASSINFO(IAX2IeShort, IAX2Ie);
00355   
00359   IAX2IeShort(BYTE length, BYTE *srcData);     
00360   
00362   IAX2IeShort(short newValue) : IAX2Ie() { SetData(newValue); }
00363   
00365   IAX2IeShort() : IAX2Ie() { }
00367   
00371   virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
00372   
00374   void PrintOn(ostream & str) const;
00375   
00377   void SetData(short newData) { dataValue = newData; validData = PTrue; }
00378   
00380   short ReadData() { return dataValue; }  
00382  protected:
00384   virtual void WriteBinary(BYTE *data);
00385   
00387   short dataValue;
00388 };
00390 
00391 class IAX2IeInt : public IAX2Ie
00392 {
00393   PCLASSINFO(IAX2IeInt, IAX2Ie);
00396   
00400   IAX2IeInt(BYTE length, BYTE *srcData);     
00401   
00403   IAX2IeInt(int  newValue) : IAX2Ie() { SetData(newValue); }
00404   
00406   IAX2IeInt() : IAX2Ie() { }
00408   
00412   virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
00413   
00415   void PrintOn(ostream & str) const;
00416   
00418   void SetData(int newData) { dataValue = newData; validData = PTrue; }
00419   
00421   int ReadData() { return dataValue; }
00422   
00424  protected:
00426   virtual void WriteBinary(BYTE *data);
00427   
00429   int dataValue;
00430 };
00432 
00433 class IAX2IeUShort : public IAX2Ie
00434 {
00435   PCLASSINFO(IAX2IeUShort, IAX2Ie);
00438   
00442   IAX2IeUShort(BYTE length, BYTE *srcData);     
00443   
00445   IAX2IeUShort(unsigned short newValue) : IAX2Ie() { SetData(newValue); }
00446   
00448   IAX2IeUShort() : IAX2Ie() {}
00450   
00454   virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
00455   
00457   void PrintOn(ostream & str) const;
00458   
00460   void SetData(unsigned short newData) { dataValue = newData; validData = PTrue; }
00461   
00463   unsigned short ReadData() { return dataValue; }         
00465  protected:
00467   virtual void WriteBinary(BYTE *data);
00468   
00470   unsigned short dataValue;
00471 };
00473 
00474 class IAX2IeUInt : public IAX2Ie
00475 {
00476   PCLASSINFO(IAX2IeUInt, IAX2Ie);
00479   
00483   IAX2IeUInt(BYTE length, BYTE *srcData);     
00484   
00486   IAX2IeUInt() : IAX2Ie() {}
00487   
00489   IAX2IeUInt(unsigned int newValue) { SetData(newValue); }
00491   
00495   virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
00496   
00498   void PrintOn(ostream & str) const;
00499   
00501   void SetData(unsigned int &newData) { dataValue = newData; validData = PTrue; }
00502   
00504   unsigned int ReadData() { return dataValue; }          
00506   
00507  protected:
00509   virtual void WriteBinary(BYTE *data);
00510   
00512   unsigned int dataValue;
00513 };
00514 
00516 
00517 class IAX2IeString : public IAX2Ie
00518 {
00519   PCLASSINFO(IAX2IeString, IAX2Ie);
00522   
00523  public:
00527   IAX2IeString(BYTE length, BYTE *srcData);     
00528   
00530   IAX2IeString(const PString & newValue) : IAX2Ie() { SetData(newValue); }
00531   
00533   IAX2IeString(const char * newValue) : IAX2Ie() { SetData(newValue); }
00534   
00536   IAX2IeString() : IAX2Ie() {}
00538   
00542   virtual BYTE GetLengthOfData();
00543   
00545   void PrintOn(ostream & str) const;
00546   
00548   void SetData(const PString & newData);
00549   
00551   void SetData(const char * newData);
00552   
00554   PString ReadData() { return dataValue; }          
00556   
00557  protected:
00559   virtual void WriteBinary(BYTE *data);
00560   
00562   PString dataValue;
00563 };
00565 
00566 class IAX2IeDateAndTime : public IAX2Ie
00567 {
00568   PCLASSINFO(IAX2IeDateAndTime, IAX2Ie);
00571   
00572  public:
00576   IAX2IeDateAndTime(BYTE length, BYTE *srcData);     
00577   
00579   IAX2IeDateAndTime(const PTime & newValue) : IAX2Ie() { SetData(newValue); }
00580   
00582   IAX2IeDateAndTime() : IAX2Ie() {}
00584   
00588   void PrintOn(ostream & str) const;
00589   
00591   virtual BYTE GetLengthOfData() { return 4; }
00592   
00594   void SetData(const PTime & newData) { dataValue = newData; validData = PTrue; }
00595   
00597   PTime ReadData() { return dataValue; }
00599  protected:
00601   virtual void WriteBinary(BYTE *data);
00602   
00604   PTime dataValue;
00605 };
00607 
00608 class IAX2IeBlockOfData : public IAX2Ie
00609 {
00610   PCLASSINFO(IAX2IeBlockOfData, IAX2Ie);
00613   
00614  public:
00618   IAX2IeBlockOfData(BYTE length, BYTE *srcData);     
00619   
00621   IAX2IeBlockOfData(const PBYTEArray & newData) : IAX2Ie() { SetData(newData); }
00622   
00624   IAX2IeBlockOfData() : IAX2Ie() {}
00626   
00630   void PrintOn(ostream & str) const;
00631   
00633   virtual BYTE GetLengthOfData() { return (BYTE)dataValue.GetSize(); }
00634   
00636   void SetData(const PBYTEArray & newData) { dataValue = newData; validData = PTrue; }
00637   
00639   PBYTEArray ReadData() { return dataValue; }
00640   
00642  protected:
00644   virtual void WriteBinary(BYTE *data);
00645   
00647   PBYTEArray dataValue;
00648 };
00650 
00651 class IAX2IeSockaddrIn : public IAX2Ie
00652 {
00653   PCLASSINFO(IAX2IeSockaddrIn, IAX2Ie);
00656   
00657  public:
00661   IAX2IeSockaddrIn(BYTE length, BYTE *srcData);     
00662   
00664   IAX2IeSockaddrIn(const PIPSocket::Address & addr, PINDEX port) : IAX2Ie() { SetData(addr, port); }
00665   
00667   IAX2IeSockaddrIn() : IAX2Ie() {}
00668   
00670   ~IAX2IeSockaddrIn() { } ;
00672   
00676   void PrintOn(ostream & str) const;
00677   
00679   virtual BYTE GetLengthOfData() { return sizeof(struct sockaddr_in); }
00680   
00681   
00683   void SetData(const PIPSocket::Address & newAddr, PINDEX newPort) 
00684     { dataValue = newAddr; portNumber = newPort; validData = PTrue; }
00685   
00687   PIPSocket::Address ReadData() { return dataValue; }
00688   
00690  protected:
00692   virtual void WriteBinary(BYTE *data);
00693   
00695   PIPSocket::Address dataValue;
00696   
00698   PINDEX               portNumber;
00699 };
00700 
00702 
00703 class IAX2IeCalledNumber : public IAX2IeString
00704 {
00705   PCLASSINFO(IAX2IeCalledNumber, IAX2IeString);
00706  public:
00710   IAX2IeCalledNumber(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) {};
00711   
00713   IAX2IeCalledNumber(const PString & newValue) { SetData(newValue); }
00714   
00716   void PrintOn(ostream & str) const;
00717   
00719   virtual BYTE GetKeyValue() const  { return ie_calledNumber; }
00720   
00723   virtual void StoreDataIn(IAX2IeData &res) { res.calledNumber = dataValue; }
00724  protected:
00725 };
00727 
00728 class IAX2IeCallingNumber : public IAX2IeString
00729 {
00730   PCLASSINFO(IAX2IeCallingNumber, IAX2IeString);
00731  public:
00735   IAX2IeCallingNumber(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
00736   
00738   IAX2IeCallingNumber(const PString & newValue)  { SetData(newValue); } 
00739   
00741   void PrintOn(ostream & str) const;
00742   
00744   virtual BYTE GetKeyValue() const  { return ie_callingNumber; }
00745   
00748   virtual void StoreDataIn(IAX2IeData &res) { res.callingNumber = dataValue; }     
00749  protected:
00750 };
00751 
00753 
00754 class IAX2IeCallingAni : public IAX2IeString
00755 {
00756   PCLASSINFO(IAX2IeCallingAni, IAX2IeString);
00757  public:
00761   IAX2IeCallingAni(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
00762   
00764   IAX2IeCallingAni(const PString & newValue) { SetData(newValue); }
00765   
00767   void PrintOn(ostream & str) const;
00768   
00770   virtual BYTE GetKeyValue() const  { return ie_callingAni; }
00771   
00774   virtual void StoreDataIn(IAX2IeData &res) { res.callingAni = dataValue; }     
00775  protected:
00776 };
00777 
00779 
00780 class IAX2IeCallingName : public IAX2IeString
00781 {
00782   PCLASSINFO(IAX2IeCallingName, IAX2IeString);
00783  public:
00787   IAX2IeCallingName(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
00788   
00790   IAX2IeCallingName(const PString & newValue) { SetData(newValue); }
00791   
00793   void PrintOn(ostream & str) const;
00794   
00796   virtual BYTE GetKeyValue() const  { return ie_callingName; }
00797   
00800   virtual void StoreDataIn(IAX2IeData &res) { res.callingName = dataValue; }     
00801  protected:
00802 };
00803 
00805 
00806 class IAX2IeCalledContext : public IAX2IeString
00807 {
00808   PCLASSINFO(IAX2IeCalledContext, IAX2IeString);
00809  public:
00813   IAX2IeCalledContext(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
00814   
00816   IAX2IeCalledContext(const PString & newValue) { SetData(newValue); }
00817   
00819   void PrintOn(ostream & str) const;
00820   
00822   virtual BYTE GetKeyValue() const  { return ie_calledContext; }
00823   
00826   virtual void StoreDataIn(IAX2IeData &res) { res.calledContext = dataValue; }     
00827  protected:
00828 };
00829 
00831 
00832 class IAX2IeUserName : public IAX2IeString
00833 {
00834   PCLASSINFO(IAX2IeUserName, IAX2IeString);
00835  public:
00839   IAX2IeUserName(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
00840   
00842   IAX2IeUserName(const PString & newValue)  { SetData(newValue); }
00843   
00845   void PrintOn(ostream & str) const;
00846   
00848   virtual BYTE GetKeyValue() const  { return ie_userName; }
00849   
00852   virtual void StoreDataIn(IAX2IeData &res) { res.userName = dataValue; }     
00853  protected:
00854 };
00855 
00857 
00858 class IAX2IePassword : public IAX2IeString
00859 {
00860   PCLASSINFO(IAX2IePassword, IAX2IeString);
00861  public:
00865   IAX2IePassword(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
00866   
00868   IAX2IePassword(const PString & newValue) { SetData(newValue); }
00869   
00871   void PrintOn(ostream & str) const;
00872   
00874   virtual BYTE GetKeyValue() const  { return ie_password; }
00875   
00878   virtual void StoreDataIn(IAX2IeData &res) { res.password = dataValue; }     
00879  protected:
00880 };
00881 
00883 
00884 class IAX2IeCapability : public IAX2IeUInt
00885 {
00886   PCLASSINFO(IAX2IeCapability, IAX2IeUInt);
00887  public:
00891   IAX2IeCapability(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
00892   
00894   IAX2IeCapability(unsigned int newValue) : IAX2IeUInt(newValue) { }
00895   
00897   void PrintOn(ostream & str) const;
00898   
00900   virtual BYTE GetKeyValue() const  { return ie_capability; }
00901   
00904   virtual void StoreDataIn(IAX2IeData &res) { res.capability = dataValue; }     
00905  protected:
00906 };
00907 
00909 
00910 class IAX2IeFormat : public IAX2IeUInt
00911 {
00912   PCLASSINFO(IAX2IeFormat, IAX2IeUInt);
00913  public:
00917   IAX2IeFormat(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
00918   
00920   IAX2IeFormat(unsigned int newValue) : IAX2IeUInt(newValue) { }
00921   
00923   void PrintOn(ostream & str) const;
00924   
00926   virtual BYTE GetKeyValue() const  { return ie_format; }
00927   
00930   virtual void StoreDataIn(IAX2IeData &res) { res.format = dataValue; }     
00931  protected:
00932 };
00933 
00935 
00936 class IAX2IeLanguage : public IAX2IeString
00937 {
00938   PCLASSINFO(IAX2IeLanguage, IAX2IeString);
00939  public:
00943   IAX2IeLanguage(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
00944   
00946   IAX2IeLanguage(const PString & newValue) { SetData(newValue); }
00947   
00949   void PrintOn(ostream & str) const;
00950   
00952   virtual BYTE GetKeyValue() const  { return ie_language; }
00953   
00956   virtual void StoreDataIn(IAX2IeData &res) { res.language = dataValue; }     
00957  protected:
00958 };
00959 
00961 
00962 class IAX2IeVersion : public IAX2IeShort
00963 {
00964   PCLASSINFO(IAX2IeVersion, IAX2IeShort);
00965  public:
00969   IAX2IeVersion(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
00970   
00972   IAX2IeVersion() { dataValue = 2; validData = PTrue; }
00973   
00975   void PrintOn(ostream & str) const;
00976   
00978   virtual BYTE GetKeyValue() const  { return ie_version; }
00979   
00982   virtual void StoreDataIn(IAX2IeData &res) { res.version = dataValue; }     
00983  protected:
00984 };
00985 
00987 
00988 class IAX2IeAdsicpe : public IAX2IeShort
00989 {
00990   PCLASSINFO(IAX2IeAdsicpe, IAX2IeShort);
00991  public:
00995   IAX2IeAdsicpe(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
00996   
00998   void PrintOn(ostream & str) const;
00999   
01001   virtual BYTE GetKeyValue() const  { return ie_adsicpe; }
01002   
01005   virtual void StoreDataIn(IAX2IeData &res) { res.adsicpe = dataValue; }     
01006  protected:
01007 };
01008 
01010 
01011 class IAX2IeDnid : public IAX2IeString
01012 {
01013   PCLASSINFO(IAX2IeDnid, IAX2IeString);
01014  public:
01018   IAX2IeDnid(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
01019   
01021   IAX2IeDnid(const PString & newValue)  { SetData(newValue); }
01022   
01024   void PrintOn(ostream & str) const;
01025   
01027   virtual BYTE GetKeyValue() const  { return ie_dnid; }
01028   
01031   virtual void StoreDataIn(IAX2IeData &res) { res.dnid = dataValue; }     
01032  protected:
01033 };
01034 
01036 
01037 class IAX2IeAuthMethods : public IAX2IeShort
01038 {
01039   PCLASSINFO(IAX2IeAuthMethods, IAX2IeShort);
01040  public:
01044   IAX2IeAuthMethods(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
01045   
01047   IAX2IeAuthMethods(short newValue) { SetData(newValue); }
01048   
01050   void PrintOn(ostream & str) const;
01051   
01053   virtual BYTE GetKeyValue() const  { return ie_authMethods; }
01054   
01057   virtual void StoreDataIn(IAX2IeData &res) { res.authMethods = dataValue; }     
01058   
01060   static PBoolean IsRsaAuthentication(short testValue) { return InternalIsRsa(testValue); }
01061   
01063   static PBoolean IsMd5Authentication(short testValue) { return InternalIsMd5(testValue); }
01064   
01066   static PBoolean IsPlainTextAuthentication(short testValue) { return InternalIsPlainText(testValue); }     
01067   
01069   PBoolean IsRsaAuthentication() { if (IsValid()) return InternalIsRsa(dataValue); else return PFalse; }
01070   
01072   PBoolean IsMd5Authentication() { if (IsValid()) return InternalIsMd5(dataValue); else return PFalse; }
01073   
01075   PBoolean IsPlainTextAuthentication() { if (IsValid()) return InternalIsPlainText(dataValue); else return PFalse; }
01076   
01077  protected:
01078   
01080   static PBoolean InternalIsRsa(short testValue) { return testValue  & 0x04; }
01081   
01083   static PBoolean InternalIsMd5(short testValue) { return testValue  & 0x02; }
01084   
01086   static PBoolean InternalIsPlainText(short testValue) { return testValue  & 0x01; }
01087 };
01088 
01090 
01091 class IAX2IeChallenge : public IAX2IeString
01092 {
01093   PCLASSINFO(IAX2IeChallenge, IAX2IeString);
01094  public:
01098   IAX2IeChallenge(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
01099   
01101   IAX2IeChallenge(const PString & newValue) { SetData(newValue); }
01102   
01104   void PrintOn(ostream & str) const;
01105   
01107   virtual BYTE GetKeyValue() const  { return ie_challenge; }
01108   
01111   virtual void StoreDataIn(IAX2IeData &res) { res.challenge = dataValue; }     
01112  protected:
01113 };
01114 
01116 
01117 class IAX2IeMd5Result : public IAX2IeString
01118 {
01119   PCLASSINFO(IAX2IeMd5Result, IAX2IeString);
01120  public:
01124   IAX2IeMd5Result(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
01125   
01127   IAX2IeMd5Result(const PString & newValue) { SetData(newValue); }
01128   
01130   IAX2IeMd5Result(const PString & challenge, const PString & password);
01131   
01133   IAX2IeMd5Result(IAX2Encryption & encryption);
01134   
01136   void InitializeChallengePassword(const PString & newChallenge, const PString & newPassword);
01137 
01139   void PrintOn(ostream & str) const;
01140   
01142   virtual BYTE GetKeyValue() const  { return ie_md5Result; }
01143   
01146   virtual void StoreDataIn(IAX2IeData &res) { res.md5Result = dataValue; }     
01147 
01150   PBYTEArray & GetDataBlock() { return dataBlock; }
01151 
01152  protected:
01153 
01155   PBYTEArray dataBlock;
01156 };
01157 
01159 
01160 class IAX2IeRsaResult : public IAX2IeString
01161 {
01162   PCLASSINFO(IAX2IeRsaResult, IAX2IeString);
01163  public:
01167   IAX2IeRsaResult(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
01168   
01170   IAX2IeRsaResult(const PString & newValue) { SetData(newValue); }
01171   
01173   void PrintOn(ostream & str) const;
01174   
01176   virtual BYTE GetKeyValue() const  { return ie_rsaResult; }
01177   
01180   virtual void StoreDataIn(IAX2IeData &res) { res.rsaResult = dataValue; }
01181  protected:
01182 };
01183 
01185 
01186 class IAX2IeApparentAddr : public IAX2IeSockaddrIn
01187 {
01188   PCLASSINFO(IAX2IeApparentAddr, IAX2IeSockaddrIn);
01189  public:
01193   IAX2IeApparentAddr(BYTE length, BYTE *srcData) : IAX2IeSockaddrIn(length, srcData) { };
01194   
01196   ~IAX2IeApparentAddr() { };
01197   
01199   void PrintOn(ostream & str) const;
01200   
01202   virtual BYTE GetKeyValue() const  { return ie_apparentAddr; }
01203   
01206   virtual void StoreDataIn(IAX2IeData &res) { res.apparentAddr = dataValue; }     
01207  protected:
01208 };
01209 
01211 
01212 class IAX2IeRefresh : public IAX2IeShort
01213 {
01214   PCLASSINFO(IAX2IeRefresh, IAX2IeShort);
01215  public:
01219   IAX2IeRefresh(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
01220   
01222   IAX2IeRefresh(short refreshTime) : IAX2IeShort(refreshTime) { };
01223   
01225   void PrintOn(ostream & str) const;
01226   
01228   virtual BYTE GetKeyValue() const  { return ie_refresh; }
01229   
01232   virtual void StoreDataIn(IAX2IeData &res) { res.refresh = dataValue; }     
01233  protected:
01234 };
01235 
01237 
01238 class IAX2IeDpStatus : public IAX2IeShort
01239 {
01240   PCLASSINFO(IAX2IeDpStatus, IAX2IeShort);
01241  public:
01245   IAX2IeDpStatus(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
01246   
01248   void PrintOn(ostream & str) const;
01249   
01251   virtual BYTE GetKeyValue() const  { return ie_dpStatus; }
01252   
01255   virtual void StoreDataIn(IAX2IeData &res) { res.dpStatus = dataValue; }     
01256  protected:
01257 };
01258 
01260 
01261 class IAX2IeCallNo : public IAX2IeShort
01262 {
01263   PCLASSINFO(IAX2IeCallNo, IAX2IeShort);
01264  public:
01268   IAX2IeCallNo(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
01269   
01271   void PrintOn(ostream & str) const;
01272   
01274   virtual BYTE GetKeyValue() const  { return ie_callNo; }
01275   
01278   virtual void StoreDataIn(IAX2IeData &res) { res.callNo = dataValue; }     
01279  protected:
01280 };
01281 
01283 
01284 class IAX2IeCause : public IAX2IeString
01285 {
01286   PCLASSINFO(IAX2IeCause, IAX2IeString);
01287  public:
01291   IAX2IeCause(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
01292   
01294   IAX2IeCause(const PString & newValue) : IAX2IeString(newValue) { }
01295   
01297   IAX2IeCause(const char *newValue) : IAX2IeString(newValue) { }
01298   
01300   void PrintOn(ostream & str) const;
01301   
01303   virtual BYTE GetKeyValue() const  { return ie_cause; }
01304   
01307   virtual void StoreDataIn(IAX2IeData &res) { res.cause = dataValue; }     
01308  protected:
01309 };
01310 
01312 
01313 class IAX2IeIaxUnknown : public IAX2IeByte
01314 {
01315   PCLASSINFO(IAX2IeIaxUnknown, IAX2IeByte);
01316  public:
01320   IAX2IeIaxUnknown(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
01321   
01323   IAX2IeIaxUnknown(BYTE newValue) : IAX2IeByte(newValue) { }
01324   
01326   void PrintOn(ostream & str) const;
01327   
01329   virtual BYTE GetKeyValue() const  { return ie_iaxUnknown; }
01330   
01333   virtual void StoreDataIn(IAX2IeData &res) { res.iaxUnknown = dataValue; }     
01334  protected:
01335 };
01336 
01338 
01339 class IAX2IeMsgCount : public IAX2IeShort
01340 {
01341   PCLASSINFO(IAX2IeMsgCount, IAX2IeShort);
01342  public:
01346   IAX2IeMsgCount(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
01347   
01349   void PrintOn(ostream & str) const;
01350   
01352   virtual BYTE GetKeyValue() const  { return ie_msgCount; }
01353   
01356   virtual void StoreDataIn(IAX2IeData &res) { res.msgCount = dataValue; }     
01357  protected:
01358 };
01359 
01361 
01362 class IAX2IeAutoAnswer : public IAX2IeNone
01363 {
01364   PCLASSINFO(IAX2IeAutoAnswer, IAX2IeNone);
01365  public:
01369   IAX2IeAutoAnswer(BYTE length, BYTE *srcData) : IAX2IeNone(length, srcData) { };
01370   
01372   void PrintOn(ostream & str) const;
01373   
01375   virtual BYTE GetKeyValue() const  { return ie_autoAnswer; }
01376   
01379   virtual void StoreDataIn(IAX2IeData &res) { res.autoAnswer = PTrue;; }     
01380  protected:
01381 };
01382 
01384 
01385 class IAX2IeMusicOnHold : public IAX2IeNone
01386 {
01387   PCLASSINFO(IAX2IeMusicOnHold, IAX2IeNone);
01388  public:
01392   IAX2IeMusicOnHold(BYTE length, BYTE *srcData) : IAX2IeNone(length, srcData) { };
01393   
01395   IAX2IeMusicOnHold() : IAX2IeNone() { };
01396   
01398   void PrintOn(ostream & str) const;
01399   
01401   virtual BYTE GetKeyValue() const  { return ie_musicOnHold; }
01402   
01405   virtual void StoreDataIn(IAX2IeData &res) { res.musicOnHold = PTrue; }     
01406  protected:
01407 };
01408 
01410 
01411 class IAX2IeTransferId : public IAX2IeInt
01412 {
01413   PCLASSINFO(IAX2IeTransferId, IAX2IeInt);
01414  public:
01418   IAX2IeTransferId(BYTE length, BYTE *srcData) : IAX2IeInt(length, srcData) { };
01419   
01421   void PrintOn(ostream & str) const;
01422   
01424   virtual BYTE GetKeyValue() const  { return ie_transferId; }
01425   
01428   virtual void StoreDataIn(IAX2IeData &res) { res.transferId = dataValue; }     
01429  protected:
01430 };
01431 
01433 
01434 class IAX2IeRdnis : public IAX2IeString
01435 {
01436   PCLASSINFO(IAX2IeRdnis, IAX2IeString);
01437  public:
01441   IAX2IeRdnis(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
01442   
01444   void PrintOn(ostream & str) const;
01445   
01447   virtual BYTE GetKeyValue() const  { return ie_rdnis; }
01448   
01451   virtual void StoreDataIn(IAX2IeData &res) { res.rdnis = dataValue; }     
01452  protected:
01453 };
01454 
01456 
01457 class IAX2IeProvisioning : public IAX2IeBlockOfData
01458 {
01459   PCLASSINFO(IAX2IeProvisioning, IAX2IeBlockOfData);
01460  public:
01464   IAX2IeProvisioning(BYTE length, BYTE *srcData) : IAX2IeBlockOfData   (length, srcData) { };
01465   
01467   void PrintOn(ostream & str) const;
01468   
01470   virtual BYTE GetKeyValue() const  { return ie_provisioning; }
01471   
01474   virtual void StoreDataIn(IAX2IeData &/*res*/) {  }     
01475  protected:
01476 };
01477 
01479 
01480 class IAX2IeAesProvisioning : public IAX2IeNone
01481 {
01482   PCLASSINFO(IAX2IeAesProvisioning, IAX2IeNone);
01483  public:
01487   IAX2IeAesProvisioning(BYTE length, BYTE *srcData) : IAX2IeNone(length, srcData) { };
01488   
01490   void PrintOn(ostream & str) const;
01491   
01493   virtual BYTE GetKeyValue() const  { return ie_aesProvisioning; }
01494   
01497   virtual void StoreDataIn(IAX2IeData &/*res*/) {  }     
01498  protected:
01499 };
01500 
01502 
01503 class IAX2IeDateTime : public IAX2IeDateAndTime
01504 {
01505   PCLASSINFO(IAX2IeDateTime, IAX2IeDateAndTime);
01506  public:
01510   IAX2IeDateTime(BYTE length, BYTE *srcData) : IAX2IeDateAndTime(length, srcData) { };
01511   
01513   void PrintOn(ostream & str) const;
01514   
01516   virtual BYTE GetKeyValue() const  { return ie_dateTime; }
01517   
01520   virtual void StoreDataIn(IAX2IeData &res) { res.dateTime = dataValue; }     
01521  protected:
01522 };
01523 
01525 
01526 class IAX2IeDeviceType : public IAX2IeString
01527 {
01528   PCLASSINFO(IAX2IeDeviceType, IAX2IeString);
01529  public:
01533   IAX2IeDeviceType(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
01534   
01536   void PrintOn(ostream & str) const;
01537   
01539   virtual BYTE GetKeyValue() const  { return ie_deviceType; }
01540   
01543   virtual void StoreDataIn(IAX2IeData &res) { res.deviceType = dataValue; }     
01544  protected:
01545 };
01546 
01548 
01549 class IAX2IeServiceIdent : public IAX2IeString
01550 {
01551   PCLASSINFO(IAX2IeServiceIdent, IAX2IeString);
01552  public:
01556   IAX2IeServiceIdent(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
01557   
01559   void PrintOn(ostream & str) const;
01560   
01562   virtual BYTE GetKeyValue() const  { return ie_serviceIdent; }
01563   
01566   virtual void StoreDataIn(IAX2IeData &res) { res.serviceIdent = dataValue; }     
01567  protected:
01568 };
01569 
01571 
01572 class IAX2IeFirmwareVer : public IAX2IeShort
01573 {
01574   PCLASSINFO(IAX2IeFirmwareVer, IAX2IeShort);
01575  public:
01579   IAX2IeFirmwareVer(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
01580   
01582   void PrintOn(ostream & str) const;
01583   
01585   virtual BYTE GetKeyValue() const  { return ie_firmwareVer; }
01586   
01589   virtual void StoreDataIn(IAX2IeData &res) { res.firmwareVer = dataValue; }     
01590  protected:
01591 };
01592 
01594 
01595 class IAX2IeFwBlockDesc : public IAX2IeUInt
01596 {
01597   PCLASSINFO(IAX2IeFwBlockDesc, IAX2IeUInt);
01598  public:
01602   IAX2IeFwBlockDesc(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
01603   
01605   IAX2IeFwBlockDesc(unsigned int newValue) : IAX2IeUInt(newValue) { }
01606   
01608   void PrintOn(ostream & str) const;
01609   
01611   virtual BYTE GetKeyValue() const  { return ie_fwBlockDesc; }
01612   
01615   virtual void StoreDataIn(IAX2IeData &res) { res.fwBlockDesc = dataValue; }     
01616  protected:
01617 };
01618 
01620 
01621 class IAX2IeFwBlockData : public IAX2IeBlockOfData
01622 {
01623   PCLASSINFO(IAX2IeFwBlockData, IAX2IeBlockOfData);
01624  public:
01628   IAX2IeFwBlockData(BYTE length, BYTE *srcData) : IAX2IeBlockOfData(length, srcData) { };
01629   
01631   void PrintOn(ostream & str) const;
01632   
01634   virtual BYTE GetKeyValue() const  { return ie_fwBlockData; }
01635   
01638   virtual void StoreDataIn(IAX2IeData &res) { res.fwBlockData = dataValue; }     
01639  protected:
01640 };
01641 
01643 
01644 class IAX2IeProvVer : public IAX2IeUInt
01645 {
01646   PCLASSINFO(IAX2IeProvVer, IAX2IeUInt);
01647  public:
01651   IAX2IeProvVer(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
01652   
01654   IAX2IeProvVer(unsigned int newValue) : IAX2IeUInt(newValue) { }
01655   
01657   void PrintOn(ostream & str) const;
01658   
01660   virtual BYTE GetKeyValue() const  { return ie_provVer; }
01661   
01664   virtual void StoreDataIn(IAX2IeData &res) { res.provVer = dataValue; }     
01665  protected:
01666 };
01667 
01669 
01670 class IAX2IeCallingPres : public IAX2IeByte
01671 {
01672   PCLASSINFO(IAX2IeCallingPres, IAX2IeByte);
01673  public:
01677   IAX2IeCallingPres(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
01678   
01680   void PrintOn(ostream & str) const;
01681   
01683   virtual BYTE GetKeyValue() const  { return ie_callingPres; }
01684   
01687   virtual void StoreDataIn(IAX2IeData &res) { res.callingPres = dataValue; }     
01688  protected:
01689 };
01690 
01692 
01693 class IAX2IeCallingTon : public IAX2IeByte
01694 {
01695   PCLASSINFO(IAX2IeCallingTon, IAX2IeByte);
01696  public:
01700   IAX2IeCallingTon(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
01701   
01703   void PrintOn(ostream & str) const;
01704   
01706   virtual BYTE GetKeyValue() const  { return ie_callingTon; }
01707   
01710   virtual void StoreDataIn(IAX2IeData &res) { res.callingTon = dataValue; }     
01711  protected:
01712 };
01713 
01715 
01716 class IAX2IeCallingTns : public IAX2IeUShort
01717 {
01718   PCLASSINFO(IAX2IeCallingTns, IAX2IeUShort);
01719  public:
01723   IAX2IeCallingTns(BYTE length, BYTE *srcData) : IAX2IeUShort(length, srcData) { };
01724   
01726   void PrintOn(ostream & str) const;
01727   
01729   virtual BYTE GetKeyValue() const  { return ie_callingTns; }
01730   
01733   virtual void StoreDataIn(IAX2IeData &res) { res.callingTns = dataValue; }     
01734  protected:
01735 };
01736 
01738 
01739 class IAX2IeSamplingRate : public IAX2IeUShort
01740 {
01741   PCLASSINFO(IAX2IeSamplingRate, IAX2IeUShort);
01742  public:
01746   IAX2IeSamplingRate(BYTE length, BYTE *srcData) : IAX2IeUShort(length, srcData) { };
01747   
01749   void PrintOn(ostream & str) const;
01750   
01752   virtual BYTE GetKeyValue() const  { return ie_samplingRate; }
01753   
01756   virtual void StoreDataIn(IAX2IeData &res) { res.samplingRate = dataValue; }     
01757  protected:
01758 };
01759 
01761 
01762 class IAX2IeEncryption : public IAX2IeUShort
01763 {
01764   PCLASSINFO(IAX2IeEncryption, IAX2IeUShort);
01765  public:
01767   enum IAX2IeEncryptionMethod {
01768     encryptAes128 = 1    
01769   };
01770 
01772   IAX2IeEncryption(IAX2IeEncryptionMethod method = encryptAes128);
01773 
01777   IAX2IeEncryption(BYTE length, BYTE *srcData) : IAX2IeUShort(length, srcData) { };
01778   
01780   void PrintOn(ostream & str) const;
01781   
01783   virtual BYTE GetKeyValue() const  { return ie_encryption; }
01784   
01787   virtual void StoreDataIn(IAX2IeData &res) { res.encryptionMethods = dataValue; }
01788  protected:
01789 };
01790 
01792 
01793 class IAX2IeEncKey : public IAX2IeString
01794 {
01795   PCLASSINFO(IAX2IeEncKey, IAX2IeString);
01796  public:
01800   IAX2IeEncKey(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
01801   
01803   void PrintOn(ostream & str) const;
01804   
01806   virtual BYTE GetKeyValue() const  { return ie_encKey; }
01807   
01810   virtual void StoreDataIn(IAX2IeData &res) { res.encKey = dataValue; }     
01811  protected:
01812 };
01813 
01815 
01816 class IAX2IeCodecPrefs : public IAX2IeByte
01817 {
01818   PCLASSINFO(IAX2IeCodecPrefs, IAX2IeByte);
01819  public:
01823   IAX2IeCodecPrefs(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
01824   
01826   void PrintOn(ostream & str) const;
01827   
01829   virtual BYTE GetKeyValue() const  { return ie_codecPrefs; }
01830   
01833   virtual void StoreDataIn(IAX2IeData &res) { res.codecPrefs = dataValue; }     
01834  protected:
01835 };
01836 
01838 
01839 class IAX2IeReceivedJitter : public IAX2IeUInt
01840 {
01841   PCLASSINFO(IAX2IeReceivedJitter, IAX2IeUInt);
01842  public:
01846   IAX2IeReceivedJitter(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
01847   
01849   void PrintOn(ostream & str) const;
01850   
01852   virtual BYTE GetKeyValue() const  { return ie_recJitter; }
01853   
01856   virtual void StoreDataIn(IAX2IeData &res) { res.receivedJitter = dataValue; }     
01857  protected:
01858 };
01859 
01861 
01862 class IAX2IeReceivedLoss : public IAX2IeUInt
01863 {
01864   PCLASSINFO(IAX2IeReceivedLoss, IAX2IeUInt);
01865  public:
01869   IAX2IeReceivedLoss(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
01870   
01872   void PrintOn(ostream & str) const;
01873   
01875   virtual BYTE GetKeyValue() const  { return ie_recLoss; }
01876   
01879   virtual void StoreDataIn(IAX2IeData &res) { res.receivedLoss = dataValue; }     
01880  protected:
01881 };
01882 
01884 
01885 class IAX2IeReceivedFrames : public IAX2IeUInt
01886 {
01887   PCLASSINFO(IAX2IeReceivedFrames, IAX2IeUInt);
01888  public:
01892   IAX2IeReceivedFrames(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
01893   
01895   void PrintOn(ostream & str) const;
01896   
01898   virtual BYTE GetKeyValue() const  { return ie_recPackets; }
01899   
01902   virtual void StoreDataIn(IAX2IeData &res) { res.receivedPackets = dataValue; }     
01903  protected:
01904 };
01905 
01907 
01908 class IAX2IeReceivedDelay : public IAX2IeUShort
01909 {
01910   PCLASSINFO(IAX2IeReceivedDelay, IAX2IeUShort);
01911  public:
01915   IAX2IeReceivedDelay(BYTE length, BYTE *srcData) : IAX2IeUShort(length, srcData) { };
01916   
01918   void PrintOn(ostream & str) const;
01919   
01921   virtual BYTE GetKeyValue() const  { return ie_recDelay; }
01922   
01925   virtual void StoreDataIn(IAX2IeData &res) { res.receivedDelay = dataValue; }     
01926  protected:
01927 };
01928 
01930 
01931 class IAX2IeDroppedFrames : public IAX2IeUInt
01932 {
01933   PCLASSINFO(IAX2IeDroppedFrames, IAX2IeUInt);
01934  public:
01938   IAX2IeDroppedFrames(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
01939   
01941   void PrintOn(ostream & str) const;
01942   
01944   virtual BYTE GetKeyValue() const  { return ie_recDropped; }
01945   
01948   virtual void StoreDataIn(IAX2IeData &res) { res.receivedDropped = dataValue; }     
01949  protected:
01950 };
01951 
01953 
01954 class IAX2IeReceivedOoo : public IAX2IeUInt
01955 {
01956   PCLASSINFO(IAX2IeReceivedOoo, IAX2IeUInt);
01957  public:
01961   IAX2IeReceivedOoo(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
01962   
01964   void PrintOn(ostream & str) const;
01965   
01967   virtual BYTE GetKeyValue() const  { return ie_recOoo; }
01968   
01971   virtual void StoreDataIn(IAX2IeData &res) { res.receivedOoo = dataValue; }     
01972  protected:
01973 };
01974 
01976 
01977 
01978 PDECLARE_LIST (IAX2IeList, IAX2Ie *)
01979 #ifdef DOC_PLUS_PLUS 
01980 
01981 class IAX2IeList : public IAX2Ie *
01982 {
01983 #endif
01984  public:
01986   ~IAX2IeList();
01987   
01991   IAX2Ie *RemoveIeAt(PINDEX i);
01992   
01996   IAX2Ie *RemoveLastIe();
01997   
01999   void Initialise() {  DisallowDeleteObjects(); }
02000   
02002   void DeleteAt(PINDEX idex);
02003   
02005   PBoolean Empty() const { return GetSize() == 0; }
02006   
02008   PBoolean IsEmpty() const { return GetSize() == 0; }
02009   
02011   void AppendIe(IAX2Ie *newMember) { Append(newMember);}
02012   
02014   int GetBinaryDataSize() const;
02015   
02017   IAX2Ie * GetIeAt(int i) const;
02018   
02019  protected:
02020   
02021 };
02022 
02023 
02024 #endif // IAX_IES_H
02025 
02026 /* The comment below is magic for those who use emacs to edit this file. */
02027 /* With the comment below, the tab key does auto indent to 4 spaces.     */
02028 
02029 /*
02030  * Local Variables:
02031  * mode:c
02032  * c-file-style:linux
02033  * c-basic-offset:2
02034  * End:
02035  */

Generated on Mon Sep 22 12:24:51 2008 for OPAL by  doxygen 1.5.1