reSIProcate/stack  9694
Classes | Public Member Functions | Protected Types | Protected Attributes | Friends
resip::DnsInterface Class Reference

#include <DnsInterface.hxx>

Inheritance diagram for resip::DnsInterface:
Inheritance graph
[legend]
Collaboration diagram for resip::DnsInterface:
Collaboration graph
[legend]

List of all members.

Classes

class  Exception

Public Member Functions

 DnsInterface (DnsStub &dnsStub)
virtual ~DnsInterface ()
void addTransportType (TransportType type, IpVersion version)
bool isSupported (const Data &service)
bool isSupported (TransportType t, IpVersion version)
bool isSupportedProtocol (TransportType t)
int supportedProtocols ()
DnsResultcreateDnsResult (DnsHandler *handler=0)
void lookup (DnsResult *res, const Uri &uri)
TupleMarkManagergetMarkManager ()

Protected Types

typedef std::vector< std::pair
< TransportType, IpVersion > > 
TransportMap

Protected Attributes

std::set< DatamSupportedNaptrs
TransportMap mSupportedTransports
DnsStubmDnsStub
RRVip mVip
TupleMarkManager mMarkManager

Friends

class DnsResult

Detailed Description

Definition at line 25 of file DnsInterface.hxx.


Member Typedef Documentation

typedef std::vector<std::pair<TransportType, IpVersion> > resip::DnsInterface::TransportMap [protected]

Definition at line 88 of file DnsInterface.hxx.


Constructor & Destructor Documentation

DnsInterface::DnsInterface ( DnsStub dnsStub)

Definition at line 35 of file DnsInterface.cxx.

References mDnsStub, mVip, and resip::DnsStub::setResultTransform().

                                           : 
   mDnsStub(dnsStub)
{

#ifdef USE_DNS_VIP
   mDnsStub.setResultTransform(&mVip);
#endif
}

Here is the call graph for this function:

DnsInterface::~DnsInterface ( ) [virtual]

Definition at line 44 of file DnsInterface.cxx.

{
}

Member Function Documentation

void DnsInterface::addTransportType ( TransportType  type,
IpVersion  version 
)

Definition at line 53 of file DnsInterface.cxx.

References resip::DTLS, DtlsNAPTRType, mSupportedNaptrs, mSupportedTransports, resip::TCP, TcpNAPTRType, resip::TLS, TlsNAPTRType, resip::UDP, and UdpNAPTRType.

Referenced by resip::TransportSelector::addTransportInternal().

{
   mSupportedTransports.push_back(std::make_pair(type, version));
   switch (type)
   {
      case UDP:
         mSupportedNaptrs.insert(UdpNAPTRType);
         break;
      case TCP:
         mSupportedNaptrs.insert(TcpNAPTRType);
         break;
      case TLS:
         mSupportedNaptrs.insert(TlsNAPTRType);
         break;
      case DTLS:
         mSupportedNaptrs.insert(DtlsNAPTRType);
         break;         
      default:
         assert(0);
         break;
   }
}
DnsResult * DnsInterface::createDnsResult ( DnsHandler handler = 0)

Definition at line 108 of file DnsInterface.cxx.

References DnsResult, mDnsStub, and mVip.

Referenced by resip::TransportSelector::createDnsResult(), and main().

{
   DnsResult* result = new DnsResult(*this, mDnsStub, mVip, handler);
   return result;
}
TupleMarkManager& resip::DnsInterface::getMarkManager ( ) [inline]
bool DnsInterface::isSupported ( const Data service)
bool DnsInterface::isSupported ( TransportType  t,
IpVersion  version 
)

Definition at line 83 of file DnsInterface.cxx.

References mSupportedTransports.

{
   return std::find(mSupportedTransports.begin(), mSupportedTransports.end(), std::make_pair(t, version)) != mSupportedTransports.end();
}
bool DnsInterface::isSupportedProtocol ( TransportType  t)

Definition at line 89 of file DnsInterface.cxx.

References mSupportedTransports.

Referenced by resip::DnsResult::lookupInternal(), and resip::DnsResult::onNaptrResult().

{
   for (TransportMap::const_iterator i=mSupportedTransports.begin(); i != mSupportedTransports.end(); ++i)
   {
      if (i->first == t)
      {
         return true;
      }
   }
   return false;
}
void DnsInterface::lookup ( DnsResult res,
const Uri uri 
)

Definition at line 115 of file DnsInterface.cxx.

References resip::DnsStub::getEnumSuffixes(), resip::DnsResult::lookup(), and mDnsStub.

Referenced by resip::TransportSelector::dnsResolve().

{
   res->lookup(uri, mDnsStub.getEnumSuffixes());   
}

Here is the call graph for this function:

int DnsInterface::supportedProtocols ( )

Definition at line 101 of file DnsInterface.cxx.

References mSupportedTransports.

{
   return (int)mSupportedTransports.size();
}

Friends And Related Function Documentation

friend class DnsResult [friend]

Definition at line 85 of file DnsInterface.hxx.

Referenced by createDnsResult().


Member Data Documentation

Definition at line 94 of file DnsInterface.hxx.

Referenced by createDnsResult(), DnsInterface(), and lookup().

Definition at line 96 of file DnsInterface.hxx.

Referenced by getMarkManager().

Definition at line 87 of file DnsInterface.hxx.

Referenced by addTransportType(), and isSupported().

Definition at line 95 of file DnsInterface.hxx.

Referenced by createDnsResult(), and DnsInterface().


The documentation for this class was generated from the following files: