reSIProcate/stack  9694
Public Member Functions | Private Attributes
resip::Aor Class Reference

#include <Aor.hxx>

Collaboration diagram for resip::Aor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Aor (const Data &value)
 Aor ()
 Aor (const Uri &uri)
 Aor (const Aor &aor)
Aoroperator= (const Aor &aor)
bool operator== (const Aor &other) const
bool operator!= (const Aor &other) const
bool operator< (const Aor &other) const
const Datavalue () const
Datascheme ()
const Datascheme () const
Datahost ()
const Datahost () const
Datauser ()
const Datauser () const
int & port ()
int port () const
EncodeStreamoperator<< (EncodeStream &str) const

Private Attributes

Data mValue
Data mOldScheme
Data mOldUser
Data mOldHost
int mOldPort
Data mCanonicalHost
Data mScheme
Data mUser
Data mHost
int mPort

Detailed Description

Definition at line 12 of file Aor.hxx.


Constructor & Destructor Documentation

Aor::Aor ( const Data value) [explicit]

Definition at line 15 of file Aor.cxx.

References resip::ParseBuffer::assertNotEof(), resip::Symbols::AT_SIGN, resip::DnsUtil::canonicalizeIpV6Address(), resip::Symbols::COLON, resip::ParseBuffer::data(), resip::ParseBuffer::eof(), resip::ParseBuffer::integer(), resip::isEqualNoCase(), resip::Data::lowercase(), mHost, mPort, mScheme, mUser, resip::ParseBuffer::position(), resip::Symbols::RA_QUOTE, resip::ParseBuffer::reset(), resip::Symbols::SEMI_COLON, resip::ParseBuffer::skipChar(), resip::ParseBuffer::skipToChar(), resip::ParseBuffer::skipToOneOf(), resip::ParseBuffer::skipWhitespace(), resip::Symbols::Tel, and resip::ParseBuffer::Whitespace.

{
   ParseBuffer pb(value);
   
   pb.skipWhitespace();
   const char* start = pb.position();
   pb.skipToOneOf(":@"); // make sure the colon precedes

   pb.assertNotEof();

   pb.data(mScheme, start);
   pb.skipChar(Symbols::COLON[0]);
   mScheme.lowercase();

   if (isEqualNoCase(mScheme, Symbols::Tel))
   {
      const char* anchor = pb.position();
      pb.skipToOneOf(ParseBuffer::Whitespace, ";>");
      pb.data(mUser, anchor);
      if (!pb.eof() && *pb.position() == Symbols::SEMI_COLON[0])
      {
         anchor = pb.skipChar();
         pb.skipToOneOf(ParseBuffer::Whitespace, Symbols::RA_QUOTE);
      }
      return;
   }
   
   start = pb.position();
   pb.skipToChar(Symbols::AT_SIGN[0]);
   if (!pb.eof())
   {
      pb.reset(start);
      start = pb.position();
      pb.skipToOneOf(":@");
      pb.data(mUser, start);
      if (!pb.eof() && *pb.position() == Symbols::COLON[0])
      {
         start = pb.skipChar();
         pb.skipToChar(Symbols::AT_SIGN[0]);
      }
      start = pb.skipChar();
   }
   else
   {
      pb.reset(start);
   }
   
   if (*start == '[')
   {
      start = pb.skipChar();
      pb.skipToChar(']');
      pb.data(mHost, start);
      DnsUtil::canonicalizeIpV6Address(mHost);
      pb.skipChar();
   }
   else
   {
      pb.skipToOneOf(ParseBuffer::Whitespace, ":;?>");
      pb.data(mHost, start);
   }

   pb.skipToOneOf(ParseBuffer::Whitespace, ":;?>");
   if (!pb.eof() && *pb.position() == ':')
   {
      start = pb.skipChar();
      mPort = pb.integer();
      pb.skipToOneOf(ParseBuffer::Whitespace, ";?>");
   }
   else
   {
      mPort = 0;
   }
}

