Utilise new MergeSym feature to no longer overwrite the source .DEF file when buildin...
[openh323.git] / src / h4507.cxx
blob3b229b2ae381ad5fc1b5df26bd8f8fdb41970f00
1 //
2 // h4507.cxx
3 //
4 // Code automatically generated by asnparse.
5 //
7 #ifdef P_USE_PRAGMA
8 #pragma implementation "h4507.h"
9 #endif
11 #include <ptlib.h>
12 #include "h4507.h"
14 #define new PNEW
17 #if ! H323_DISABLE_H4507
21 #ifndef PASN_NOPRINTON
22 const static PASN_Names Names_H4507_H323_MWI_Operations[]={
23 {"mwiActivate",80}
24 ,{"mwiDeactivate",81}
25 ,{"mwiInterrogate",82}
27 #endif
29 // H323-MWI-Operations
32 H4507_H323_MWI_Operations::H4507_H323_MWI_Operations(unsigned tag, PASN_Object::TagClass tagClass)
33 : PASN_Enumeration(tag, tagClass, 82, FALSE
34 #ifndef PASN_NOPRINTON
35 ,(const PASN_Names *)Names_H4507_H323_MWI_Operations,3
36 #endif
42 H4507_H323_MWI_Operations & H4507_H323_MWI_Operations::operator=(unsigned v)
44 SetValue(v);
45 return *this;
49 PObject * H4507_H323_MWI_Operations::Clone() const
51 #ifndef PASN_LEANANDMEAN
52 PAssert(IsClass(H4507_H323_MWI_Operations::Class()), PInvalidCast);
53 #endif
54 return new H4507_H323_MWI_Operations(*this);
59 // DummyRes
62 H4507_DummyRes::H4507_DummyRes(unsigned tag, PASN_Object::TagClass tagClass)
63 : PASN_Array(tag, tagClass)
65 SetConstraints(PASN_Object::FixedConstraint, 0, 255);
69 PASN_Object * H4507_DummyRes::CreateObject() const
71 return new H4504_MixedExtension;
75 H4504_MixedExtension & H4507_DummyRes::operator[](PINDEX i) const
77 return (H4504_MixedExtension &)array[i];
81 PObject * H4507_DummyRes::Clone() const
83 #ifndef PASN_LEANANDMEAN
84 PAssert(IsClass(H4507_DummyRes::Class()), PInvalidCast);
85 #endif
86 return new H4507_DummyRes(*this);
91 // MWIInterrogateRes
94 H4507_MWIInterrogateRes::H4507_MWIInterrogateRes(unsigned tag, PASN_Object::TagClass tagClass)
95 : PASN_Array(tag, tagClass)
97 SetConstraints(PASN_Object::FixedConstraint, 1, 64);
101 PASN_Object * H4507_MWIInterrogateRes::CreateObject() const
103 return new H4507_MWIInterrogateResElt;
107 H4507_MWIInterrogateResElt & H4507_MWIInterrogateRes::operator[](PINDEX i) const
109 return (H4507_MWIInterrogateResElt &)array[i];
113 PObject * H4507_MWIInterrogateRes::Clone() const
115 #ifndef PASN_LEANANDMEAN
116 PAssert(IsClass(H4507_MWIInterrogateRes::Class()), PInvalidCast);
117 #endif
118 return new H4507_MWIInterrogateRes(*this);
123 #ifndef PASN_NOPRINTON
124 const static PASN_Names Names_H4507_MsgCentreId[]={
125 {"integer",0}
126 ,{"partyNumber",1}
127 ,{"numericString",2}
129 #endif
131 // MsgCentreId
134 H4507_MsgCentreId::H4507_MsgCentreId(unsigned tag, PASN_Object::TagClass tagClass)
135 : PASN_Choice(tag, tagClass, 3, FALSE
136 #ifndef PASN_NOPRINTON
137 ,(const PASN_Names *)Names_H4507_MsgCentreId,3
138 #endif
144 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
145 H4507_MsgCentreId::operator H4501_EndpointAddress &() const
146 #else
147 H4507_MsgCentreId::operator H4501_EndpointAddress &()
149 #ifndef PASN_LEANANDMEAN
150 PAssert(PIsDescendant(PAssertNULL(choice), H4501_EndpointAddress), PInvalidCast);
151 #endif
152 return *(H4501_EndpointAddress *)choice;
156 H4507_MsgCentreId::operator const H4501_EndpointAddress &() const
157 #endif
159 #ifndef PASN_LEANANDMEAN
160 PAssert(PIsDescendant(PAssertNULL(choice), H4501_EndpointAddress), PInvalidCast);
161 #endif
162 return *(H4501_EndpointAddress *)choice;
166 BOOL H4507_MsgCentreId::CreateObject()
168 switch (tag) {
169 case e_integer :
170 choice = new PASN_Integer();
171 choice->SetConstraints(PASN_Object::FixedConstraint, 0, 65535);
172 return TRUE;
173 case e_partyNumber :
174 choice = new H4501_EndpointAddress();
175 return TRUE;
176 case e_numericString :
177 choice = new PASN_NumericString();
178 choice->SetConstraints(PASN_Object::FixedConstraint, 1, 10);
179 return TRUE;
182 choice = NULL;
183 return FALSE;
187 PObject * H4507_MsgCentreId::Clone() const
189 #ifndef PASN_LEANANDMEAN
190 PAssert(IsClass(H4507_MsgCentreId::Class()), PInvalidCast);
191 #endif
192 return new H4507_MsgCentreId(*this);
197 // NbOfMessages
200 H4507_NbOfMessages::H4507_NbOfMessages(unsigned tag, PASN_Object::TagClass tagClass)
201 : PASN_Integer(tag, tagClass)
203 SetConstraints(PASN_Object::FixedConstraint, 0, 65535);
207 H4507_NbOfMessages & H4507_NbOfMessages::operator=(int v)
209 SetValue(v);
210 return *this;
214 H4507_NbOfMessages & H4507_NbOfMessages::operator=(unsigned v)
216 SetValue(v);
217 return *this;
221 PObject * H4507_NbOfMessages::Clone() const
223 #ifndef PASN_LEANANDMEAN
224 PAssert(IsClass(H4507_NbOfMessages::Class()), PInvalidCast);
225 #endif
226 return new H4507_NbOfMessages(*this);
231 // TimeStamp
234 H4507_TimeStamp::H4507_TimeStamp(unsigned tag, PASN_Object::TagClass tagClass)
235 : PASN_GeneralisedTime(tag, tagClass)
237 SetConstraints(PASN_Object::FixedConstraint, 12, 19);
241 PObject * H4507_TimeStamp::Clone() const
243 #ifndef PASN_LEANANDMEAN
244 PAssert(IsClass(H4507_TimeStamp::Class()), PInvalidCast);
245 #endif
246 return new H4507_TimeStamp(*this);
250 #ifndef PASN_NOPRINTON
251 const static PASN_Names Names_H4507_MessageWaitingIndicationErrors[]={
252 {"notActivated",31}
253 ,{"undefined",2002}
254 ,{"invalidMsgCentreId",1018}
256 #endif
258 // MessageWaitingIndicationErrors
261 H4507_MessageWaitingIndicationErrors::H4507_MessageWaitingIndicationErrors(unsigned tag, PASN_Object::TagClass tagClass)
262 : PASN_Enumeration(tag, tagClass, 2002, FALSE
263 #ifndef PASN_NOPRINTON
264 ,(const PASN_Names *)Names_H4507_MessageWaitingIndicationErrors,3
265 #endif
271 H4507_MessageWaitingIndicationErrors & H4507_MessageWaitingIndicationErrors::operator=(unsigned v)
273 SetValue(v);
274 return *this;
278 PObject * H4507_MessageWaitingIndicationErrors::Clone() const
280 #ifndef PASN_LEANANDMEAN
281 PAssert(IsClass(H4507_MessageWaitingIndicationErrors::Class()), PInvalidCast);
282 #endif
283 return new H4507_MessageWaitingIndicationErrors(*this);
287 #ifndef PASN_NOPRINTON
288 const static PASN_Names Names_H4507_BasicService[]={
289 {"allServices",0}
290 ,{"speech",1}
291 ,{"unrestrictedDigitalInformation",2}
292 ,{"audio3100Hz",3}
293 ,{"telephony",32}
294 ,{"teletex",33}
295 ,{"telefaxGroup4Class1",34}
296 ,{"videotexSyntaxBased",35}
297 ,{"videotelephony",36}
299 #endif
301 // BasicService
304 H4507_BasicService::H4507_BasicService(unsigned tag, PASN_Object::TagClass tagClass)
305 : PASN_Enumeration(tag, tagClass, 36, FALSE
306 #ifndef PASN_NOPRINTON
307 ,(const PASN_Names *)Names_H4507_BasicService,9
308 #endif
314 H4507_BasicService & H4507_BasicService::operator=(unsigned v)
316 SetValue(v);
317 return *this;
321 PObject * H4507_BasicService::Clone() const
323 #ifndef PASN_LEANANDMEAN
324 PAssert(IsClass(H4507_BasicService::Class()), PInvalidCast);
325 #endif
326 return new H4507_BasicService(*this);
331 // ArrayOf_MixedExtension
334 H4507_ArrayOf_MixedExtension::H4507_ArrayOf_MixedExtension(unsigned tag, PASN_Object::TagClass tagClass)
335 : PASN_Array(tag, tagClass)
340 PASN_Object * H4507_ArrayOf_MixedExtension::CreateObject() const
342 return new H4504_MixedExtension;
346 H4504_MixedExtension & H4507_ArrayOf_MixedExtension::operator[](PINDEX i) const
348 return (H4504_MixedExtension &)array[i];
352 PObject * H4507_ArrayOf_MixedExtension::Clone() const
354 #ifndef PASN_LEANANDMEAN
355 PAssert(IsClass(H4507_ArrayOf_MixedExtension::Class()), PInvalidCast);
356 #endif
357 return new H4507_ArrayOf_MixedExtension(*this);
362 // MWIActivateArg
365 H4507_MWIActivateArg::H4507_MWIActivateArg(unsigned tag, PASN_Object::TagClass tagClass)
366 : PASN_Sequence(tag, tagClass, 6, TRUE, 0)
368 m_priority.SetConstraints(PASN_Object::FixedConstraint, 0, 9);
369 m_extensionArg.SetConstraints(PASN_Object::FixedConstraint, 0, 255);
373 #ifndef PASN_NOPRINTON
374 void H4507_MWIActivateArg::PrintOn(ostream & strm) const
376 int indent = strm.precision() + 2;
377 strm << "{\n";
378 strm << setw(indent+15) << "servedUserNr = " << setprecision(indent) << m_servedUserNr << '\n';
379 strm << setw(indent+15) << "basicService = " << setprecision(indent) << m_basicService << '\n';
380 if (HasOptionalField(e_msgCentreId))
381 strm << setw(indent+14) << "msgCentreId = " << setprecision(indent) << m_msgCentreId << '\n';
382 if (HasOptionalField(e_nbOfMessages))
383 strm << setw(indent+15) << "nbOfMessages = " << setprecision(indent) << m_nbOfMessages << '\n';
384 if (HasOptionalField(e_originatingNr))
385 strm << setw(indent+16) << "originatingNr = " << setprecision(indent) << m_originatingNr << '\n';
386 if (HasOptionalField(e_timestamp))
387 strm << setw(indent+12) << "timestamp = " << setprecision(indent) << m_timestamp << '\n';
388 if (HasOptionalField(e_priority))
389 strm << setw(indent+11) << "priority = " << setprecision(indent) << m_priority << '\n';
390 if (HasOptionalField(e_extensionArg))
391 strm << setw(indent+15) << "extensionArg = " << setprecision(indent) << m_extensionArg << '\n';
392 strm << setw(indent-1) << setprecision(indent-2) << "}";
394 #endif
397 PObject::Comparison H4507_MWIActivateArg::Compare(const PObject & obj) const
399 #ifndef PASN_LEANANDMEAN
400 PAssert(PIsDescendant(&obj, H4507_MWIActivateArg), PInvalidCast);
401 #endif
402 const H4507_MWIActivateArg & other = (const H4507_MWIActivateArg &)obj;
404 Comparison result;
406 if ((result = m_servedUserNr.Compare(other.m_servedUserNr)) != EqualTo)
407 return result;
408 if ((result = m_basicService.Compare(other.m_basicService)) != EqualTo)
409 return result;
410 if ((result = m_msgCentreId.Compare(other.m_msgCentreId)) != EqualTo)
411 return result;
412 if ((result = m_nbOfMessages.Compare(other.m_nbOfMessages)) != EqualTo)
413 return result;
414 if ((result = m_originatingNr.Compare(other.m_originatingNr)) != EqualTo)
415 return result;
416 if ((result = m_timestamp.Compare(other.m_timestamp)) != EqualTo)
417 return result;
418 if ((result = m_priority.Compare(other.m_priority)) != EqualTo)
419 return result;
420 if ((result = m_extensionArg.Compare(other.m_extensionArg)) != EqualTo)
421 return result;
423 return PASN_Sequence::Compare(other);
427 PINDEX H4507_MWIActivateArg::GetDataLength() const
429 PINDEX length = 0;
430 length += m_servedUserNr.GetObjectLength();
431 length += m_basicService.GetObjectLength();
432 if (HasOptionalField(e_msgCentreId))
433 length += m_msgCentreId.GetObjectLength();
434 if (HasOptionalField(e_nbOfMessages))
435 length += m_nbOfMessages.GetObjectLength();
436 if (HasOptionalField(e_originatingNr))
437 length += m_originatingNr.GetObjectLength();
438 if (HasOptionalField(e_timestamp))
439 length += m_timestamp.GetObjectLength();
440 if (HasOptionalField(e_priority))
441 length += m_priority.GetObjectLength();
442 if (HasOptionalField(e_extensionArg))
443 length += m_extensionArg.GetObjectLength();
444 return length;
448 BOOL H4507_MWIActivateArg::Decode(PASN_Stream & strm)
450 if (!PreambleDecode(strm))
451 return FALSE;
453 if (!m_servedUserNr.Decode(strm))
454 return FALSE;
455 if (!m_basicService.Decode(strm))
456 return FALSE;
457 if (HasOptionalField(e_msgCentreId) && !m_msgCentreId.Decode(strm))
458 return FALSE;
459 if (HasOptionalField(e_nbOfMessages) && !m_nbOfMessages.Decode(strm))
460 return FALSE;
461 if (HasOptionalField(e_originatingNr) && !m_originatingNr.Decode(strm))
462 return FALSE;
463 if (HasOptionalField(e_timestamp) && !m_timestamp.Decode(strm))
464 return FALSE;
465 if (HasOptionalField(e_priority) && !m_priority.Decode(strm))
466 return FALSE;
467 if (HasOptionalField(e_extensionArg) && !m_extensionArg.Decode(strm))
468 return FALSE;
470 return UnknownExtensionsDecode(strm);
474 void H4507_MWIActivateArg::Encode(PASN_Stream & strm) const
476 PreambleEncode(strm);
478 m_servedUserNr.Encode(strm);
479 m_basicService.Encode(strm);
480 if (HasOptionalField(e_msgCentreId))
481 m_msgCentreId.Encode(strm);
482 if (HasOptionalField(e_nbOfMessages))
483 m_nbOfMessages.Encode(strm);
484 if (HasOptionalField(e_originatingNr))
485 m_originatingNr.Encode(strm);
486 if (HasOptionalField(e_timestamp))
487 m_timestamp.Encode(strm);
488 if (HasOptionalField(e_priority))
489 m_priority.Encode(strm);
490 if (HasOptionalField(e_extensionArg))
491 m_extensionArg.Encode(strm);
493 UnknownExtensionsEncode(strm);
497 PObject * H4507_MWIActivateArg::Clone() const
499 #ifndef PASN_LEANANDMEAN
500 PAssert(IsClass(H4507_MWIActivateArg::Class()), PInvalidCast);
501 #endif
502 return new H4507_MWIActivateArg(*this);
507 // MWIDeactivateArg
510 H4507_MWIDeactivateArg::H4507_MWIDeactivateArg(unsigned tag, PASN_Object::TagClass tagClass)
511 : PASN_Sequence(tag, tagClass, 3, TRUE, 0)
513 m_extensionArg.SetConstraints(PASN_Object::FixedConstraint, 0, 255);
517 #ifndef PASN_NOPRINTON
518 void H4507_MWIDeactivateArg::PrintOn(ostream & strm) const
520 int indent = strm.precision() + 2;
521 strm << "{\n";
522 strm << setw(indent+15) << "servedUserNr = " << setprecision(indent) << m_servedUserNr << '\n';
523 strm << setw(indent+15) << "basicService = " << setprecision(indent) << m_basicService << '\n';
524 if (HasOptionalField(e_msgCentreId))
525 strm << setw(indent+14) << "msgCentreId = " << setprecision(indent) << m_msgCentreId << '\n';
526 if (HasOptionalField(e_callbackReq))
527 strm << setw(indent+14) << "callbackReq = " << setprecision(indent) << m_callbackReq << '\n';
528 if (HasOptionalField(e_extensionArg))
529 strm << setw(indent+15) << "extensionArg = " << setprecision(indent) << m_extensionArg << '\n';
530 strm << setw(indent-1) << setprecision(indent-2) << "}";
532 #endif
535 PObject::Comparison H4507_MWIDeactivateArg::Compare(const PObject & obj) const
537 #ifndef PASN_LEANANDMEAN
538 PAssert(PIsDescendant(&obj, H4507_MWIDeactivateArg), PInvalidCast);
539 #endif
540 const H4507_MWIDeactivateArg & other = (const H4507_MWIDeactivateArg &)obj;
542 Comparison result;
544 if ((result = m_servedUserNr.Compare(other.m_servedUserNr)) != EqualTo)
545 return result;
546 if ((result = m_basicService.Compare(other.m_basicService)) != EqualTo)
547 return result;
548 if ((result = m_msgCentreId.Compare(other.m_msgCentreId)) != EqualTo)
549 return result;
550 if ((result = m_callbackReq.Compare(other.m_callbackReq)) != EqualTo)
551 return result;
552 if ((result = m_extensionArg.Compare(other.m_extensionArg)) != EqualTo)
553 return result;
555 return PASN_Sequence::Compare(other);
559 PINDEX H4507_MWIDeactivateArg::GetDataLength() const
561 PINDEX length = 0;
562 length += m_servedUserNr.GetObjectLength();
563 length += m_basicService.GetObjectLength();
564 if (HasOptionalField(e_msgCentreId))
565 length += m_msgCentreId.GetObjectLength();
566 if (HasOptionalField(e_callbackReq))
567 length += m_callbackReq.GetObjectLength();
568 if (HasOptionalField(e_extensionArg))
569 length += m_extensionArg.GetObjectLength();
570 return length;
574 BOOL H4507_MWIDeactivateArg::Decode(PASN_Stream & strm)
576 if (!PreambleDecode(strm))
577 return FALSE;
579 if (!m_servedUserNr.Decode(strm))
580 return FALSE;
581 if (!m_basicService.Decode(strm))
582 return FALSE;
583 if (HasOptionalField(e_msgCentreId) && !m_msgCentreId.Decode(strm))
584 return FALSE;
585 if (HasOptionalField(e_callbackReq) && !m_callbackReq.Decode(strm))
586 return FALSE;
587 if (HasOptionalField(e_extensionArg) && !m_extensionArg.Decode(strm))
588 return FALSE;
590 return UnknownExtensionsDecode(strm);
594 void H4507_MWIDeactivateArg::Encode(PASN_Stream & strm) const
596 PreambleEncode(strm);
598 m_servedUserNr.Encode(strm);
599 m_basicService.Encode(strm);
600 if (HasOptionalField(e_msgCentreId))
601 m_msgCentreId.Encode(strm);
602 if (HasOptionalField(e_callbackReq))
603 m_callbackReq.Encode(strm);
604 if (HasOptionalField(e_extensionArg))
605 m_extensionArg.Encode(strm);
607 UnknownExtensionsEncode(strm);
611 PObject * H4507_MWIDeactivateArg::Clone() const
613 #ifndef PASN_LEANANDMEAN
614 PAssert(IsClass(H4507_MWIDeactivateArg::Class()), PInvalidCast);
615 #endif
616 return new H4507_MWIDeactivateArg(*this);
621 // MWIInterrogateArg
624 H4507_MWIInterrogateArg::H4507_MWIInterrogateArg(unsigned tag, PASN_Object::TagClass tagClass)
625 : PASN_Sequence(tag, tagClass, 3, TRUE, 0)
627 m_extensionArg.SetConstraints(PASN_Object::FixedConstraint, 0, 255);
631 #ifndef PASN_NOPRINTON
632 void H4507_MWIInterrogateArg::PrintOn(ostream & strm) const
634 int indent = strm.precision() + 2;
635 strm << "{\n";
636 strm << setw(indent+15) << "servedUserNr = " << setprecision(indent) << m_servedUserNr << '\n';
637 strm << setw(indent+15) << "basicService = " << setprecision(indent) << m_basicService << '\n';
638 if (HasOptionalField(e_msgCentreId))
639 strm << setw(indent+14) << "msgCentreId = " << setprecision(indent) << m_msgCentreId << '\n';
640 if (HasOptionalField(e_callbackReq))
641 strm << setw(indent+14) << "callbackReq = " << setprecision(indent) << m_callbackReq << '\n';
642 if (HasOptionalField(e_extensionArg))
643 strm << setw(indent+15) << "extensionArg = " << setprecision(indent) << m_extensionArg << '\n';
644 strm << setw(indent-1) << setprecision(indent-2) << "}";
646 #endif
649 PObject::Comparison H4507_MWIInterrogateArg::Compare(const PObject & obj) const
651 #ifndef PASN_LEANANDMEAN
652 PAssert(PIsDescendant(&obj, H4507_MWIInterrogateArg), PInvalidCast);
653 #endif
654 const H4507_MWIInterrogateArg & other = (const H4507_MWIInterrogateArg &)obj;
656 Comparison result;
658 if ((result = m_servedUserNr.Compare(other.m_servedUserNr)) != EqualTo)
659 return result;
660 if ((result = m_basicService.Compare(other.m_basicService)) != EqualTo)
661 return result;
662 if ((result = m_msgCentreId.Compare(other.m_msgCentreId)) != EqualTo)
663 return result;
664 if ((result = m_callbackReq.Compare(other.m_callbackReq)) != EqualTo)
665 return result;
666 if ((result = m_extensionArg.Compare(other.m_extensionArg)) != EqualTo)
667 return result;
669 return PASN_Sequence::Compare(other);
673 PINDEX H4507_MWIInterrogateArg::GetDataLength() const
675 PINDEX length = 0;
676 length += m_servedUserNr.GetObjectLength();
677 length += m_basicService.GetObjectLength();
678 if (HasOptionalField(e_msgCentreId))
679 length += m_msgCentreId.GetObjectLength();
680 if (HasOptionalField(e_callbackReq))
681 length += m_callbackReq.GetObjectLength();
682 if (HasOptionalField(e_extensionArg))
683 length += m_extensionArg.GetObjectLength();
684 return length;
688 BOOL H4507_MWIInterrogateArg::Decode(PASN_Stream & strm)
690 if (!PreambleDecode(strm))
691 return FALSE;
693 if (!m_servedUserNr.Decode(strm))
694 return FALSE;
695 if (!m_basicService.Decode(strm))
696 return FALSE;
697 if (HasOptionalField(e_msgCentreId) && !m_msgCentreId.Decode(strm))
698 return FALSE;
699 if (HasOptionalField(e_callbackReq) && !m_callbackReq.Decode(strm))
700 return FALSE;
701 if (HasOptionalField(e_extensionArg) && !m_extensionArg.Decode(strm))
702 return FALSE;
704 return UnknownExtensionsDecode(strm);
708 void H4507_MWIInterrogateArg::Encode(PASN_Stream & strm) const
710 PreambleEncode(strm);
712 m_servedUserNr.Encode(strm);
713 m_basicService.Encode(strm);
714 if (HasOptionalField(e_msgCentreId))
715 m_msgCentreId.Encode(strm);
716 if (HasOptionalField(e_callbackReq))
717 m_callbackReq.Encode(strm);
718 if (HasOptionalField(e_extensionArg))
719 m_extensionArg.Encode(strm);
721 UnknownExtensionsEncode(strm);
725 PObject * H4507_MWIInterrogateArg::Clone() const
727 #ifndef PASN_LEANANDMEAN
728 PAssert(IsClass(H4507_MWIInterrogateArg::Class()), PInvalidCast);
729 #endif
730 return new H4507_MWIInterrogateArg(*this);
735 // MWIInterrogateResElt
738 H4507_MWIInterrogateResElt::H4507_MWIInterrogateResElt(unsigned tag, PASN_Object::TagClass tagClass)
739 : PASN_Sequence(tag, tagClass, 6, TRUE, 0)
741 m_priority.SetConstraints(PASN_Object::FixedConstraint, 0, 9);
742 m_extensionArg.SetConstraints(PASN_Object::FixedConstraint, 0, 255);
746 #ifndef PASN_NOPRINTON
747 void H4507_MWIInterrogateResElt::PrintOn(ostream & strm) const
749 int indent = strm.precision() + 2;
750 strm << "{\n";
751 strm << setw(indent+15) << "basicService = " << setprecision(indent) << m_basicService << '\n';
752 if (HasOptionalField(e_msgCentreId))
753 strm << setw(indent+14) << "msgCentreId = " << setprecision(indent) << m_msgCentreId << '\n';
754 if (HasOptionalField(e_nbOfMessages))
755 strm << setw(indent+15) << "nbOfMessages = " << setprecision(indent) << m_nbOfMessages << '\n';
756 if (HasOptionalField(e_originatingNr))
757 strm << setw(indent+16) << "originatingNr = " << setprecision(indent) << m_originatingNr << '\n';
758 if (HasOptionalField(e_timestamp))
759 strm << setw(indent+12) << "timestamp = " << setprecision(indent) << m_timestamp << '\n';
760 if (HasOptionalField(e_priority))
761 strm << setw(indent+11) << "priority = " << setprecision(indent) << m_priority << '\n';
762 if (HasOptionalField(e_extensionArg))
763 strm << setw(indent+15) << "extensionArg = " << setprecision(indent) << m_extensionArg << '\n';
764 strm << setw(indent-1) << setprecision(indent-2) << "}";
766 #endif
769 PObject::Comparison H4507_MWIInterrogateResElt::Compare(const PObject & obj) const
771 #ifndef PASN_LEANANDMEAN
772 PAssert(PIsDescendant(&obj, H4507_MWIInterrogateResElt), PInvalidCast);
773 #endif
774 const H4507_MWIInterrogateResElt & other = (const H4507_MWIInterrogateResElt &)obj;
776 Comparison result;
778 if ((result = m_basicService.Compare(other.m_basicService)) != EqualTo)
779 return result;
780 if ((result = m_msgCentreId.Compare(other.m_msgCentreId)) != EqualTo)
781 return result;
782 if ((result = m_nbOfMessages.Compare(other.m_nbOfMessages)) != EqualTo)
783 return result;
784 if ((result = m_originatingNr.Compare(other.m_originatingNr)) != EqualTo)
785 return result;
786 if ((result = m_timestamp.Compare(other.m_timestamp)) != EqualTo)
787 return result;
788 if ((result = m_priority.Compare(other.m_priority)) != EqualTo)
789 return result;
790 if ((result = m_extensionArg.Compare(other.m_extensionArg)) != EqualTo)
791 return result;
793 return PASN_Sequence::Compare(other);
797 PINDEX H4507_MWIInterrogateResElt::GetDataLength() const
799 PINDEX length = 0;
800 length += m_basicService.GetObjectLength();
801 if (HasOptionalField(e_msgCentreId))
802 length += m_msgCentreId.GetObjectLength();
803 if (HasOptionalField(e_nbOfMessages))
804 length += m_nbOfMessages.GetObjectLength();
805 if (HasOptionalField(e_originatingNr))
806 length += m_originatingNr.GetObjectLength();
807 if (HasOptionalField(e_timestamp))
808 length += m_timestamp.GetObjectLength();
809 if (HasOptionalField(e_priority))
810 length += m_priority.GetObjectLength();
811 if (HasOptionalField(e_extensionArg))
812 length += m_extensionArg.GetObjectLength();
813 return length;
817 BOOL H4507_MWIInterrogateResElt::Decode(PASN_Stream & strm)
819 if (!PreambleDecode(strm))
820 return FALSE;
822 if (!m_basicService.Decode(strm))
823 return FALSE;
824 if (HasOptionalField(e_msgCentreId) && !m_msgCentreId.Decode(strm))
825 return FALSE;
826 if (HasOptionalField(e_nbOfMessages) && !m_nbOfMessages.Decode(strm))
827 return FALSE;
828 if (HasOptionalField(e_originatingNr) && !m_originatingNr.Decode(strm))
829 return FALSE;
830 if (HasOptionalField(e_timestamp) && !m_timestamp.Decode(strm))
831 return FALSE;
832 if (HasOptionalField(e_priority) && !m_priority.Decode(strm))
833 return FALSE;
834 if (HasOptionalField(e_extensionArg) && !m_extensionArg.Decode(strm))
835 return FALSE;
837 return UnknownExtensionsDecode(strm);
841 void H4507_MWIInterrogateResElt::Encode(PASN_Stream & strm) const
843 PreambleEncode(strm);
845 m_basicService.Encode(strm);
846 if (HasOptionalField(e_msgCentreId))
847 m_msgCentreId.Encode(strm);
848 if (HasOptionalField(e_nbOfMessages))
849 m_nbOfMessages.Encode(strm);
850 if (HasOptionalField(e_originatingNr))
851 m_originatingNr.Encode(strm);
852 if (HasOptionalField(e_timestamp))
853 m_timestamp.Encode(strm);
854 if (HasOptionalField(e_priority))
855 m_priority.Encode(strm);
856 if (HasOptionalField(e_extensionArg))
857 m_extensionArg.Encode(strm);
859 UnknownExtensionsEncode(strm);
863 PObject * H4507_MWIInterrogateResElt::Clone() const
865 #ifndef PASN_LEANANDMEAN
866 PAssert(IsClass(H4507_MWIInterrogateResElt::Class()), PInvalidCast);
867 #endif
868 return new H4507_MWIInterrogateResElt(*this);
872 #endif // if ! H323_DISABLE_H4507
875 // End of h4507.cxx