OPAL Version 3.10.4

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

ies.h
Go to the documentation of this file.
1 /*
2 *
3 * Inter Asterisk Exchange 2
4 *
5 * The classes used to hold Information Elements.
6 *
7 * Open Phone Abstraction Library (OPAL)
8 *
9 * Copyright (c) 2005 Indranet Technologies Ltd.
10 *
11 * The contents of this file are subject to the Mozilla Public License
12 * Version 1.0 (the "License"); you may not use this file except in
13 * compliance with the License. You may obtain a copy of the License at
14 * http://www.mozilla.org/MPL/
15 *
16 * Software distributed under the License is distributed on an "AS IS"
17 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
18 * the License for the specific language governing rights and limitations
19 * under the License.
20 *
21 * The Original Code is Open Phone Abstraction Library.
22 *
23 * The Initial Developer of the Original Code is Indranet Technologies Ltd.
24 *
25 * The author of this code is Derek J Smithies
26 *
27 * $Revision: 24625 $
28 * $Author: dereksmithies $
29 * $Date: 2010-08-08 17:41:30 -0500 (Sun, 08 Aug 2010) $
30 */
31
32 #ifndef OPAL_IAX2_IES_H
33 #define OPAL_IAX2_IES_H
34
35 #ifndef _PTLIB_H
36 #include <ptlib.h>
37 #endif
38
39 #include <opal/buildopts.h>
40
41 #if OPAL_IAX2
42
43 #include <ptlib/sockets.h>
44 #include <iax2/iedata.h>
45
46 #ifdef P_USE_PRAGMA
47 #pragma interface
48 #endif
49
50
51 class IAX2Ie;
52 class IAX2Encryption;
53
55 class IAX2Ie : public PObject
56 {
57 PCLASSINFO(IAX2Ie, PObject);
58 public:
60 enum IAX2IeTypeCode {
61 ie_calledNumber = 1,
62 ie_callingNumber = 2,
63 ie_callingAni = 3,
64 ie_callingName = 4,
65 ie_calledContext = 5,
66 ie_userName = 6,
67 ie_password = 7,
68 ie_capability = 8,
69 ie_format = 9,
70 ie_language = 10,
71 ie_version = 11,
72 ie_adsicpe = 12,
73 ie_dnid = 13,
74 ie_authMethods = 14,
75 ie_challenge = 15,
76 ie_md5Result = 16,
77 ie_rsaResult = 17,
78 ie_apparentAddr = 18,
79 ie_refresh = 19,
80 ie_dpStatus = 20,
81 ie_callNo = 21,
82 ie_cause = 22,
83 ie_iaxUnknown = 23,
84 ie_msgCount = 24,
85 ie_autoAnswer = 25,
86 ie_musicOnHold = 26,
87 ie_transferId = 27,
88 ie_rdnis = 28,
89 ie_provisioning = 29,
90 ie_aesProvisioning = 30,
91 ie_dateTime = 31,
92 ie_deviceType = 32,
93 ie_serviceIdent = 33,
94 ie_firmwareVer = 34,
95 ie_fwBlockDesc = 35,
96 ie_fwBlockData = 36,
97 ie_provVer = 37,
98 ie_callingPres = 38,
99 ie_callingTon = 39,
100 ie_callingTns = 40,
101 ie_samplingRate = 41,
102 ie_causeCode = 42,
103 ie_encryption = 43,
104 ie_encKey = 44,
105 ie_codecPrefs = 45,
106 ie_recJitter = 46,
107 ie_recLoss = 47,
108 ie_recPackets = 48,
109 ie_recDelay = 49,
110 ie_recDropped = 50,
111 ie_recOoo = 51,
112 ie_variable = 52,
113 ie_ospToken = 53,
114 ie_callToken = 54,
115 ie_capability2 = 55,
116 ie_format2 = 56,
117 ie_countEntries
118 };
119
122
124 IAX2Ie();
125
127 virtual ~IAX2Ie() { };
129
133 static IAX2Ie *BuildInformationElement(BYTE _typeCode, BYTE length, BYTE *srcData);
134
136 virtual PBoolean IsValid() { return validData; }
137
139 virtual BYTE GetLengthOfData() { return 0; }
140
142 int GetBinarySize() { return 2 + GetLengthOfData(); }
143
145 virtual void PrintOn(ostream & str) const;
146
148 virtual BYTE GetKeyValue() const { return 255; }
149
151 void SetData(int &/*newData*/) { PAssertAlways("Ie class cannnot set data value"); };
152
154 int ReadData() { PAssertAlways("Ie class cannot read the internal data value"); return 0; };
155
158 void WriteBinary(void *data, PINDEX & writeIndex);
159
162 virtual void StoreDataIn(IAX2IeData &/*res*/) { PAssertAlways(PUnimplementedFunction); }
164
165 protected:
167 virtual void WriteBinary(BYTE * /*data*/) { PAssertAlways(PUnimplementedFunction); }
168
171 PBoolean validData;
172 };
173
175
176 class IAX2IeInvalidElement : public IAX2Ie
177 {
178 PCLASSINFO(IAX2IeInvalidElement, IAX2Ie);
179 public:
180 IAX2IeInvalidElement() : IAX2Ie() {};
181
184 virtual BYTE GetlengthOfData() { return 0; }
185
187 virtual void PrintOn(ostream & str) const
188 { str << "Invlalid Information Element" << endl; }
189 protected:
193 virtual void WriteBinary(BYTE * /*data*/) { }
194 };
196
197 class IAX2IeNone : public IAX2Ie
198 {
199 PCLASSINFO(IAX2IeNone, IAX2Ie);
202
206 IAX2IeNone(BYTE length, BYTE *srcData);
207
209 IAX2IeNone() : IAX2Ie() {}
211
215 virtual BYTE GetLengthOfData() { return 0; }
216
218 BYTE GetValue() { return 0; }
219
221 virtual void PrintOn(ostream & str) const;
222
224 void SetData(void * /*newData*/)
225 { PAssertAlways("IeNone cannot set data"); }
226
228 int ReadData() { PAssertAlways("IeNone cannot read the internal data value"); return 0; }
229
231 protected:
234 virtual void WriteBinary(BYTE * /*data*/) { }
235 };
236
238
239 class IAX2IeByte : public IAX2Ie
240 {
241 PCLASSINFO(IAX2IeByte, IAX2Ie);
244
248 IAX2IeByte(BYTE length, BYTE *srcData);
249
251 IAX2IeByte(BYTE newValue) : IAX2Ie() { SetData(newValue); }
252
254 IAX2IeByte() : IAX2Ie() { }
256
260 virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
261
263 virtual void PrintOn(ostream & str) const;
264
266 void SetData(BYTE newData) { dataValue = newData; validData = true; }
267
269 BYTE ReadData() { return dataValue; }
270
272 protected:
275 virtual void WriteBinary(BYTE *data) { data[0] = dataValue; }
276
278 BYTE dataValue;
279 };
280
282
283 class IAX2IeChar : public IAX2Ie
284 {
285 PCLASSINFO(IAX2IeChar, IAX2Ie);
288
292 IAX2IeChar(BYTE length, BYTE *srcData);
293
295 IAX2IeChar(char newValue) : IAX2Ie() { SetData(newValue); }
296
298 IAX2IeChar() : IAX2Ie() { }
300
304 virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
305
307 virtual void PrintOn(ostream & str) const;
308
310 void SetData(char newData) { dataValue = newData; validData = true; }
311
313 char ReadData() { return dataValue; }
314
316 protected:
319 virtual void WriteBinary(BYTE *data) { data[0] = dataValue; }
320
322 char dataValue;
323 };
324
326
327 class IAX2IeShort : public IAX2Ie
328 {
329 PCLASSINFO(IAX2IeShort, IAX2Ie);
332
336 IAX2IeShort(BYTE length, BYTE *srcData);
337
339 IAX2IeShort(short newValue) : IAX2Ie() { SetData(newValue); }
340
342 IAX2IeShort() : IAX2Ie() { }
344
348 virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
349
351 virtual void PrintOn(ostream & str) const;
352
354 void SetData(short newData) { dataValue = newData; validData = true; }
355
357 short ReadData() { return dataValue; }
359 protected:
362 virtual void WriteBinary(BYTE *data);
363
365 short dataValue;
366 };
368
369 class IAX2IeInt : public IAX2Ie
370 {
371 PCLASSINFO(IAX2IeInt, IAX2Ie);
374
378 IAX2IeInt(BYTE length, BYTE *srcData);
379
381 IAX2IeInt(int newValue) : IAX2Ie() { SetData(newValue); }
382
384 IAX2IeInt() : IAX2Ie() { }
386
390 virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
391
393 virtual void PrintOn(ostream & str) const;
394
396 void SetData(int newData) { dataValue = newData; validData = true; }
397
399 int ReadData() { return dataValue; }
400
402 protected:
405 virtual void WriteBinary(BYTE *data);
406
408 int dataValue;
409 };
411
412 class IAX2IeUShort : public IAX2Ie
413 {
414 PCLASSINFO(IAX2IeUShort, IAX2Ie);
417
421 IAX2IeUShort(BYTE length, BYTE *srcData);
422
424 IAX2IeUShort(unsigned short newValue) : IAX2Ie() { SetData(newValue); }
425
427 IAX2IeUShort() : IAX2Ie() {}
429
433 virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
434
436 virtual void PrintOn(ostream & str) const;
437
439 void SetData(unsigned short newData) { dataValue = newData; validData = true; }
440
442 unsigned short ReadData() { return dataValue; }
444 protected:
447 virtual void WriteBinary(BYTE *data);
448
450 unsigned short dataValue;
451 };
453
454 class IAX2IeUInt : public IAX2Ie
455 {
456 PCLASSINFO(IAX2IeUInt, IAX2Ie);
459
463 IAX2IeUInt(BYTE length, BYTE *srcData);
464
466 IAX2IeUInt() : IAX2Ie() {}
467
469 IAX2IeUInt(unsigned int newValue) { SetData(newValue); }
471
475 virtual BYTE GetLengthOfData() { return sizeof(dataValue); }
476
478 virtual void PrintOn(ostream & str) const;
479
481 void SetData(unsigned int &newData) { dataValue = newData; validData = true; }
482
484 unsigned int ReadData() { return dataValue; }
486
487 protected:
490 virtual void WriteBinary(BYTE *data);
491
493 unsigned int dataValue;
494 };
495
497
498 class IAX2IeString : public IAX2Ie
499 {
500 PCLASSINFO(IAX2IeString, IAX2Ie);
503
504 public:
508 IAX2IeString(BYTE length, BYTE *srcData);
509
511 IAX2IeString(const PString & newValue) : IAX2Ie() { SetData(newValue); }
512
514 IAX2IeString(const char * newValue) : IAX2Ie() { SetData(newValue); }
515
517 IAX2IeString() : IAX2Ie() {}
519
523 virtual BYTE GetLengthOfData();
524
526 void PrintOn(ostream & str) const;
527
529 void SetData(const PString & newData);
530
532 void SetData(const char * newData);
533
535 PString ReadData() { return dataValue; }
537
538 protected:
541 virtual void WriteBinary(BYTE *data);
542
544 PString dataValue;
545 };
546
548
550 class IAX2IeBinary : public IAX2Ie
551 {
552 PCLASSINFO(IAX2IeBinary, IAX2Ie);
555
556 public:
561 IAX2IeBinary(BYTE length, BYTE *srcData);
562
564 IAX2IeBinary(PBYTEArray newValue) : IAX2Ie() { SetData(newValue); }
565
567 IAX2IeBinary() : IAX2Ie() {}
569
573 virtual BYTE GetLengthOfData() { return (BYTE)dataValue.GetSize(); }
574
576 virtual void PrintOn(ostream & str) const;
577
579 void SetData(const PBYTEArray & newData);
580
582 void GetData(PBYTEArray & answer);
583
586 void CopyData(IAX2IeBinary *src);
588
589 protected:
592 virtual void WriteBinary(BYTE *data);
593
595 PBYTEArray dataValue;
596 };
597
598
600
601 class IAX2IeDateAndTime : public IAX2Ie
602 {
603 PCLASSINFO(IAX2IeDateAndTime, IAX2Ie);
606
607 public:
611 IAX2IeDateAndTime(BYTE length, BYTE *srcData);
612
614 IAX2IeDateAndTime(const PTime & newValue) : IAX2Ie() { SetData(newValue); }
615
617 IAX2IeDateAndTime() : IAX2Ie() {}
619
623 virtual void PrintOn(ostream & str) const;
624
626 virtual BYTE GetLengthOfData() { return 4; }
627
629 void SetData(const PTime & newData)
630 { dataValue = newData; validData = true; }
631
633 PTime ReadData() { return dataValue; }
635 protected:
638 virtual void WriteBinary(BYTE *data);
639
641 PTime dataValue;
642 };
644
645 class IAX2IeBlockOfData : public IAX2Ie
646 {
647 PCLASSINFO(IAX2IeBlockOfData, IAX2Ie);
650
651 public:
655 IAX2IeBlockOfData(BYTE length, BYTE *srcData);
656
658 IAX2IeBlockOfData(const PBYTEArray & newData) : IAX2Ie() { SetData(newData); }
659
661 IAX2IeBlockOfData() : IAX2Ie() {}
663
667 virtual void PrintOn(ostream & str) const;
668
670 virtual BYTE GetLengthOfData() { return (BYTE)dataValue.GetSize(); }
671
673 void SetData(const PBYTEArray & newData)
674 { dataValue = newData; validData = true; }
675
677 PBYTEArray ReadData() { return dataValue; }
678
680 protected:
683 virtual void WriteBinary(BYTE *data);
684
686 PBYTEArray dataValue;
687 };
689
690 class IAX2IeSockaddrIn : public IAX2Ie
691 {
692 PCLASSINFO(IAX2IeSockaddrIn, IAX2Ie);
695
696 public:
700 IAX2IeSockaddrIn(BYTE length, BYTE *srcData);
701
703 IAX2IeSockaddrIn(const PIPSocket::Address & addr, PINDEX port) : IAX2Ie()
704 { SetData(addr, port); }
705
707 IAX2IeSockaddrIn() : IAX2Ie() {}
708
710 ~IAX2IeSockaddrIn() { } ;
712
716 virtual void PrintOn(ostream & str) const;
717
719 virtual BYTE GetLengthOfData() { return sizeof(struct sockaddr_in); }
720
722 void SetData(const PIPSocket::Address & newAddr, PINDEX newPort)
723 { dataValue = newAddr; portNumber = newPort; validData = true; }
724
726 PIPSocket::Address ReadData() { return dataValue; }
727
729 protected:
732 virtual void WriteBinary(BYTE *data);
733
735 PIPSocket::Address dataValue;
736
738 PINDEX portNumber;
739 };
740
742
743 class IAX2IeCalledNumber : public IAX2IeString
744 {
745 PCLASSINFO(IAX2IeCalledNumber, IAX2IeString);
746 public:
750 IAX2IeCalledNumber(BYTE length, BYTE *srcData)
751 : IAX2IeString(length, srcData) {};
752
754 IAX2IeCalledNumber(const PString & newValue) { SetData(newValue); }
755
757 virtual void PrintOn(ostream & str) const;
758
760 virtual BYTE GetKeyValue() const { return ie_calledNumber; }
761
765 virtual void StoreDataIn(IAX2IeData &res) { res.calledNumber = dataValue; }
766 protected:
767 };
769
771 class IAX2IeCallingNumber : public IAX2IeString
772 {
773 PCLASSINFO(IAX2IeCallingNumber, IAX2IeString);
774 public:
778 IAX2IeCallingNumber(BYTE length, BYTE *srcData)
779 : IAX2IeString(length, srcData) { };
780
782 IAX2IeCallingNumber(const PString & newValue) { SetData(newValue); }
783
785 virtual void PrintOn(ostream & str) const;
786
788 virtual BYTE GetKeyValue() const { return ie_callingNumber; }
789
793 virtual void StoreDataIn(IAX2IeData &res)
794 { res.callingNumber = dataValue; }
795 protected:
796 };
797
799
800 class IAX2IeCallingAni : public IAX2IeString
801 {
802 PCLASSINFO(IAX2IeCallingAni, IAX2IeString);
803 public:
807 IAX2IeCallingAni(BYTE length, BYTE *srcData)
808 : IAX2IeString(length, srcData) { };
809
811 IAX2IeCallingAni(const PString & newValue) { SetData(newValue); }
812
814 virtual void PrintOn(ostream & str) const;
815
817 virtual BYTE GetKeyValue() const { return ie_callingAni; }
818
822 virtual void StoreDataIn(IAX2IeData &res)
823 { res.callingAni = dataValue; }
824 protected:
825 };
826
828
829 class IAX2IeCallingName : public IAX2IeString
830 {
831 PCLASSINFO(IAX2IeCallingName, IAX2IeString);
832 public:
836 IAX2IeCallingName(BYTE length, BYTE *srcData)
837 : IAX2IeString(length, srcData) { };
838
840 IAX2IeCallingName(const PString & newValue) { SetData(newValue); }
841
843 virtual void PrintOn(ostream & str) const;
844
846 virtual BYTE GetKeyValue() const { return ie_callingName; }
847
851 virtual void StoreDataIn(IAX2IeData &res)
852 { res.callingName = dataValue; }
853 protected:
854 };
855
857
858 class IAX2IeCalledContext : public IAX2IeString
859 {
860 PCLASSINFO(IAX2IeCalledContext, IAX2IeString);
861 public:
865 IAX2IeCalledContext(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
866
868 IAX2IeCalledContext(const PString & newValue) { SetData(newValue); }
869
871 virtual void PrintOn(ostream & str) const;
872
874 virtual BYTE GetKeyValue() const { return ie_calledContext; }
875
879 virtual void StoreDataIn(IAX2IeData &res)
880 { res.calledContext = dataValue; }
881 protected:
882 };
883
885
886 class IAX2IeUserName : public IAX2IeString
887 {
888 PCLASSINFO(IAX2IeUserName, IAX2IeString);
889 public:
893 IAX2IeUserName(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
894
896 IAX2IeUserName(const PString & newValue) { SetData(newValue); }
897
899 virtual void PrintOn(ostream & str) const;
900
902 virtual BYTE GetKeyValue() const { return ie_userName; }
903
907 virtual void StoreDataIn(IAX2IeData &res) { res.userName = dataValue; }
908 protected:
909 };
910
912
913 class IAX2IePassword : public IAX2IeString
914 {
915 PCLASSINFO(IAX2IePassword, IAX2IeString);
916 public:
920 IAX2IePassword(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
921
923 IAX2IePassword(const PString & newValue) { SetData(newValue); }
924
926 virtual void PrintOn(ostream & str) const;
927
929 virtual BYTE GetKeyValue() const { return ie_password; }
930
934 virtual void StoreDataIn(IAX2IeData &res) { res.password = dataValue; }
935 protected:
936 };
937
939
940 class IAX2IeCapability : public IAX2IeUInt
941 {
942 PCLASSINFO(IAX2IeCapability, IAX2IeUInt);
943 public:
947 IAX2IeCapability(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
948
950 IAX2IeCapability(unsigned int newValue) : IAX2IeUInt(newValue) { }
951
953 virtual void PrintOn(ostream & str) const;
954
956 virtual BYTE GetKeyValue() const { return ie_capability; }
957
961 virtual void StoreDataIn(IAX2IeData &res) { res.capability = dataValue; }
962 protected:
963 };
964
966
967 class IAX2IeFormat : public IAX2IeUInt
968 {
969 PCLASSINFO(IAX2IeFormat, IAX2IeUInt);
970 public:
974 IAX2IeFormat(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
975
977 IAX2IeFormat(unsigned int newValue) : IAX2IeUInt(newValue) { }
978
980 virtual void PrintOn(ostream & str) const;
981
983 virtual BYTE GetKeyValue() const { return ie_format; }
984
988 virtual void StoreDataIn(IAX2IeData &res) { res.format = dataValue; }
989 protected:
990 };
991
993
994 class IAX2IeLanguage : public IAX2IeString
995 {
996 PCLASSINFO(IAX2IeLanguage, IAX2IeString);
997 public:
1001 IAX2IeLanguage(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
1002
1004 IAX2IeLanguage(const PString & newValue) { SetData(newValue); }
1005
1007 virtual void PrintOn(ostream & str) const;
1008
1010 virtual BYTE GetKeyValue() const { return ie_language; }
1011
1015 virtual void StoreDataIn(IAX2IeData &res) { res.language = dataValue; }
1016 protected:
1017 };
1018
1020
1021 class IAX2IeVersion : public IAX2IeShort
1022 {
1023 PCLASSINFO(IAX2IeVersion, IAX2IeShort);
1024 public:
1028 IAX2IeVersion(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
1029
1031 IAX2IeVersion() { dataValue = 2; validData = true; }
1032
1034 virtual void PrintOn(ostream & str) const;
1035
1037 virtual BYTE GetKeyValue() const { return ie_version; }
1038
1042 virtual void StoreDataIn(IAX2IeData &res) { res.version = dataValue; }
1043 protected:
1044 };
1045
1047
1048 class IAX2IeAdsicpe : public IAX2IeShort
1049 {
1050 PCLASSINFO(IAX2IeAdsicpe, IAX2IeShort);
1051 public:
1055 IAX2IeAdsicpe(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
1056
1058 virtual void PrintOn(ostream & str) const;
1059
1061 virtual BYTE GetKeyValue() const { return ie_adsicpe; }
1062
1066 virtual void StoreDataIn(IAX2IeData &res) { res.adsicpe = dataValue; }
1067 protected:
1068 };
1069
1071
1072 class IAX2IeDnid : public IAX2IeString
1073 {
1074 PCLASSINFO(IAX2IeDnid, IAX2IeString);
1075 public:
1079 IAX2IeDnid(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
1080
1082 IAX2IeDnid(const PString & newValue) { SetData(newValue); }
1083
1085 virtual void PrintOn(ostream & str) const;
1086
1088 virtual BYTE GetKeyValue() const { return ie_dnid; }
1089
1093 virtual void StoreDataIn(IAX2IeData &res) { res.dnid = dataValue; }
1094 protected:
1095 };
1096
1098
1099 class IAX2IeAuthMethods : public IAX2IeShort
1100 {
1101 PCLASSINFO(IAX2IeAuthMethods, IAX2IeShort);
1102 public:
1106 IAX2IeAuthMethods(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
1107
1109 IAX2IeAuthMethods(short newValue) { SetData(newValue); }
1110
1112 virtual void PrintOn(ostream & str) const;
1113
1115 virtual BYTE GetKeyValue() const { return ie_authMethods; }
1116
1120 virtual void StoreDataIn(IAX2IeData &res) { res.authMethods = dataValue; }
1121
1123 static PBoolean IsRsaAuthentication(short testValue) { return InternalIsRsa(testValue); }
1124
1126 static PBoolean IsMd5Authentication(short testValue) { return InternalIsMd5(testValue); }
1127
1129 static PBoolean IsPlainTextAuthentication(short testValue) { return InternalIsPlainText(testValue); }
1130
1132 PBoolean IsRsaAuthentication() { if (IsValid()) return InternalIsRsa(dataValue); else return false; }
1133
1135 PBoolean IsMd5Authentication() { if (IsValid()) return InternalIsMd5(dataValue); else return false; }
1136
1138 PBoolean IsPlainTextAuthentication() { if (IsValid()) return InternalIsPlainText(dataValue); else return false; }
1139
1140 protected:
1141
1143 static PBoolean InternalIsRsa(short testValue) { return testValue & 0x04; }
1144
1146 static PBoolean InternalIsMd5(short testValue) { return testValue & 0x02; }
1147
1149 static PBoolean InternalIsPlainText(short testValue) { return testValue & 0x01; }
1150 };
1151
1153
1154 class IAX2IeChallenge : public IAX2IeString
1155 {
1156 PCLASSINFO(IAX2IeChallenge, IAX2IeString);
1157 public:
1161 IAX2IeChallenge(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
1162
1164 IAX2IeChallenge(const PString & newValue) { SetData(newValue); }
1165
1167 virtual void PrintOn(ostream & str) const;
1168
1170 virtual BYTE GetKeyValue() const { return ie_challenge; }
1171
1175 virtual void StoreDataIn(IAX2IeData &res) { res.challenge = dataValue; }
1176 protected:
1177 };
1178
1180
1181 class IAX2IeMd5Result : public IAX2IeString
1182 {
1183 PCLASSINFO(IAX2IeMd5Result, IAX2IeString);
1184 public:
1188 IAX2IeMd5Result(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
1189
1191 IAX2IeMd5Result(const PString & newValue) { SetData(newValue); }
1192
1194 IAX2IeMd5Result(const PString & challenge, const PString & password);
1195
1197 IAX2IeMd5Result(IAX2Encryption & encryption);
1198
1200 void InitializeChallengePassword(const PString & newChallenge, const PString & newPassword);
1201
1203 virtual void PrintOn(ostream & str) const;
1204
1206 virtual BYTE GetKeyValue() const { return ie_md5Result; }
1207
1211 virtual void StoreDataIn(IAX2IeData &res) { res.md5Result = dataValue; }
1212
1215 PBYTEArray & GetDataBlock() { return dataBlock; }
1216
1217 protected:
1218
1220 PBYTEArray dataBlock;
1221 };
1222
1224
1225 class IAX2IeRsaResult : public IAX2IeString
1226 {
1227 PCLASSINFO(IAX2IeRsaResult, IAX2IeString);
1228 public:
1232 IAX2IeRsaResult(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
1233
1235 IAX2IeRsaResult(const PString & newValue) { SetData(newValue); }
1236
1238 virtual void PrintOn(ostream & str) const;
1239
1241 virtual BYTE GetKeyValue() const { return ie_rsaResult; }
1242
1246 virtual void StoreDataIn(IAX2IeData &res) { res.rsaResult = dataValue; }
1247 protected:
1248 };
1249
1251
1252 class IAX2IeApparentAddr : public IAX2IeSockaddrIn
1253 {
1254 PCLASSINFO(IAX2IeApparentAddr, IAX2IeSockaddrIn);
1255 public:
1259 IAX2IeApparentAddr(BYTE length, BYTE *srcData) : IAX2IeSockaddrIn(length, srcData) { };
1260
1262 ~IAX2IeApparentAddr() { };
1263
1265 virtual void PrintOn(ostream & str) const;
1266
1268 virtual BYTE GetKeyValue() const { return ie_apparentAddr; }
1269
1273 virtual void StoreDataIn(IAX2IeData &res) { res.apparentAddr = dataValue; }
1274 protected:
1275 };
1276
1278
1279 class IAX2IeRefresh : public IAX2IeShort
1280 {
1281 PCLASSINFO(IAX2IeRefresh, IAX2IeShort);
1282 public:
1286 IAX2IeRefresh(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
1287
1289 IAX2IeRefresh(short refreshTime) : IAX2IeShort(refreshTime) { };
1290
1292 virtual void PrintOn(ostream & str) const;
1293
1295 virtual BYTE GetKeyValue() const { return ie_refresh; }
1296
1300 virtual void StoreDataIn(IAX2IeData &res) { res.refresh = dataValue; }
1301 protected:
1302 };
1303
1305
1306 class IAX2IeDpStatus : public IAX2IeShort
1307 {
1308 PCLASSINFO(IAX2IeDpStatus, IAX2IeShort);
1309 public:
1313 IAX2IeDpStatus(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
1314
1316 virtual void PrintOn(ostream & str) const;
1317
1319 virtual BYTE GetKeyValue() const { return ie_dpStatus; }
1320
1324 virtual void StoreDataIn(IAX2IeData &res) { res.dpStatus = dataValue; }
1325 protected:
1326 };
1327
1329
1330 class IAX2IeCallNo : public IAX2IeShort
1331 {
1332 PCLASSINFO(IAX2IeCallNo, IAX2IeShort);
1333 public:
1337 IAX2IeCallNo(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
1338
1340 virtual void PrintOn(ostream & str) const;
1341
1343 virtual BYTE GetKeyValue() const { return ie_callNo; }
1344
1348 virtual void StoreDataIn(IAX2IeData &res) { res.callNo = dataValue; }
1349 protected:
1350 };
1351
1353
1354 class IAX2IeCause : public IAX2IeString
1355 {
1356 PCLASSINFO(IAX2IeCause, IAX2IeString);
1357 public:
1361 IAX2IeCause(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
1362
1364 IAX2IeCause(const PString & newValue) : IAX2IeString(newValue) { }
1365
1367 IAX2IeCause(const char *newValue) : IAX2IeString(newValue) { }
1368
1370 virtual void PrintOn(ostream & str) const;
1371
1373 virtual BYTE GetKeyValue() const { return ie_cause; }
1374
1378 virtual void StoreDataIn(IAX2IeData &res) { res.cause = dataValue; }
1379 protected:
1380 };
1381
1383
1384 class IAX2IeIaxUnknown : public IAX2IeByte
1385 {
1386 PCLASSINFO(IAX2IeIaxUnknown, IAX2IeByte);
1387 public:
1391 IAX2IeIaxUnknown(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
1392
1394 IAX2IeIaxUnknown(BYTE newValue) : IAX2IeByte(newValue) { }
1395
1397 virtual void PrintOn(ostream & str) const;
1398
1400 virtual BYTE GetKeyValue() const { return ie_iaxUnknown; }
1401
1405 virtual void StoreDataIn(IAX2IeData &res) { res.iaxUnknown = dataValue; }
1406 protected:
1407 };
1408
1410
1411 class IAX2IeMsgCount : public IAX2IeShort
1412 {
1413 PCLASSINFO(IAX2IeMsgCount, IAX2IeShort);
1414 public:
1418 IAX2IeMsgCount(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
1419
1421 virtual void PrintOn(ostream & str) const;
1422
1424 virtual BYTE GetKeyValue() const { return ie_msgCount; }
1425
1429 virtual void StoreDataIn(IAX2IeData &res) { res.msgCount = dataValue; }
1430 protected:
1431 };
1432
1434
1435 class IAX2IeAutoAnswer : public IAX2IeNone
1436 {
1437 PCLASSINFO(IAX2IeAutoAnswer, IAX2IeNone);
1438 public:
1442 IAX2IeAutoAnswer(BYTE length, BYTE *srcData) : IAX2IeNone(length, srcData) { };
1443
1445 virtual void PrintOn(ostream & str) const;
1446
1448 virtual BYTE GetKeyValue() const { return ie_autoAnswer; }
1449
1453 virtual void StoreDataIn(IAX2IeData &res) { res.autoAnswer = true;; }
1454 protected:
1455 };
1456
1458
1459 class IAX2IeMusicOnHold : public IAX2IeNone
1460 {
1461 PCLASSINFO(IAX2IeMusicOnHold, IAX2IeNone);
1462 public:
1466 IAX2IeMusicOnHold(BYTE length, BYTE *srcData) : IAX2IeNone(length, srcData) { };
1467
1469 IAX2IeMusicOnHold() : IAX2IeNone() { };
1470
1472 virtual void PrintOn(ostream & str) const;
1473
1475 virtual BYTE GetKeyValue() const { return ie_musicOnHold; }
1476
1480 virtual void StoreDataIn(IAX2IeData &res) { res.musicOnHold = true; }
1481 protected:
1482 };
1483
1485
1486 class IAX2IeTransferId : public IAX2IeInt
1487 {
1488 PCLASSINFO(IAX2IeTransferId, IAX2IeInt);
1489 public:
1493 IAX2IeTransferId(BYTE length, BYTE *srcData) : IAX2IeInt(length, srcData) { };
1494
1496 virtual void PrintOn(ostream & str) const;
1497
1499 virtual BYTE GetKeyValue() const { return ie_transferId; }
1500
1504 virtual void StoreDataIn(IAX2IeData &res) { res.transferId = dataValue; }
1505 protected:
1506 };
1507
1509
1510 class IAX2IeRdnis : public IAX2IeString
1511 {
1512 PCLASSINFO(IAX2IeRdnis, IAX2IeString);
1513 public:
1517 IAX2IeRdnis(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
1518
1520 virtual void PrintOn(ostream & str) const;
1521
1523 virtual BYTE GetKeyValue() const { return ie_rdnis; }
1524
1528 virtual void StoreDataIn(IAX2IeData &res) { res.rdnis = dataValue; }
1529 protected:
1530 };
1531
1533
1534 class IAX2IeProvisioning : public IAX2IeBlockOfData
1535 {
1536 PCLASSINFO(IAX2IeProvisioning, IAX2IeBlockOfData);
1537 public:
1541 IAX2IeProvisioning(BYTE length, BYTE *srcData) : IAX2IeBlockOfData (length, srcData) { };
1542
1544 virtual void PrintOn(ostream & str) const;
1545
1547 virtual BYTE GetKeyValue() const { return ie_provisioning; }
1548
1552 virtual void StoreDataIn(IAX2IeData &/*res*/) { }
1553 protected:
1554 };
1555
1557
1558 class IAX2IeAesProvisioning : public IAX2IeNone
1559 {
1560 PCLASSINFO(IAX2IeAesProvisioning, IAX2IeNone);
1561 public:
1565 IAX2IeAesProvisioning(BYTE length, BYTE *srcData) : IAX2IeNone(length, srcData) { };
1566
1568 virtual void PrintOn(ostream & str) const;
1569
1571 virtual BYTE GetKeyValue() const { return ie_aesProvisioning; }
1572
1576 virtual void StoreDataIn(IAX2IeData &/*res*/) { }
1577 protected:
1578 };
1579
1581
1582 class IAX2IeDateTime : public IAX2IeDateAndTime
1583 {
1584 PCLASSINFO(IAX2IeDateTime, IAX2IeDateAndTime);
1585 public:
1589 IAX2IeDateTime(BYTE length, BYTE *srcData) : IAX2IeDateAndTime(length, srcData) { };
1590
1592 virtual void PrintOn(ostream & str) const;
1593
1595 virtual BYTE GetKeyValue() const { return ie_dateTime; }
1596
1600 virtual void StoreDataIn(IAX2IeData &res) { res.dateTime = dataValue; }
1601 protected:
1602 };
1603
1605
1606 class IAX2IeDeviceType : public IAX2IeString
1607 {
1608 PCLASSINFO(IAX2IeDeviceType, IAX2IeString);
1609 public:
1613 IAX2IeDeviceType(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
1614
1616 virtual void PrintOn(ostream & str) const;
1617
1619 virtual BYTE GetKeyValue() const { return ie_deviceType; }
1620
1624 virtual void StoreDataIn(IAX2IeData &res) { res.deviceType = dataValue; }
1625 protected:
1626 };
1627
1629
1630 class IAX2IeServiceIdent : public IAX2IeString
1631 {
1632 PCLASSINFO(IAX2IeServiceIdent, IAX2IeString);
1633 public:
1637 IAX2IeServiceIdent(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
1638
1640 virtual void PrintOn(ostream & str) const;
1641
1643 virtual BYTE GetKeyValue() const { return ie_serviceIdent; }
1644
1648 virtual void StoreDataIn(IAX2IeData &res) { res.serviceIdent = dataValue; }
1649 protected:
1650 };
1651
1653
1654 class IAX2IeFirmwareVer : public IAX2IeShort
1655 {
1656 PCLASSINFO(IAX2IeFirmwareVer, IAX2IeShort);
1657 public:
1661 IAX2IeFirmwareVer(BYTE length, BYTE *srcData) : IAX2IeShort(length, srcData) { };
1662
1664 virtual void PrintOn(ostream & str) const;
1665
1667 virtual BYTE GetKeyValue() const { return ie_firmwareVer; }
1668
1672 virtual void StoreDataIn(IAX2IeData &res) { res.firmwareVer = dataValue; }
1673 protected:
1674 };
1675
1677
1678 class IAX2IeFwBlockDesc : public IAX2IeUInt
1679 {
1680 PCLASSINFO(IAX2IeFwBlockDesc, IAX2IeUInt);
1681 public:
1685 IAX2IeFwBlockDesc(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
1686
1688 IAX2IeFwBlockDesc(unsigned int newValue) : IAX2IeUInt(newValue) { }
1689
1691 virtual void PrintOn(ostream & str) const;
1692
1694 virtual BYTE GetKeyValue() const { return ie_fwBlockDesc; }
1695
1699 virtual void StoreDataIn(IAX2IeData &res) { res.fwBlockDesc = dataValue; }
1700 protected:
1701 };
1702
1704
1705 class IAX2IeFwBlockData : public IAX2IeBlockOfData
1706 {
1707 PCLASSINFO(IAX2IeFwBlockData, IAX2IeBlockOfData);
1708 public:
1712 IAX2IeFwBlockData(BYTE length, BYTE *srcData) : IAX2IeBlockOfData(length, srcData) { };
1713
1715 virtual void PrintOn(ostream & str) const;
1716
1718 virtual BYTE GetKeyValue() const { return ie_fwBlockData; }
1719
1723 virtual void StoreDataIn(IAX2IeData &res) { res.fwBlockData = dataValue; }
1724 protected:
1725 };
1726
1728
1729 class IAX2IeProvVer : public IAX2IeUInt
1730 {
1731 PCLASSINFO(IAX2IeProvVer, IAX2IeUInt);
1732 public:
1736 IAX2IeProvVer(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
1737
1739 IAX2IeProvVer(unsigned int newValue) : IAX2IeUInt(newValue) { }
1740
1742 virtual void PrintOn(ostream & str) const;
1743
1745 virtual BYTE GetKeyValue() const { return ie_provVer; }
1746
1750 virtual void StoreDataIn(IAX2IeData &res) { res.provVer = dataValue; }
1751 protected:
1752 };
1753
1755
1756 class IAX2IeCallingPres : public IAX2IeByte
1757 {
1758 PCLASSINFO(IAX2IeCallingPres, IAX2IeByte);
1759 public:
1763 IAX2IeCallingPres(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
1764
1766 virtual void PrintOn(ostream & str) const;
1767
1769 virtual BYTE GetKeyValue() const { return ie_callingPres; }
1770
1774 virtual void StoreDataIn(IAX2IeData &res) { res.callingPres = dataValue; }
1775 protected:
1776 };
1777
1779
1780 class IAX2IeCallingTon : public IAX2IeByte
1781 {
1782 PCLASSINFO(IAX2IeCallingTon, IAX2IeByte);
1783 public:
1787 IAX2IeCallingTon(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
1788
1790 virtual void PrintOn(ostream & str) const;
1791
1793 virtual BYTE GetKeyValue() const { return ie_callingTon; }
1794
1798 virtual void StoreDataIn(IAX2IeData &res) { res.callingTon = dataValue; }
1799 protected:
1800 };
1801
1803
1804 class IAX2IeCallingTns : public IAX2IeUShort
1805 {
1806 PCLASSINFO(IAX2IeCallingTns, IAX2IeUShort);
1807 public:
1811 IAX2IeCallingTns(BYTE length, BYTE *srcData) : IAX2IeUShort(length, srcData) { };
1812
1814 virtual void PrintOn(ostream & str) const;
1815
1817 virtual BYTE GetKeyValue() const { return ie_callingTns; }
1818
1822 virtual void StoreDataIn(IAX2IeData &res) { res.callingTns = dataValue; }
1823 protected:
1824 };
1825
1827
1828 class IAX2IeSamplingRate : public IAX2IeUShort
1829 {
1830 PCLASSINFO(IAX2IeSamplingRate, IAX2IeUShort);
1831 public:
1835 IAX2IeSamplingRate(BYTE length, BYTE *srcData) : IAX2IeUShort(length, srcData) { };
1836
1838 virtual void PrintOn(ostream & str) const;
1839
1841 virtual BYTE GetKeyValue() const { return ie_samplingRate; }
1842
1846 virtual void StoreDataIn(IAX2IeData &res) { res.samplingRate = dataValue; }
1847 protected:
1848 };
1849
1851
1852 class IAX2IeEncryption : public IAX2IeUShort
1853 {
1854 PCLASSINFO(IAX2IeEncryption, IAX2IeUShort);
1855 public:
1857 enum IAX2IeEncryptionMethod {
1858 encryptAes128 = 1
1859 };
1860
1862 IAX2IeEncryption(IAX2IeEncryptionMethod method = encryptAes128);
1863
1867 IAX2IeEncryption(BYTE length, BYTE *srcData) : IAX2IeUShort(length, srcData) { };
1868
1870 virtual void PrintOn(ostream & str) const;
1871
1873 virtual BYTE GetKeyValue() const { return ie_encryption; }
1874
1878 virtual void StoreDataIn(IAX2IeData &res) { res.encryptionMethods = dataValue; }
1879 protected:
1880 };
1881
1883
1884 class IAX2IeEncKey : public IAX2IeString
1885 {
1886 PCLASSINFO(IAX2IeEncKey, IAX2IeString);
1887 public:
1891 IAX2IeEncKey(BYTE length, BYTE *srcData) : IAX2IeString(length, srcData) { };
1892
1894 virtual void PrintOn(ostream & str) const;
1895
1897 virtual BYTE GetKeyValue() const { return ie_encKey; }
1898
1902 virtual void StoreDataIn(IAX2IeData &res) { res.encKey = dataValue; }
1903 protected:
1904 };
1905
1907
1908 class IAX2IeCodecPrefs : public IAX2IeByte
1909 {
1910 PCLASSINFO(IAX2IeCodecPrefs, IAX2IeByte);
1911 public:
1915 IAX2IeCodecPrefs(BYTE length, BYTE *srcData) : IAX2IeByte(length, srcData) { };
1916
1918 virtual void PrintOn(ostream & str) const;
1919
1921 virtual BYTE GetKeyValue() const { return ie_codecPrefs; }
1922
1926 virtual void StoreDataIn(IAX2IeData &res) { res.codecPrefs = dataValue; }
1927 protected:
1928 };
1929
1931
1932 class IAX2IeReceivedJitter : public IAX2IeUInt
1933 {
1934 PCLASSINFO(IAX2IeReceivedJitter, IAX2IeUInt);
1935 public:
1939 IAX2IeReceivedJitter(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
1940
1942 virtual void PrintOn(ostream & str) const;
1943
1945 virtual BYTE GetKeyValue() const { return ie_recJitter; }
1946
1950 virtual void StoreDataIn(IAX2IeData &res) { res.receivedJitter = dataValue; }
1951 protected:
1952 };
1953
1955
1956 class IAX2IeReceivedLoss : public IAX2IeUInt
1957 {
1958 PCLASSINFO(IAX2IeReceivedLoss, IAX2IeUInt);
1959 public:
1963 IAX2IeReceivedLoss(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
1964
1966 virtual void PrintOn(ostream & str) const;
1967
1969 virtual BYTE GetKeyValue() const { return ie_recLoss; }
1970
1974 virtual void StoreDataIn(IAX2IeData &res) { res.receivedLoss = dataValue; }
1975 protected:
1976 };
1977
1979
1980 class IAX2IeReceivedFrames : public IAX2IeUInt
1981 {
1982 PCLASSINFO(IAX2IeReceivedFrames, IAX2IeUInt);
1983 public:
1987 IAX2IeReceivedFrames(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
1988
1990 virtual void PrintOn(ostream & str) const;
1991
1993 virtual BYTE GetKeyValue() const { return ie_recPackets; }
1994
1998 virtual void StoreDataIn(IAX2IeData &res) { res.receivedPackets = dataValue; }
1999 protected:
2000 };
2001
2003
2004 class IAX2IeReceivedDelay : public IAX2IeUShort
2005 {
2006 PCLASSINFO(IAX2IeReceivedDelay, IAX2IeUShort);
2007 public:
2011 IAX2IeReceivedDelay(BYTE length, BYTE *srcData) : IAX2IeUShort(length, srcData) { };
2012
2014 virtual void PrintOn(ostream & str) const;
2015
2017 virtual BYTE GetKeyValue() const { return ie_recDelay; }
2018
2022 virtual void StoreDataIn(IAX2IeData &res) { res.receivedDelay = dataValue; }
2023 protected:
2024 };
2025
2027
2028 class IAX2IeDroppedFrames : public IAX2IeUInt
2029 {
2030 PCLASSINFO(IAX2IeDroppedFrames, IAX2IeUInt);
2031 public:
2035 IAX2IeDroppedFrames(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
2036
2038 virtual void PrintOn(ostream & str) const;
2039
2041 virtual BYTE GetKeyValue() const { return ie_recDropped; }
2042
2046 virtual void StoreDataIn(IAX2IeData &res) { res.receivedDropped = dataValue; }
2047 protected:
2048 };
2049
2051
2052 class IAX2IeReceivedOoo : public IAX2IeUInt
2053 {
2054 PCLASSINFO(IAX2IeReceivedOoo, IAX2IeUInt);
2055 public:
2059 IAX2IeReceivedOoo(BYTE length, BYTE *srcData) : IAX2IeUInt(length, srcData) { };
2060
2062 virtual void PrintOn(ostream & str) const;
2063
2065 virtual BYTE GetKeyValue() const { return ie_recOoo; }
2066
2070 virtual void StoreDataIn(IAX2IeData &res) { res.receivedOoo = dataValue; }
2071 protected:
2072 };
2073
2075
2082 class IAX2IeCallToken : public IAX2IeBinary
2083 {
2084 PCLASSINFO(IAX2IeCallToken, IAX2IeBinary);
2085 public:
2088 IAX2IeCallToken(BYTE length, BYTE *srcData)
2089 : IAX2IeBinary(length, srcData) { };
2090
2093 IAX2IeCallToken() : IAX2IeBinary(0, NULL) {};
2094
2096 virtual void PrintOn(ostream & str) const;
2097
2099 virtual BYTE GetKeyValue() const { return ie_callToken; }
2100
2104 virtual void StoreDataIn(IAX2IeData &res) { res.callToken = dataValue; }
2105
2109 static void InitialiseKey();
2110
2112 void WriteKeySequence(PIPSocket::Address & remoteAddress);
2113
2116 static PBoolean ValidKeySequence (IAX2IeCallToken & cf,
2117 PIPSocket::Address & remote);
2118
2119 protected:
2122 static PString ReportKeySequence(const PString & time, PIPSocket::Address & remote);
2123
2126 enum {
2127 iKeyValue = 0x36,
2128 oKeyValue = 0x5c,
2129 blockSize = 64
2130 };
2131
2134 static PString secretKey;
2135
2138 static BYTE iKeyPad[blockSize];
2139
2141 static BYTE oKeyPad[blockSize];
2142 };
2144
2145
2146 PDECLARE_LIST (IAX2IeList, IAX2Ie *)
2147 #ifdef DOC_PLUS_PLUS
2148
2149 class IAX2IeList : public IAX2Ie *
2150 {
2151 #endif
2152 public:
2154 ~IAX2IeList();
2155
2159 IAX2Ie *RemoveIeAt(PINDEX i);
2160
2164 IAX2Ie *RemoveLastIe();
2165
2167 void Initialise() { DisallowDeleteObjects(); }
2168
2170 void DeleteAt(PINDEX idex);
2171
2173 PBoolean Empty() const { return GetSize() == 0; }
2174
2176 PBoolean IsEmpty() const { return GetSize() == 0; }
2177
2179 void AppendIe(IAX2Ie *newMember) { Append(newMember);}
2180
2182 int GetBinaryDataSize() const;
2183
2185 IAX2Ie * GetIeAt(int i) const;
2186
2187 protected:
2188
2189 };
2190
2191
2192 #endif // OPAL_IAX2
2193
2194 #endif // OPAL_IAX2_IES_H
2195
2196 /* The comment below is magic for those who use emacs to edit this file.
2197 * With the comment below, the tab key does auto indent to 2 spaces.
2198 *
2199 * Local Variables:
2200 * mode:c
2201 * c-basic-offset:2
2202 * End:
2203 */