reSIProcate/DialogUsageManager  9694
Profile.cxx
Go to the documentation of this file.
00001 
00002 #include "resip/dum/Profile.hxx"
00003 #include "resip/stack/SipMessage.hxx"
00004 #include "resip/stack/HeaderTypes.hxx"
00005 
00006 using namespace resip;
00007 #define RESIPROCATE_SUBSYSTEM Subsystem::DUM
00008 
00009 Profile::Profile() :
00010    mHasOutboundDecorator(false)
00011 {
00012    reset();  // set defaults
00013 }
00014 
00015 Profile::Profile(SharedPtr<Profile> baseProfile) : 
00016    mHasOutboundDecorator(false),
00017    mBaseProfile(baseProfile)
00018 {
00019    assert(baseProfile.get());
00020 
00021    reset();  // default all settings to fallthrough to mBaseProfile
00022 }
00023 
00024 Profile::~Profile()
00025 {
00026 }
00027 
00028 void
00029 Profile::reset()
00030 {
00031    unsetDefaultRegistrationTime();  
00032    unsetDefaultMaxRegistrationTime();   
00033    unsetDefaultRegistrationRetryTime();   
00034    unsetDefaultSubscriptionTime();   
00035    unsetDefaultPublicationTime();  
00036    unsetDefaultStaleCallTime();  
00037    unsetDefaultStaleReInviteTime();  
00038    unsetDefaultSessionTime(); 
00039    unsetDefaultSessionTimerMode();   
00040    unset1xxRetransmissionTime();   
00041    unsetOverrideHostAndPort(); 
00042    unsetAdvertisedCapabilities();
00043    unsetOutboundProxy(); 
00044    unsetForceOutboundProxyOnAllRequestsEnabled();
00045    unsetExpressOutboundAsRouteSetEnabled();
00046    unsetRportEnabled(); 
00047    unsetUserAgent(); 
00048    unsetProxyRequires(); 
00049    unsetKeepAliveTimeForDatagram();
00050    unsetKeepAliveTimeForStream();
00051    unsetFixedTransportPort(); 
00052    unsetFixedTransportInterface(); 
00053    unsetRinstanceEnabled();
00054    unsetOutboundDecorator();
00055    unsetMethodsParamEnabled();
00056    unsetUserAgentCapabilities();
00057    unsetExtraHeadersInReferNotifySipFragEnabled();
00058 }
00059 
00060 void
00061 Profile::setDefaultRegistrationTime(UInt32 secs)
00062 {
00063    mDefaultRegistrationExpires = secs;
00064    mHasDefaultRegistrationExpires = true;
00065 }
00066 
00067 UInt32 
00068 Profile::getDefaultRegistrationTime() const
00069 {
00070    // Fall through seting (if required)
00071    if(!mHasDefaultRegistrationExpires && mBaseProfile.get())
00072    {
00073        return mBaseProfile->getDefaultRegistrationTime();
00074    }
00075    return mDefaultRegistrationExpires;
00076 }
00077 
00078 void
00079 Profile::unsetDefaultRegistrationTime()
00080 {
00081    if(mBaseProfile.get()) 
00082    {
00083       mHasDefaultRegistrationExpires = false;
00084    }
00085    else // No Base profile - so return to default setting
00086    {
00087       mHasDefaultRegistrationExpires = true;
00088       mDefaultRegistrationExpires = 3600; // 1 hour
00089    }
00090 }
00091 
00092 void
00093 Profile::setDefaultMaxRegistrationTime(UInt32 secs)
00094 {
00095    mDefaultMaxRegistrationExpires = secs;
00096    mHasDefaultMaxRegistrationExpires = true;
00097 }
00098 
00099 UInt32 
00100 Profile::getDefaultMaxRegistrationTime() const
00101 {
00102    // Fall through seting (if required)
00103    if(!mHasDefaultMaxRegistrationExpires && mBaseProfile.get())
00104    {
00105        return mBaseProfile->getDefaultMaxRegistrationTime();
00106    }
00107    return mDefaultMaxRegistrationExpires;
00108 }
00109 
00110 void
00111 Profile::unsetDefaultMaxRegistrationTime()
00112 {
00113    if(mBaseProfile.get()) 
00114    {
00115       mHasDefaultMaxRegistrationExpires = false;
00116    }
00117    else // No Base profile - so return to default setting
00118    {
00119       mHasDefaultMaxRegistrationExpires = true;
00120       mDefaultMaxRegistrationExpires = 0; // No restriction
00121    }
00122 }
00123 
00124 void
00125 Profile::setDefaultRegistrationRetryTime(int secs)
00126 {
00127    mDefaultRegistrationRetryInterval = secs;
00128    mHasDefaultRegistrationRetryInterval = true;
00129 }
00130 
00131 int 
00132 Profile::getDefaultRegistrationRetryTime() const
00133 {
00134    // Fall through seting (if required)
00135    if(!mHasDefaultRegistrationRetryInterval && mBaseProfile.get())
00136    {
00137        return mBaseProfile->getDefaultRegistrationRetryTime();
00138    }
00139    return mDefaultRegistrationRetryInterval;
00140 }
00141 
00142 void
00143 Profile::unsetDefaultRegistrationRetryTime()
00144 {
00145    if(mBaseProfile.get()) 
00146    {
00147       mHasDefaultRegistrationRetryInterval = false;
00148    }
00149    else // No Base profile - so return to default setting
00150    {
00151       mHasDefaultRegistrationRetryInterval = true;
00152       mDefaultRegistrationRetryInterval = 0; // Retries disabled
00153    }
00154 }
00155 
00156 void
00157 Profile::setDefaultSubscriptionTime(UInt32 secs)
00158 {
00159    mDefaultSubscriptionExpires = secs;
00160    mHasDefaultSubscriptionExpires = true;
00161 }
00162 
00163 UInt32 
00164 Profile::getDefaultSubscriptionTime() const
00165 {
00166    // Fall through seting (if required)
00167    if(!mHasDefaultSubscriptionExpires && mBaseProfile.get())
00168    {
00169        return mBaseProfile->getDefaultSubscriptionTime();
00170    }
00171    return mDefaultSubscriptionExpires;
00172 }
00173 
00174 void
00175 Profile::unsetDefaultSubscriptionTime()
00176 {
00177    if(mBaseProfile.get()) 
00178    {
00179       mHasDefaultSubscriptionExpires = false;
00180    }
00181    else // No Base profile - so return to default setting
00182    {
00183       mHasDefaultSubscriptionExpires = true;
00184       mDefaultSubscriptionExpires = 3600; // 1 hour
00185    }
00186 }
00187 
00188 void
00189 Profile::setDefaultPublicationTime(UInt32 secs)
00190 {
00191    mDefaultPublicationExpires = secs;
00192    mHasDefaultPublicationExpires = true;
00193 }
00194 
00195 UInt32 
00196 Profile::getDefaultPublicationTime() const
00197 {
00198    // Fall through seting (if required)
00199    if(!mHasDefaultPublicationExpires && mBaseProfile.get())
00200    {
00201        return mBaseProfile->getDefaultPublicationTime();
00202    }
00203    return mDefaultPublicationExpires;
00204 }
00205 
00206 void
00207 Profile::unsetDefaultPublicationTime()
00208 {
00209    if(mBaseProfile.get()) 
00210    {
00211       mHasDefaultPublicationExpires = false;
00212    }
00213    else // No Base profile - so return to default setting
00214    {
00215       mHasDefaultPublicationExpires = true;
00216       mDefaultPublicationExpires = 3600;  // 1 hour
00217    }
00218 }
00219 
00220 void
00221 Profile::setDefaultStaleCallTime(int secs)
00222 {
00223    mDefaultStaleCallTime = secs;
00224    mHasDefaultStaleCallTime = true;
00225 }
00226 
00227 int 
00228 Profile::getDefaultStaleCallTime() const
00229 {
00230    // Fall through seting (if required)
00231    if(!mHasDefaultStaleCallTime && mBaseProfile.get())
00232    {
00233        return mBaseProfile->getDefaultStaleCallTime();
00234    }
00235    return mDefaultStaleCallTime;
00236 }
00237 
00238 void
00239 Profile::unsetDefaultStaleCallTime()
00240 {
00241    if(mBaseProfile.get()) 
00242    {
00243       mHasDefaultStaleCallTime = false;
00244    }
00245    else // No Base profile - so return to default setting
00246    {
00247       mHasDefaultStaleCallTime = true;
00248       mDefaultStaleCallTime = 180;        // 3 minutes
00249    }
00250 }
00251 
00252 void
00253 Profile::setDefaultStaleReInviteTime(int secs)
00254 {
00255    mDefaultStaleReInviteTime = secs;
00256    mHasDefaultStaleReInviteTime = true;
00257 }
00258 
00259 int 
00260 Profile::getDefaultStaleReInviteTime() const
00261 {
00262    // Fall through seting (if required)
00263    if(!mHasDefaultStaleReInviteTime && mBaseProfile.get())
00264    {
00265        return mBaseProfile->getDefaultStaleReInviteTime();
00266    }
00267    return mDefaultStaleReInviteTime;
00268 }
00269 
00270 void
00271 Profile::unsetDefaultStaleReInviteTime()
00272 {
00273    if(mBaseProfile.get()) 
00274    {
00275       mHasDefaultStaleReInviteTime = false;
00276    }
00277    else // No Base profile - so return to default setting
00278    {
00279       mHasDefaultStaleReInviteTime = true;
00280       mDefaultStaleReInviteTime = 40;        // 40 Seconds (slightly longer than T1*64)
00281    }
00282 }
00283 
00284 void
00285 Profile::setDefaultSessionTime(UInt32 secs)
00286 {
00287    mDefaultSessionExpires = secs;
00288    mHasDefaultSessionExpires = true;
00289 }
00290 
00291 UInt32 
00292 Profile::getDefaultSessionTime() const
00293 {
00294    // Fall through seting (if required)
00295    if(!mHasDefaultSessionExpires && mBaseProfile.get())
00296    {
00297        return mBaseProfile->getDefaultSessionTime();
00298    }
00299    return mDefaultSessionExpires;
00300 }
00301 
00302 void
00303 Profile::unsetDefaultSessionTime()
00304 {
00305    if(mBaseProfile.get()) 
00306    {
00307       mHasDefaultSessionExpires = false;
00308    }
00309    else // No Base profile - so return to default setting
00310    {
00311       mHasDefaultSessionExpires = true;
00312       mDefaultSessionExpires = 1800;      // 30 minutes
00313    }
00314 }
00315 
00316 void
00317 Profile::setDefaultSessionTimerMode(Profile::SessionTimerMode mode)
00318 {
00319    mDefaultSessionTimerMode = mode;
00320    mHasDefaultSessionTimerMode = true;
00321 }
00322 
00323 Profile::SessionTimerMode 
00324 Profile::getDefaultSessionTimerMode() const
00325 {
00326    // Fall through seting (if required)
00327    if(!mHasDefaultSessionTimerMode && mBaseProfile.get())
00328    {
00329        return mBaseProfile->getDefaultSessionTimerMode();
00330    }
00331    return mDefaultSessionTimerMode;
00332 }
00333 
00334 void
00335 Profile::unsetDefaultSessionTimerMode()
00336 {
00337    if(mBaseProfile.get()) 
00338    {
00339       mHasDefaultSessionTimerMode = false;
00340    }
00341    else // No Base profile - so return to default setting
00342    {
00343       mHasDefaultSessionTimerMode = true;
00344       mDefaultSessionTimerMode = Profile::PreferCallerRefreshes;
00345    }
00346 }
00347 
00348 void
00349 Profile::set1xxRetransmissionTime(int secs)
00350 {
00351    m1xxRetransmissionTime = secs;
00352    mHas1xxRetransmissionTime = true;
00353 }
00354 
00355 int 
00356 Profile::get1xxRetransmissionTime() const
00357 {
00358    // Fall through seting (if required)
00359    if(!mHas1xxRetransmissionTime && mBaseProfile.get())
00360    {
00361        return mBaseProfile->get1xxRetransmissionTime();
00362    }
00363    return m1xxRetransmissionTime;
00364 }
00365 
00366 void
00367 Profile::unset1xxRetransmissionTime()
00368 {
00369    if(mBaseProfile.get()) 
00370    {
00371       mHas1xxRetransmissionTime = false;
00372    }
00373    else // No Base profile - so return to default setting
00374    {
00375       mHas1xxRetransmissionTime = true;
00376       m1xxRetransmissionTime = 60;  // RFC3261 13.3.1 specifies this timeout should be 1 minute
00377    }
00378 }
00379 
00380 void 
00381 Profile::setOverrideHostAndPort(const Uri& hostPort)
00382 {
00383    mOverrideHostPort = hostPort;   
00384    mHasOverrideHostPort = true;   
00385 }
00386 
00387 bool 
00388 Profile::hasOverrideHostAndPort() const
00389 {
00390    // Fall through seting (if required)
00391    if(!mHasOverrideHostPort && mBaseProfile.get())
00392    {
00393        return mBaseProfile->hasOverrideHostAndPort();
00394    }
00395    return mHasOverrideHostPort;
00396 }
00397 
00398 const Uri& 
00399 Profile::getOverrideHostAndPort() const
00400 {
00401    // Fall through seting (if required)
00402    if(!mHasOverrideHostPort && mBaseProfile.get())
00403    {
00404        return mBaseProfile->getOverrideHostAndPort();
00405    }
00406    return mOverrideHostPort;
00407 }
00408 
00409 void
00410 Profile::unsetOverrideHostAndPort()
00411 {
00412    mHasOverrideHostPort = false;
00413 }
00414 
00415 void 
00416 Profile::addAdvertisedCapability(const Headers::Type header)
00417 {
00418    assert(header == Headers::Allow ||
00419    header == Headers::AcceptEncoding ||
00420    header == Headers::AcceptLanguage ||
00421    header == Headers::Supported);
00422 
00423    mAdvertisedCapabilities.insert(header);
00424    mHasAdvertisedCapabilities = true;
00425 }
00426  
00427 bool 
00428 Profile::isAdvertisedCapability(const Headers::Type header) const
00429 {
00430    // Fall through seting (if required)
00431    if(!mHasAdvertisedCapabilities && mBaseProfile.get())
00432    {
00433        return mBaseProfile->isAdvertisedCapability(header);
00434    }
00435    return mAdvertisedCapabilities.count(header) != 0;
00436 }
00437 
00438 void 
00439 Profile::clearAdvertisedCapabilities(void)
00440 {
00441    mHasAdvertisedCapabilities = true;
00442    return mAdvertisedCapabilities.clear();
00443 }
00444 
00445 void
00446 Profile::unsetAdvertisedCapabilities()
00447 {
00448    if(mBaseProfile.get()) 
00449    {
00450       mHasAdvertisedCapabilities = false;
00451    }
00452    else // No Base profile - so return to default setting
00453    {
00454       mHasAdvertisedCapabilities = true;
00455       addAdvertisedCapability(Headers::Allow);  
00456       addAdvertisedCapability(Headers::Supported);  
00457    }
00458 }
00459 
00460 void 
00461 Profile::setOutboundProxy( const Uri& uri )
00462 {
00463    Uri tmpUri(uri);
00464    tmpUri.param(p_lr);
00465    mOutboundProxy = NameAddr(tmpUri);
00466    mHasOutboundProxy = true;
00467 }
00468 
00469 const NameAddr&
00470 Profile::getOutboundProxy() const
00471 {
00472    // Fall through seting (if required)
00473    if(!mHasOutboundProxy && mBaseProfile.get())
00474    {
00475        return mBaseProfile->getOutboundProxy();
00476    }
00477    assert(mHasOutboundProxy);
00478    return mOutboundProxy;
00479 }
00480 
00481 bool
00482 Profile::hasOutboundProxy() const
00483 {
00484    // Fall through seting (if required)
00485    if(!mHasOutboundProxy && mBaseProfile.get())
00486    {
00487        return mBaseProfile->hasOutboundProxy();
00488    }
00489    return mHasOutboundProxy;
00490 }
00491 
00492 void
00493 Profile::unsetOutboundProxy()
00494 {
00495    mHasOutboundProxy = false;
00496 }
00497 
00498 void 
00499 Profile::setForceOutboundProxyOnAllRequestsEnabled(bool enabled)
00500 {
00501    mForceOutboundProxyOnAllRequestsEnabled = enabled;
00502    mHasForceOutboundProxyOnAllRequestsEnabled = true;
00503 }
00504 
00505 bool 
00506 Profile::getForceOutboundProxyOnAllRequestsEnabled() const
00507 {
00508    // Fall through seting (if required)
00509    if(!mHasForceOutboundProxyOnAllRequestsEnabled && mBaseProfile.get())
00510    {
00511        return mBaseProfile->getForceOutboundProxyOnAllRequestsEnabled();
00512    }
00513    return mForceOutboundProxyOnAllRequestsEnabled;
00514 }
00515 
00516 void
00517 Profile::unsetForceOutboundProxyOnAllRequestsEnabled()
00518 {
00519    if(mBaseProfile.get()) 
00520    {
00521       mHasForceOutboundProxyOnAllRequestsEnabled = false;
00522    }
00523    else
00524    {
00525       mHasForceOutboundProxyOnAllRequestsEnabled = true;
00526       mForceOutboundProxyOnAllRequestsEnabled = false;
00527    }
00528 }
00529 
00530 void 
00531 Profile::setExpressOutboundAsRouteSetEnabled(bool enabled)
00532 {
00533    mExpressOutboundAsRouteSetEnabled = enabled;
00534    mHasExpressOutboundAsRouteSetEnabled = true;
00535 }
00536 
00537 bool 
00538 Profile::getExpressOutboundAsRouteSetEnabled() const
00539 {
00540    // Fall through seting (if required)
00541    if(!mHasExpressOutboundAsRouteSetEnabled && mBaseProfile.get())
00542    {
00543        return mBaseProfile->getExpressOutboundAsRouteSetEnabled();
00544    }
00545    return mExpressOutboundAsRouteSetEnabled;
00546 }
00547 
00548 void
00549 Profile::unsetExpressOutboundAsRouteSetEnabled()
00550 {
00551    if(mBaseProfile.get()) 
00552    {
00553       mHasExpressOutboundAsRouteSetEnabled = false;
00554    }
00555    else
00556    {
00557       mHasExpressOutboundAsRouteSetEnabled = true;
00558       mExpressOutboundAsRouteSetEnabled = false;
00559    }
00560 }
00561 
00562 void 
00563 Profile::setRportEnabled(bool enabled)
00564 {
00565    mRportEnabled = enabled;
00566    mHasRportEnabled = true;
00567 }
00568 
00569 bool 
00570 Profile::getRportEnabled() const
00571 {
00572    // Fall through seting (if required)
00573    if(!mHasRportEnabled && mBaseProfile.get())
00574    {
00575        return mBaseProfile->getRportEnabled();
00576    }
00577    return mRportEnabled;
00578 }
00579 
00580 void
00581 Profile::unsetRportEnabled()
00582 {
00583    if(mBaseProfile.get()) 
00584    {
00585       mHasRportEnabled = false;
00586    }
00587    else // No Base profile - so return to default setting
00588    {
00589       mHasRportEnabled = true;
00590       mRportEnabled = true;
00591    }
00592 }
00593 
00594 void 
00595 Profile::setUserAgent( const Data& userAgent )
00596 {
00597    mUserAgent = userAgent;   
00598    mHasUserAgent = true;   
00599 }
00600 
00601 const Data& 
00602 Profile::getUserAgent() const
00603 {
00604    // Fall through seting (if required)
00605    if(!mHasUserAgent && mBaseProfile.get())
00606    {
00607        return mBaseProfile->getUserAgent();
00608    }
00609    assert(mHasUserAgent);
00610    return mUserAgent;
00611 }
00612  
00613 bool 
00614 Profile::hasUserAgent() const
00615 {
00616    // Fall through seting (if required)
00617    if(!mHasUserAgent && mBaseProfile.get())
00618    {
00619        return mBaseProfile->hasUserAgent();
00620    }
00621    return mHasUserAgent;
00622 }
00623 
00624 void
00625 Profile::unsetUserAgent()
00626 {
00627    mHasUserAgent = false;
00628 }
00629 
00630 void 
00631 Profile::setProxyRequires( const Tokens& proxyRequires )
00632 {
00633    mProxyRequires = proxyRequires;   
00634    mHasProxyRequires = true;   
00635 }
00636 
00637 const Tokens& 
00638 Profile::getProxyRequires() const
00639 {
00640    // Fall through seting (if required)
00641    if(!mHasProxyRequires && mBaseProfile.get())
00642    {
00643        return mBaseProfile->getProxyRequires();
00644    }
00645    assert(mHasProxyRequires);
00646    return mProxyRequires;
00647 }
00648  
00649 bool 
00650 Profile::hasProxyRequires() const
00651 {
00652    // Fall through seting (if required)
00653    if(!mHasProxyRequires && mBaseProfile.get())
00654    {
00655        return mBaseProfile->hasProxyRequires();
00656    }
00657    return mHasProxyRequires;
00658 }
00659 
00660 void
00661 Profile::unsetProxyRequires()
00662 {
00663    mHasProxyRequires = false;
00664 }
00665 
00666 void 
00667 Profile::setKeepAliveTimeForDatagram(int keepAliveTime)
00668 {
00669    mKeepAliveTimeForDatagram = keepAliveTime;
00670    mHasKeepAliveTimeForDatagram = true;
00671 }
00672 
00673 int 
00674 Profile::getKeepAliveTimeForDatagram() const
00675 {
00676    // Fall through seting (if required)
00677    if(!mHasKeepAliveTimeForDatagram && mBaseProfile.get())
00678    {
00679        return mBaseProfile->getKeepAliveTimeForDatagram();
00680    }
00681    return mKeepAliveTimeForDatagram;
00682 }
00683 
00684 void
00685 Profile::unsetKeepAliveTimeForDatagram()
00686 {
00687    if(mBaseProfile.get()) 
00688    {
00689       mHasKeepAliveTimeForDatagram = false;
00690    }
00691    else // No Base profile - so return to default setting
00692    {
00693       mHasKeepAliveTimeForDatagram = true;
00694       mKeepAliveTimeForDatagram = 30; // 30 seconds.
00695    }
00696 }
00697 
00698 void 
00699 Profile::setKeepAliveTimeForStream(int keepAliveTime)
00700 {
00701    mKeepAliveTimeForStream = keepAliveTime;
00702    mHasKeepAliveTimeForStream = true;
00703 }
00704 
00705 int 
00706 Profile::getKeepAliveTimeForStream() const
00707 {
00708    // Fall through seting (if required)
00709    if(!mHasKeepAliveTimeForStream && mBaseProfile.get())
00710    {
00711        return mBaseProfile->getKeepAliveTimeForStream();
00712    }
00713    return mKeepAliveTimeForStream;
00714 }
00715 
00716 void
00717 Profile::unsetKeepAliveTimeForStream()
00718 {
00719    if(mBaseProfile.get()) 
00720    {
00721       mHasKeepAliveTimeForStream = false;
00722    }
00723    else // No Base profile - so return to default setting
00724    {
00725       mHasKeepAliveTimeForStream = true;
00726       mKeepAliveTimeForStream = 180; // 3 minutes.
00727    }
00728 }
00729 
00730 void 
00731 Profile::setFixedTransportPort(int fixedTransportPort)
00732 {
00733    mFixedTransportPort = fixedTransportPort;
00734    mHasFixedTransportPort = true;
00735 }
00736 
00737 int 
00738 Profile::getFixedTransportPort() const
00739 {
00740    // Fall through seting (if required)
00741    if(!mHasFixedTransportPort && mBaseProfile.get())
00742    {
00743        return mBaseProfile->getFixedTransportPort();
00744    }
00745    return mFixedTransportPort;
00746 }
00747 
00748 void
00749 Profile::unsetFixedTransportPort()
00750 {
00751    if(mBaseProfile.get()) 
00752    {
00753       mHasFixedTransportPort = false;
00754    }
00755    else // No Base profile - so return to default setting
00756    {
00757       mHasFixedTransportPort = true;
00758       mFixedTransportPort = 0;
00759    }
00760 }
00761 
00762 void 
00763 Profile::setFixedTransportInterface(const Data& fixedTransportInterface)
00764 {
00765    mFixedTransportInterface = fixedTransportInterface;
00766    mHasFixedTransportInterface = true;
00767 }
00768 
00769 const Data&
00770 Profile::getFixedTransportInterface() const
00771 {
00772    // Fall through seting (if required)
00773    if(!mHasFixedTransportInterface && mBaseProfile.get())
00774    {
00775        return mBaseProfile->getFixedTransportInterface();
00776    }
00777    return mFixedTransportInterface;
00778 }
00779 
00780 void
00781 Profile::unsetFixedTransportInterface()
00782 {
00783    if(mBaseProfile.get()) 
00784    {
00785       mHasFixedTransportInterface = false;
00786    }
00787    else // No Base profile - so return to default setting
00788    {
00789       mHasFixedTransportInterface = true;
00790       mFixedTransportInterface = Data::Empty;
00791    }
00792 }
00793 
00794 
00795 void 
00796 Profile::setRinstanceEnabled(bool enabled)
00797 {
00798    mRinstanceEnabled = enabled;
00799    mHasRinstanceEnabled = true;
00800 }
00801 
00802 bool 
00803 Profile::getRinstanceEnabled() const
00804 {
00805    // Fall through seting (if required)
00806    if(!mHasRinstanceEnabled && mBaseProfile.get())
00807    {
00808        return mBaseProfile->getRinstanceEnabled();
00809    }
00810    return mRinstanceEnabled;
00811 }
00812 
00813 void
00814 Profile::unsetRinstanceEnabled()
00815 {
00816    if(mBaseProfile.get()) 
00817    {
00818       mHasRinstanceEnabled = false;
00819    }
00820    else
00821    {
00822       mHasRinstanceEnabled = true;
00823       mRinstanceEnabled = true;
00824    }
00825 }
00826 
00828           //virtual void setOutboundDecorator(SharedPtr<MessageDecorator> outboundDecorator);
00829           //virtual SharedPtr<MessageDecorator> getOutboundDecorator();
00830           //virtual void unsetOutboundDecorator();
00831 
00832 void 
00833 Profile::setOutboundDecorator(SharedPtr<MessageDecorator> outboundDecorator)
00834 {
00835    mOutboundDecorator = outboundDecorator;
00836    mHasOutboundDecorator = true;
00837 }
00838 
00839 SharedPtr<MessageDecorator> 
00840 Profile::getOutboundDecorator()
00841 {
00842    // Fall through seting (if required)
00843    if(!mHasOutboundDecorator && mBaseProfile.get())
00844    {
00845        return mBaseProfile->getOutboundDecorator();
00846    }
00847    return mOutboundDecorator;
00848 }
00849 
00850 void
00851 Profile::unsetOutboundDecorator()
00852 {
00853    if (mHasOutboundDecorator)
00854    {
00855       mOutboundDecorator.reset();
00856    }
00857 
00858    mHasOutboundDecorator = false;
00859 }
00860 
00861 void 
00862 Profile::setMethodsParamEnabled(bool enabled)
00863 {
00864    mMethodsParamEnabled = enabled;
00865    mHasMethodsParamEnabled = true;
00866 }
00867 
00868 bool 
00869 Profile::getMethodsParamEnabled() const
00870 {
00871    // Fall through seting (if required)
00872    if(!mHasMethodsParamEnabled && mBaseProfile.get())
00873    {
00874        return mBaseProfile->getMethodsParamEnabled();
00875    }
00876    return mMethodsParamEnabled;
00877 }
00878 
00879 void
00880 Profile::unsetMethodsParamEnabled()
00881 {
00882    if(mBaseProfile.get()) 
00883    {
00884       mHasMethodsParamEnabled = false;
00885    }
00886    else
00887    {
00888       mHasMethodsParamEnabled = true;
00889       mMethodsParamEnabled = false;
00890    }
00891 }
00892 
00893 void 
00894 Profile::setUserAgentCapabilities(const NameAddr& capabilities)
00895 {
00896    mUserAgentCapabilities = capabilities;
00897    mHasUserAgentCapabilities = true;
00898 }
00899 
00900 const NameAddr&
00901 Profile::getUserAgentCapabilities() const
00902 {
00903    // Fall through seting (if required)
00904    if(!mHasUserAgentCapabilities && mBaseProfile.get())
00905    {
00906        return mBaseProfile->getUserAgentCapabilities();
00907    }
00908    assert(mHasUserAgentCapabilities);
00909    return mUserAgentCapabilities;
00910 }
00911 
00912 bool
00913 Profile::hasUserAgentCapabilities() const
00914 {
00915    // Fall through seting (if required)
00916    if(!mHasUserAgentCapabilities && mBaseProfile.get())
00917    {
00918        return mBaseProfile->hasUserAgentCapabilities();
00919    }
00920    return mHasUserAgentCapabilities;
00921 }
00922 
00923 void
00924 Profile::unsetUserAgentCapabilities()
00925 {
00926    mHasUserAgentCapabilities = false;
00927 }
00928 
00929 void 
00930 Profile::setExtraHeadersInReferNotifySipFragEnabled(bool enabled)
00931 {
00932    mExtraHeadersInReferNotifySipFragEnabled = enabled;
00933    mHasExtraHeadersInReferNotifySipFragEnabled = true;
00934 }
00935 
00936 bool 
00937 Profile::getExtraHeadersInReferNotifySipFragEnabled() const
00938 {
00939    // Fall through seting (if required)
00940    if(!mHasExtraHeadersInReferNotifySipFragEnabled && mBaseProfile.get())
00941    {
00942        return mBaseProfile->getExtraHeadersInReferNotifySipFragEnabled();
00943    }
00944    return mExtraHeadersInReferNotifySipFragEnabled;
00945 }
00946 
00947 void
00948 Profile::unsetExtraHeadersInReferNotifySipFragEnabled()
00949 {
00950    if(mBaseProfile.get()) 
00951    {
00952       mHasExtraHeadersInReferNotifySipFragEnabled = false;
00953    }
00954    else
00955    {
00956       mHasExtraHeadersInReferNotifySipFragEnabled = true;
00957       mExtraHeadersInReferNotifySipFragEnabled = false;
00958    }
00959 }
00960 
00961 
00962 /* ====================================================================
00963  * The Vovida Software License, Version 1.0 
00964  * 
00965  * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
00966  * 
00967  * Redistribution and use in source and binary forms, with or without
00968  * modification, are permitted provided that the following conditions
00969  * are met:
00970  * 
00971  * 1. Redistributions of source code must retain the above copyright
00972  *    notice, this list of conditions and the following disclaimer.
00973  * 
00974  * 2. Redistributions in binary form must reproduce the above copyright
00975  *    notice, this list of conditions and the following disclaimer in
00976  *    the documentation and/or other materials provided with the
00977  *    distribution.
00978  * 
00979  * 3. The names "VOCAL", "Vovida Open Communication Application Library",
00980  *    and "Vovida Open Communication Application Library (VOCAL)" must
00981  *    not be used to endorse or promote products derived from this
00982  *    software without prior written permission. For written
00983  *    permission, please contact vocal@vovida.org.
00984  *
00985  * 4. Products derived from this software may not be called "VOCAL", nor
00986  *    may "VOCAL" appear in their name, without prior written
00987  *    permission of Vovida Networks, Inc.
00988  * 
00989  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
00990  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00991  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
00992  * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
00993  * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
00994  * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
00995  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00996  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00997  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00998  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00999  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
01000  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
01001  * DAMAGE.
01002  * 
01003  * ====================================================================
01004  * 
01005  * This software consists of voluntary contributions made by Vovida
01006  * Networks, Inc. and many individuals on behalf of Vovida Networks,
01007  * Inc.  For more information on Vovida Networks, Inc., please see
01008  * <http://www.vovida.org/>.
01009  *
01010  */