Here is the call graph for this function:

Aor::Aor ( )

Definition at line 11 of file Aor.cxx.

{
}
Aor::Aor ( const Uri uri)

Definition at line 89 of file Aor.cxx.

                       : 
   mScheme(uri.scheme()),
   mUser(uri.user()),
   mHost(uri.host()),
   mPort(uri.port())
{
   
}
Aor::Aor ( const Aor aor)

Definition at line 98 of file Aor.cxx.

{
   *this = aor;
}

Member Function Documentation

Data & Aor::host ( )

Definition at line 193 of file Aor.cxx.

References mHost.

Referenced by main().

{
   return mHost;
}
const Data & Aor::host ( ) const

Definition at line 199 of file Aor.cxx.

References mHost.

{
   return mHost;
}
bool Aor::operator!= ( const Aor other) const

Definition at line 124 of file Aor.cxx.

References value().

{
   return value() != other.value();
}

Here is the call graph for this function:

bool Aor::operator< ( const Aor other) const

Definition at line 130 of file Aor.cxx.

References value().

{
   return value() < other.value();
}

Here is the call graph for this function:

EncodeStream & Aor::operator<< ( EncodeStream str) const

Definition at line 229 of file Aor.cxx.

References value().

{
   str << value();
   return str;
}

Here is the call graph for this function:

Aor & Aor::operator= ( const Aor aor)

Definition at line 104 of file Aor.cxx.

References mHost, mPort, mScheme, and mUser.

{
   if (this != &aor)
   {
      mScheme = aor.mScheme;
      mUser = aor.mUser;
      mHost = aor.mHost;
      mPort = aor.mPort;
   }
   return *this;
}
bool Aor::operator== ( const Aor other) const

Definition at line 118 of file Aor.cxx.

References value().

{
   return value() == other.value();
}

Here is the call graph for this function:

int & Aor::port ( )

Definition at line 217 of file Aor.cxx.

References mPort.

Referenced by main().

{
   return mPort;
}
int Aor::port ( ) const

Definition at line 223 of file Aor.cxx.

References mPort.

{
   return mPort;
}
Data & Aor::scheme ( )

Definition at line 181 of file Aor.cxx.

References mScheme.

Referenced by main().

{
   return mScheme;
}
const Data & Aor::scheme ( ) const

Definition at line 187 of file Aor.cxx.

References mScheme.

{
   return mScheme;
}
Data & Aor::user ( )

Definition at line 205 of file Aor.cxx.

References mUser.

Referenced by main().

{
   return mUser;
}
const Data & Aor::user ( ) const

Definition at line 211 of file Aor.cxx.

References mUser.

{
   return mUser;
}
const Data & Aor::value ( ) const

Member Data Documentation

Data resip::Aor::mCanonicalHost [mutable, private]

Definition at line 50 of file Aor.hxx.

Referenced by value().

Definition at line 54 of file Aor.hxx.

Referenced by Aor(), host(), operator=(), and value().

Data resip::Aor::mOldHost [mutable, private]

Definition at line 46 of file Aor.hxx.

Referenced by value().

int resip::Aor::mOldPort [mutable, private]

Definition at line 47 of file Aor.hxx.

Referenced by value().

Data resip::Aor::mOldScheme [mutable, private]

Definition at line 44 of file Aor.hxx.

Referenced by value().

Data resip::Aor::mOldUser [mutable, private]

Definition at line 45 of file Aor.hxx.

Referenced by value().

int resip::Aor::mPort [private]

Definition at line 55 of file Aor.hxx.

Referenced by Aor(), operator=(), port(), and value().

Definition at line 52 of file Aor.hxx.

Referenced by Aor(), operator=(), scheme(), and value().

Definition at line 53 of file Aor.hxx.

Referenced by Aor(), operator=(), user(), and value().

Data resip::Aor::mValue [mutable, private]

Definition at line 42 of file Aor.hxx.

Referenced by value().


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