/[resiprocate]/main/sip/resiprocate/TransactionUser.cxx
ViewVC logotype

Diff of /main/sip/resiprocate/TransactionUser.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4335 by jason, Tue Apr 12 21:40:15 2005 UTC revision 4376 by jason, Sat Apr 16 02:30:10 2005 UTC
# Line 6  Line 6 
6    
7  using namespace resip;  using namespace resip;
8    
9  TransactionUser::TransactionUser() : mFifo(0, 0)  TransactionUser::TransactionUser()
10       : mFifo(0, 0)
11  {  {
12    // This creates a default message filter rule, which    // This creates a default message filter rule, which
13    // handles all sip: and sips: requests.    // handles all sip: and sips: requests.
# Line 14  Line 15 
15  }  }
16    
17  TransactionUser::TransactionUser(MessageFilterRuleList &mfrl)  TransactionUser::TransactionUser(MessageFilterRuleList &mfrl)
18    : mFifo(0, 0), mRuleList(mfrl)    : mFifo(0, 0),
19        mRuleList(mfrl)
20  {  {
21  }  }
22    
   
23  TransactionUser::~TransactionUser()  TransactionUser::~TransactionUser()
24  {  {
25  }  }
# Line 68  Line 69 
69  }  }
70    
71  bool  bool
 TransactionUser::isMyDomain(const Uri& uri) const  
 {  
    for (DomainList::const_iterator it = mDomainList.begin();  
         it != mDomainList.end(); it++)  
    {  
       if(uri.host() == it->host() && uri.port() == it->port())  
       {  
          return true;  
       }  
    }  
    return false;  
 }  
   
 bool  
72  TransactionUser::isMyDomain(const Data& domain) const  TransactionUser::isMyDomain(const Data& domain) const
73  {  {
74     for (DomainList::const_iterator it = mDomainList.begin();     return mDomainList.count(domain);
         it != mDomainList.end(); it++)  
    {  
       if(domain == it->host())  
       {  
          return true;  
       }  
    }  
    return false;  
75  }  }
76    
77  void TransactionUser::addDomain(const Data& domain)  void TransactionUser::addDomain(const Data& domain)
78  {  {
79     Uri u;     mDomainList.insert(domain);
    u.host() = domain;  
    mDomainList.push_back(u);  
 }  
   
 void TransactionUser::addDomain(const Data& domain, int port)  
 {  
    Uri u;  
    u.host() = domain;  
    u.port() = port;  
    mDomainList.push_back(u);  
80  }  }
81    
82  std::ostream&  std::ostream&

Legend:
Removed from v.4335  
changed lines
  Added in v.4376

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27