/[resiprocate]/main/resip/dum/Profile.cxx
ViewVC logotype

Contents of /main/resip/dum/Profile.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10695 - (show annotations) (download)
Fri Nov 22 23:12:34 2013 UTC (5 years, 11 months ago) by sgodin
File MIME type: text/plain
File size: 23923 byte(s)
-Merged from b-uasprack-20130904
  -added UAS Prack support to DUM!  Original implementation taken from b-uasprack-20091103
  -many changes, fixes and enhancements from original branch
  -MasterProfile setting setUasReliableProvisionalMode is used to enable
  -added mode called SupportedEssential where we will send reliable provisionals only if they
   are a provisional that is carrying an offer or answer  - required for 3GPP IMS flows 
  -added resubmit timer for reliable responses to ensure we send a reliable provisional at least 
   every 2.5 minutes  -new profile setting: set1xxRelResubmitTime to support this
  -updated state diagrams and added new PRACK flow diagrams to dum/doc directory (removed old diagrams)
  -fixed update glare handling for UAC prack 
  -added in support for UAC Prack to be able to send an offer in the first PRACK response 
  (must call provideOffer from onAnswer callback)
  -made a helper method on DialogUsageManager to set advertised capabilities 
  -fixed missing break in ClientInviteSession::dispatchReceivedUpdateEarly 
  

  
  
1
2 #include "resip/dum/Profile.hxx"
3 #include "resip/stack/SipMessage.hxx"
4 #include "resip/stack/HeaderTypes.hxx"
5
6 using namespace resip;
7 #define RESIPROCATE_SUBSYSTEM Subsystem::DUM
8
9 Profile::Profile() :
10 mHasOutboundDecorator(false)
11 {
12 reset(); // set defaults
13 }
14
15 Profile::Profile(SharedPtr<Profile> baseProfile) :
16 mHasOutboundDecorator(false),
17 mBaseProfile(baseProfile)
18 {
19 assert(baseProfile.get());
20
21 reset(); // default all settings to fallthrough to mBaseProfile
22 }
23
24 Profile::~Profile()
25 {
26 }
27
28 void
29 Profile::reset()
30 {
31 unsetDefaultRegistrationTime();
32 unsetDefaultMaxRegistrationTime();
33 unsetDefaultRegistrationRetryTime();
34 unsetDefaultSubscriptionTime();
35 unsetDefaultPublicationTime();
36 unsetDefaultStaleCallTime();
37 unsetDefaultStaleReInviteTime();
38 unsetDefaultSessionTime();
39 unsetDefaultSessionTimerMode();
40 unset1xxRetransmissionTime();
41 unset1xxRelResubmitTime();
42 unsetOverrideHostAndPort();
43 unsetAdvertisedCapabilities();
44 unsetOutboundProxy();
45 unsetForceOutboundProxyOnAllRequestsEnabled();
46 unsetExpressOutboundAsRouteSetEnabled();
47 unsetRportEnabled();
48 unsetUserAgent();
49 unsetProxyRequires();
50 unsetKeepAliveTimeForDatagram();
51 unsetKeepAliveTimeForStream();
52 unsetFixedTransportPort();
53 unsetFixedTransportInterface();
54 unsetRinstanceEnabled();
55 unsetOutboundDecorator();
56 unsetMethodsParamEnabled();
57 unsetUserAgentCapabilities();
58 unsetExtraHeadersInReferNotifySipFragEnabled();
59 }
60
61 void
62 Profile::setDefaultRegistrationTime(UInt32 secs)
63 {
64 mDefaultRegistrationExpires = secs;
65 mHasDefaultRegistrationExpires = true;
66 }
67
68 UInt32
69 Profile::getDefaultRegistrationTime() const
70 {
71 // Fall through seting (if required)
72 if(!mHasDefaultRegistrationExpires && mBaseProfile.get())
73 {
74 return mBaseProfile->getDefaultRegistrationTime();
75 }
76 return mDefaultRegistrationExpires;
77 }
78
79 void
80 Profile::unsetDefaultRegistrationTime()
81 {
82 if(mBaseProfile.get())
83 {
84 mHasDefaultRegistrationExpires = false;
85 }
86 else // No Base profile - so return to default setting
87 {
88 mHasDefaultRegistrationExpires = true;
89 mDefaultRegistrationExpires = 3600; // 1 hour
90 }
91 }
92
93 void
94 Profile::setDefaultMaxRegistrationTime(UInt32 secs)
95 {
96 mDefaultMaxRegistrationExpires = secs;
97 mHasDefaultMaxRegistrationExpires = true;
98 }
99
100 UInt32
101 Profile::getDefaultMaxRegistrationTime() const
102 {
103 // Fall through seting (if required)
104 if(!mHasDefaultMaxRegistrationExpires && mBaseProfile.get())
105 {
106 return mBaseProfile->getDefaultMaxRegistrationTime();
107 }
108 return mDefaultMaxRegistrationExpires;
109 }
110
111 void
112 Profile::unsetDefaultMaxRegistrationTime()
113 {
114 if(mBaseProfile.get())
115 {
116 mHasDefaultMaxRegistrationExpires = false;
117 }
118 else // No Base profile - so return to default setting
119 {
120 mHasDefaultMaxRegistrationExpires = true;
121 mDefaultMaxRegistrationExpires = 0; // No restriction
122 }
123 }
124
125 void
126 Profile::setDefaultRegistrationRetryTime(int secs)
127 {
128 mDefaultRegistrationRetryInterval = secs;
129 mHasDefaultRegistrationRetryInterval = true;
130 }
131
132 int
133 Profile::getDefaultRegistrationRetryTime() const
134 {
135 // Fall through seting (if required)
136 if(!mHasDefaultRegistrationRetryInterval && mBaseProfile.get())
137 {
138 return mBaseProfile->getDefaultRegistrationRetryTime();
139 }
140 return mDefaultRegistrationRetryInterval;
141 }
142
143 void
144 Profile::unsetDefaultRegistrationRetryTime()
145 {
146 if(mBaseProfile.get())
147 {
148 mHasDefaultRegistrationRetryInterval = false;
149 }
150 else // No Base profile - so return to default setting
151 {
152 mHasDefaultRegistrationRetryInterval = true;
153 mDefaultRegistrationRetryInterval = 0; // Retries disabled
154 }
155 }
156
157 void
158 Profile::setDefaultSubscriptionTime(UInt32 secs)
159 {
160 mDefaultSubscriptionExpires = secs;
161 mHasDefaultSubscriptionExpires = true;
162 }
163
164 UInt32
165 Profile::getDefaultSubscriptionTime() const
166 {
167 // Fall through seting (if required)
168 if(!mHasDefaultSubscriptionExpires && mBaseProfile.get())
169 {
170 return mBaseProfile->getDefaultSubscriptionTime();
171 }
172 return mDefaultSubscriptionExpires;
173 }
174
175 void
176 Profile::unsetDefaultSubscriptionTime()
177 {
178 if(mBaseProfile.get())
179 {
180 mHasDefaultSubscriptionExpires = false;
181 }
182 else // No Base profile - so return to default setting
183 {
184 mHasDefaultSubscriptionExpires = true;
185 mDefaultSubscriptionExpires = 3600; // 1 hour
186 }
187 }
188
189 void
190 Profile::setDefaultPublicationTime(UInt32 secs)
191 {
192 mDefaultPublicationExpires = secs;
193 mHasDefaultPublicationExpires = true;
194 }
195
196 UInt32
197 Profile::getDefaultPublicationTime() const
198 {
199 // Fall through seting (if required)
200 if(!mHasDefaultPublicationExpires && mBaseProfile.get())
201 {
202 return mBaseProfile->getDefaultPublicationTime();
203 }
204 return mDefaultPublicationExpires;
205 }
206
207 void
208 Profile::unsetDefaultPublicationTime()
209 {
210 if(mBaseProfile.get())
211 {
212 mHasDefaultPublicationExpires = false;
213 }
214 else // No Base profile - so return to default setting
215 {
216 mHasDefaultPublicationExpires = true;
217 mDefaultPublicationExpires = 3600; // 1 hour
218 }
219 }
220
221 void
222 Profile::setDefaultStaleCallTime(int secs)
223 {
224 mDefaultStaleCallTime = secs;
225 mHasDefaultStaleCallTime = true;
226 }
227
228 int
229 Profile::getDefaultStaleCallTime() const
230 {
231 // Fall through seting (if required)
232 if(!mHasDefaultStaleCallTime && mBaseProfile.get())
233 {
234 return mBaseProfile->getDefaultStaleCallTime();
235 }
236 return mDefaultStaleCallTime;
237 }
238
239 void
240 Profile::unsetDefaultStaleCallTime()
241 {
242 if(mBaseProfile.get())
243 {
244 mHasDefaultStaleCallTime = false;
245 }
246 else // No Base profile - so return to default setting
247 {
248 mHasDefaultStaleCallTime = true;
249 mDefaultStaleCallTime = 180; // 3 minutes
250 }
251 }
252
253 void
254 Profile::setDefaultStaleReInviteTime(int secs)
255 {
256 mDefaultStaleReInviteTime = secs;
257 mHasDefaultStaleReInviteTime = true;
258 }
259
260 int
261 Profile::getDefaultStaleReInviteTime() const
262 {
263 // Fall through seting (if required)
264 if(!mHasDefaultStaleReInviteTime && mBaseProfile.get())
265 {
266 return mBaseProfile->getDefaultStaleReInviteTime();
267 }
268 return mDefaultStaleReInviteTime;
269 }
270
271 void
272 Profile::unsetDefaultStaleReInviteTime()
273 {
274 if(mBaseProfile.get())
275 {
276 mHasDefaultStaleReInviteTime = false;
277 }
278 else // No Base profile - so return to default setting
279 {
280 mHasDefaultStaleReInviteTime = true;
281 mDefaultStaleReInviteTime = 40; // 40 Seconds (slightly longer than T1*64)
282 }
283 }
284
285 void
286 Profile::setDefaultSessionTime(UInt32 secs)
287 {
288 mDefaultSessionExpires = secs;
289 mHasDefaultSessionExpires = true;
290 }
291
292 UInt32
293 Profile::getDefaultSessionTime() const
294 {
295 // Fall through seting (if required)
296 if(!mHasDefaultSessionExpires && mBaseProfile.get())
297 {
298 return mBaseProfile->getDefaultSessionTime();
299 }
300 return mDefaultSessionExpires;
301 }
302
303 void
304 Profile::unsetDefaultSessionTime()
305 {
306 if(mBaseProfile.get())
307 {
308 mHasDefaultSessionExpires = false;
309 }
310 else // No Base profile - so return to default setting
311 {
312 mHasDefaultSessionExpires = true;
313 mDefaultSessionExpires = 1800; // 30 minutes
314 }
315 }
316
317 void
318 Profile::setDefaultSessionTimerMode(Profile::SessionTimerMode mode)
319 {
320 mDefaultSessionTimerMode = mode;
321 mHasDefaultSessionTimerMode = true;
322 }
323
324 Profile::SessionTimerMode
325 Profile::getDefaultSessionTimerMode() const
326 {
327 // Fall through seting (if required)
328 if(!mHasDefaultSessionTimerMode && mBaseProfile.get())
329 {
330 return mBaseProfile->getDefaultSessionTimerMode();
331 }
332 return mDefaultSessionTimerMode;
333 }
334
335 void
336 Profile::unsetDefaultSessionTimerMode()
337 {
338 if(mBaseProfile.get())
339 {
340 mHasDefaultSessionTimerMode = false;
341 }
342 else // No Base profile - so return to default setting
343 {
344 mHasDefaultSessionTimerMode = true;
345 mDefaultSessionTimerMode = Profile::PreferCallerRefreshes;
346 }
347 }
348
349 void
350 Profile::set1xxRetransmissionTime(int secs)
351 {
352 m1xxRetransmissionTime = secs;
353 mHas1xxRetransmissionTime = true;
354 }
355
356 int
357 Profile::get1xxRetransmissionTime() const
358 {
359 // Fall through seting (if required)
360 if(!mHas1xxRetransmissionTime && mBaseProfile.get())
361 {
362 return mBaseProfile->get1xxRetransmissionTime();
363 }
364 return m1xxRetransmissionTime;
365 }
366
367 void
368 Profile::unset1xxRetransmissionTime()
369 {
370 if(mBaseProfile.get())
371 {
372 mHas1xxRetransmissionTime = false;
373 }
374 else // No Base profile - so return to default setting
375 {
376 mHas1xxRetransmissionTime = true;
377 m1xxRetransmissionTime = 60; // RFC3261 13.3.1 specifies this timeout should be 1 minute
378 }
379 }
380
381 void
382 Profile::set1xxRelResubmitTime(int secs)
383 {
384 m1xxRelResubmitTime = secs;
385 mHas1xxRelResubmitTime = true;
386 }
387
388 int
389 Profile::get1xxRelResubmitTime() const
390 {
391 // Fall through seting (if required)
392 if(!mHas1xxRelResubmitTime && mBaseProfile.get())
393 {
394 return mBaseProfile->get1xxRelResubmitTime();
395 }
396 return m1xxRelResubmitTime;
397 }
398
399 void
400 Profile::unset1xxRelResubmitTime()
401 {
402 if(mBaseProfile.get())
403 {
404 mHas1xxRelResubmitTime = false;
405 }
406 else // No Base profile - so return to default setting
407 {
408 mHas1xxRelResubmitTime = true;
409 m1xxRelResubmitTime = 150; // RFC3262 section says the UAS SHOULD send provisional reliable responses once every two and half minutes
410 }
411 }
412
413 void
414 Profile::setOverrideHostAndPort(const Uri& hostPort)
415 {
416 mOverrideHostPort = hostPort;
417 mHasOverrideHostPort = true;
418 }
419
420 bool
421 Profile::hasOverrideHostAndPort() const
422 {
423 // Fall through seting (if required)
424 if(!mHasOverrideHostPort && mBaseProfile.get())
425 {
426 return mBaseProfile->hasOverrideHostAndPort();
427 }
428 return mHasOverrideHostPort;
429 }
430
431 const Uri&
432 Profile::getOverrideHostAndPort() const
433 {
434 // Fall through seting (if required)
435 if(!mHasOverrideHostPort && mBaseProfile.get())
436 {
437 return mBaseProfile->getOverrideHostAndPort();
438 }
439 return mOverrideHostPort;
440 }
441
442 void
443 Profile::unsetOverrideHostAndPort()
444 {
445 mHasOverrideHostPort = false;
446 }
447
448 void
449 Profile::addAdvertisedCapability(const Headers::Type header)
450 {
451 assert(header == Headers::Allow ||
452 header == Headers::AcceptEncoding ||
453 header == Headers::AcceptLanguage ||
454 header == Headers::AllowEvents ||
455 header == Headers::Supported);
456
457 mAdvertisedCapabilities.insert(header);
458 mHasAdvertisedCapabilities = true;
459 }
460
461 bool
462 Profile::isAdvertisedCapability(const Headers::Type header) const
463 {
464 // Fall through seting (if required)
465 if(!mHasAdvertisedCapabilities && mBaseProfile.get())
466 {
467 return mBaseProfile->isAdvertisedCapability(header);
468 }
469 return mAdvertisedCapabilities.count(header) != 0;
470 }
471
472 void
473 Profile::clearAdvertisedCapabilities(void)
474 {
475 mHasAdvertisedCapabilities = true;
476 return mAdvertisedCapabilities.clear();
477 }
478
479 void
480 Profile::unsetAdvertisedCapabilities()
481 {
482 if(mBaseProfile.get())
483 {
484 mHasAdvertisedCapabilities = false;
485 }
486 else // No Base profile - so return to default setting
487 {
488 mHasAdvertisedCapabilities = true;
489 addAdvertisedCapability(Headers::Allow);
490 addAdvertisedCapability(Headers::Supported);
491 }
492 }
493
494 void
495 Profile::setOutboundProxy( const Uri& uri )
496 {
497 Uri tmpUri(uri);
498 tmpUri.param(p_lr);
499 mOutboundProxy = NameAddr(tmpUri);
500 mHasOutboundProxy = true;
501 }
502
503 const NameAddr&
504 Profile::getOutboundProxy() const
505 {
506 // Fall through seting (if required)
507 if(!mHasOutboundProxy && mBaseProfile.get())
508 {
509 return mBaseProfile->getOutboundProxy();
510 }
511 assert(mHasOutboundProxy);
512 return mOutboundProxy;
513 }
514
515 bool
516 Profile::hasOutboundProxy() const
517 {
518 // Fall through seting (if required)
519 if(!mHasOutboundProxy && mBaseProfile.get())
520 {
521 return mBaseProfile->hasOutboundProxy();
522 }
523 return mHasOutboundProxy;
524 }
525
526 void
527 Profile::unsetOutboundProxy()
528 {
529 mHasOutboundProxy = false;
530 }
531
532 void
533 Profile::setForceOutboundProxyOnAllRequestsEnabled(bool enabled)
534 {
535 mForceOutboundProxyOnAllRequestsEnabled = enabled;
536 mHasForceOutboundProxyOnAllRequestsEnabled = true;
537 }
538
539 bool
540 Profile::getForceOutboundProxyOnAllRequestsEnabled() const
541 {
542 // Fall through seting (if required)
543 if(!mHasForceOutboundProxyOnAllRequestsEnabled && mBaseProfile.get())
544 {
545 return mBaseProfile->getForceOutboundProxyOnAllRequestsEnabled();
546 }
547 return mForceOutboundProxyOnAllRequestsEnabled;
548 }
549
550 void
551 Profile::unsetForceOutboundProxyOnAllRequestsEnabled()
552 {
553 if(mBaseProfile.get())
554 {
555 mHasForceOutboundProxyOnAllRequestsEnabled = false;
556 }
557 else
558 {
559 mHasForceOutboundProxyOnAllRequestsEnabled = true;
560 mForceOutboundProxyOnAllRequestsEnabled = false;
561 }
562 }
563
564 void
565 Profile::setExpressOutboundAsRouteSetEnabled(bool enabled)
566 {
567 mExpressOutboundAsRouteSetEnabled = enabled;
568 mHasExpressOutboundAsRouteSetEnabled = true;
569 }
570
571 bool
572 Profile::getExpressOutboundAsRouteSetEnabled() const
573 {
574 // Fall through seting (if required)
575 if(!mHasExpressOutboundAsRouteSetEnabled && mBaseProfile.get())
576 {
577 return mBaseProfile->getExpressOutboundAsRouteSetEnabled();
578 }
579 return mExpressOutboundAsRouteSetEnabled;
580 }
581
582 void
583 Profile::unsetExpressOutboundAsRouteSetEnabled()
584 {
585 if(mBaseProfile.get())
586 {
587 mHasExpressOutboundAsRouteSetEnabled = false;
588 }
589 else
590 {
591 mHasExpressOutboundAsRouteSetEnabled = true;
592 mExpressOutboundAsRouteSetEnabled = false;
593 }
594 }
595
596 void
597 Profile::setRportEnabled(bool enabled)
598 {
599 mRportEnabled = enabled;
600 mHasRportEnabled = true;
601 }
602
603 bool
604 Profile::getRportEnabled() const
605 {
606 // Fall through seting (if required)
607 if(!mHasRportEnabled && mBaseProfile.get())
608 {
609 return mBaseProfile->getRportEnabled();
610 }
611 return mRportEnabled;
612 }
613
614 void
615 Profile::unsetRportEnabled()
616 {
617 if(mBaseProfile.get())
618 {
619 mHasRportEnabled = false;
620 }
621 else // No Base profile - so return to default setting
622 {
623 mHasRportEnabled = true;
624 mRportEnabled = true;
625 }
626 }
627
628 void
629 Profile::setUserAgent( const Data& userAgent )
630 {
631 mUserAgent = userAgent;
632 mHasUserAgent = true;
633 }
634
635 const Data&
636 Profile::getUserAgent() const
637 {
638 // Fall through seting (if required)
639 if(!mHasUserAgent && mBaseProfile.get())
640 {
641 return mBaseProfile->getUserAgent();
642 }
643 assert(mHasUserAgent);
644 return mUserAgent;
645 }
646
647 bool
648 Profile::hasUserAgent() const
649 {
650 // Fall through seting (if required)
651 if(!mHasUserAgent && mBaseProfile.get())
652 {
653 return mBaseProfile->hasUserAgent();
654 }
655 return mHasUserAgent;
656 }
657
658 void
659 Profile::unsetUserAgent()
660 {
661 mHasUserAgent = false;
662 }
663
664 void
665 Profile::setProxyRequires( const Tokens& proxyRequires )
666 {
667 mProxyRequires = proxyRequires;
668 mHasProxyRequires = true;
669 }
670
671 const Tokens&
672 Profile::getProxyRequires() const
673 {
674 // Fall through seting (if required)
675 if(!mHasProxyRequires && mBaseProfile.get())
676 {
677 return mBaseProfile->getProxyRequires();
678 }
679 assert(mHasProxyRequires);
680 return mProxyRequires;
681 }
682
683 bool
684 Profile::hasProxyRequires() const
685 {
686 // Fall through seting (if required)
687 if(!mHasProxyRequires && mBaseProfile.get())
688 {
689 return mBaseProfile->hasProxyRequires();
690 }
691 return mHasProxyRequires;
692 }
693
694 void
695 Profile::unsetProxyRequires()
696 {
697 mHasProxyRequires = false;
698 }
699
700 void
701 Profile::setKeepAliveTimeForDatagram(int keepAliveTime)
702 {
703 mKeepAliveTimeForDatagram = keepAliveTime;
704 mHasKeepAliveTimeForDatagram = true;
705 }
706
707 int
708 Profile::getKeepAliveTimeForDatagram() const
709 {
710 // Fall through seting (if required)
711 if(!mHasKeepAliveTimeForDatagram && mBaseProfile.get())
712 {
713 return mBaseProfile->getKeepAliveTimeForDatagram();
714 }
715 return mKeepAliveTimeForDatagram;
716 }
717
718 void
719 Profile::unsetKeepAliveTimeForDatagram()
720 {
721 if(mBaseProfile.get())
722 {
723 mHasKeepAliveTimeForDatagram = false;
724 }
725 else // No Base profile - so return to default setting
726 {
727 mHasKeepAliveTimeForDatagram = true;
728 mKeepAliveTimeForDatagram = 30; // 30 seconds.
729 }
730 }
731
732 void
733 Profile::setKeepAliveTimeForStream(int keepAliveTime)
734 {
735 mKeepAliveTimeForStream = keepAliveTime;
736 mHasKeepAliveTimeForStream = true;
737 }
738
739 int
740 Profile::getKeepAliveTimeForStream() const
741 {
742 // Fall through seting (if required)
743 if(!mHasKeepAliveTimeForStream && mBaseProfile.get())
744 {
745 return mBaseProfile->getKeepAliveTimeForStream();
746 }
747 return mKeepAliveTimeForStream;
748 }
749
750 void
751 Profile::unsetKeepAliveTimeForStream()
752 {
753 if(mBaseProfile.get())
754 {
755 mHasKeepAliveTimeForStream = false;
756 }
757 else // No Base profile - so return to default setting
758 {
759 mHasKeepAliveTimeForStream = true;
760 mKeepAliveTimeForStream = 180; // 3 minutes.
761 }
762 }
763
764 void
765 Profile::setFixedTransportPort(int fixedTransportPort)
766 {
767 mFixedTransportPort = fixedTransportPort;
768 mHasFixedTransportPort = true;
769 }
770
771 int
772 Profile::getFixedTransportPort() const
773 {
774 // Fall through seting (if required)
775 if(!mHasFixedTransportPort && mBaseProfile.get())
776 {
777 return mBaseProfile->getFixedTransportPort();
778 }
779 return mFixedTransportPort;
780 }
781
782 void
783 Profile::unsetFixedTransportPort()
784 {
785 if(mBaseProfile.get())
786 {
787 mHasFixedTransportPort = false;
788 }
789 else // No Base profile - so return to default setting
790 {
791 mHasFixedTransportPort = true;
792 mFixedTransportPort = 0;
793 }
794 }
795
796 void
797 Profile::setFixedTransportInterface(const Data& fixedTransportInterface)
798 {
799 mFixedTransportInterface = fixedTransportInterface;
800 mHasFixedTransportInterface = true;
801 }
802
803 const Data&
804 Profile::getFixedTransportInterface() const
805 {
806 // Fall through seting (if required)
807 if(!mHasFixedTransportInterface && mBaseProfile.get())
808 {
809 return mBaseProfile->getFixedTransportInterface();
810 }
811 return mFixedTransportInterface;
812 }
813
814 void
815 Profile::unsetFixedTransportInterface()
816 {
817 if(mBaseProfile.get())
818 {
819 mHasFixedTransportInterface = false;
820 }
821 else // No Base profile - so return to default setting
822 {
823 mHasFixedTransportInterface = true;
824 mFixedTransportInterface = Data::Empty;
825 }
826 }
827
828
829 void
830 Profile::setRinstanceEnabled(bool enabled)
831 {
832 mRinstanceEnabled = enabled;
833 mHasRinstanceEnabled = true;
834 }
835
836 bool
837 Profile::getRinstanceEnabled() const
838 {
839 // Fall through seting (if required)
840 if(!mHasRinstanceEnabled && mBaseProfile.get())
841 {
842 return mBaseProfile->getRinstanceEnabled();
843 }
844 return mRinstanceEnabled;
845 }
846
847 void
848 Profile::unsetRinstanceEnabled()
849 {
850 if(mBaseProfile.get())
851 {
852 mHasRinstanceEnabled = false;
853 }
854 else
855 {
856 mHasRinstanceEnabled = true;
857 mRinstanceEnabled = true;
858 }
859 }
860
861 ////If set then dum will add this MessageDecorator to all outbound messages
862 //virtual void setOutboundDecorator(SharedPtr<MessageDecorator> outboundDecorator);
863 //virtual SharedPtr<MessageDecorator> getOutboundDecorator();
864 //virtual void unsetOutboundDecorator();
865
866 void
867 Profile::setOutboundDecorator(SharedPtr<MessageDecorator> outboundDecorator)
868 {
869 mOutboundDecorator = outboundDecorator;
870 mHasOutboundDecorator = true;
871 }
872
873 SharedPtr<MessageDecorator>
874 Profile::getOutboundDecorator()
875 {
876 // Fall through seting (if required)
877 if(!mHasOutboundDecorator && mBaseProfile.get())
878 {
879 return mBaseProfile->getOutboundDecorator();
880 }
881 return mOutboundDecorator;
882 }
883
884 void
885 Profile::unsetOutboundDecorator()
886 {
887 if (mHasOutboundDecorator)
888 {
889 mOutboundDecorator.reset();
890 }
891
892 mHasOutboundDecorator = false;
893 }
894
895 void
896 Profile::setMethodsParamEnabled(bool enabled)
897 {
898 mMethodsParamEnabled = enabled;
899 mHasMethodsParamEnabled = true;
900 }
901
902 bool
903 Profile::getMethodsParamEnabled() const
904 {
905 // Fall through seting (if required)
906 if(!mHasMethodsParamEnabled && mBaseProfile.get())
907 {
908 return mBaseProfile->getMethodsParamEnabled();
909 }
910 return mMethodsParamEnabled;
911 }
912
913 void
914 Profile::unsetMethodsParamEnabled()
915 {
916 if(mBaseProfile.get())
917 {
918 mHasMethodsParamEnabled = false;
919 }
920 else
921 {
922 mHasMethodsParamEnabled = true;
923 mMethodsParamEnabled = false;
924 }
925 }
926
927 void
928 Profile::setUserAgentCapabilities(const NameAddr& capabilities)
929 {
930 mUserAgentCapabilities = capabilities;
931 mHasUserAgentCapabilities = true;
932 }
933
934 const NameAddr&
935 Profile::getUserAgentCapabilities() const
936 {
937 // Fall through seting (if required)
938 if(!mHasUserAgentCapabilities && mBaseProfile.get())
939 {
940 return mBaseProfile->getUserAgentCapabilities();
941 }
942 assert(mHasUserAgentCapabilities);
943 return mUserAgentCapabilities;
944 }
945
946 bool
947 Profile::hasUserAgentCapabilities() const
948 {
949 // Fall through seting (if required)
950 if(!mHasUserAgentCapabilities && mBaseProfile.get())
951 {
952 return mBaseProfile->hasUserAgentCapabilities();
953 }
954 return mHasUserAgentCapabilities;
955 }
956
957 void
958 Profile::unsetUserAgentCapabilities()
959 {
960 mHasUserAgentCapabilities = false;
961 }
962
963 void
964 Profile::setExtraHeadersInReferNotifySipFragEnabled(bool enabled)
965 {
966 mExtraHeadersInReferNotifySipFragEnabled = enabled;
967 mHasExtraHeadersInReferNotifySipFragEnabled = true;
968 }
969
970 bool
971 Profile::getExtraHeadersInReferNotifySipFragEnabled() const
972 {
973 // Fall through seting (if required)
974 if(!mHasExtraHeadersInReferNotifySipFragEnabled && mBaseProfile.get())
975 {
976 return mBaseProfile->getExtraHeadersInReferNotifySipFragEnabled();
977 }
978 return mExtraHeadersInReferNotifySipFragEnabled;
979 }
980
981 void
982 Profile::unsetExtraHeadersInReferNotifySipFragEnabled()
983 {
984 if(mBaseProfile.get())
985 {
986 mHasExtraHeadersInReferNotifySipFragEnabled = false;
987 }
988 else
989 {
990 mHasExtraHeadersInReferNotifySipFragEnabled = true;
991 mExtraHeadersInReferNotifySipFragEnabled = false;
992 }
993 }
994
995
996 /* ====================================================================
997 * The Vovida Software License, Version 1.0
998 *
999 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
1000 *
1001 * Redistribution and use in source and binary forms, with or without
1002 * modification, are permitted provided that the following conditions
1003 * are met:
1004 *
1005 * 1. Redistributions of source code must retain the above copyright
1006 * notice, this list of conditions and the following disclaimer.
1007 *
1008 * 2. Redistributions in binary form must reproduce the above copyright
1009 * notice, this list of conditions and the following disclaimer in
1010 * the documentation and/or other materials provided with the
1011 * distribution.
1012 *
1013 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
1014 * and "Vovida Open Communication Application Library (VOCAL)" must
1015 * not be used to endorse or promote products derived from this
1016 * software without prior written permission. For written
1017 * permission, please contact vocal@vovida.org.
1018 *
1019 * 4. Products derived from this software may not be called "VOCAL", nor
1020 * may "VOCAL" appear in their name, without prior written
1021 * permission of Vovida Networks, Inc.
1022 *
1023 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
1024 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1025 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
1026 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
1027 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
1028 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
1029 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1030 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
1031 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
1032 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1033 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
1034 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
1035 * DAMAGE.
1036 *
1037 * ====================================================================
1038 *
1039 * This software consists of voluntary contributions made by Vovida
1040 * Networks, Inc. and many individuals on behalf of Vovida Networks,
1041 * Inc. For more information on Vovida Networks, Inc., please see
1042 * <http://www.vovida.org/>.
1043 *
1044 */

Properties

Name Value
svn:eol-style native
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27