reSIProcate/DialogUsageManager  9694
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Static Private Attributes | Friends
resip::UserProfile Class Reference

#include <UserProfile.hxx>

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

List of all members.

Classes

struct  DigestCredential

Public Member Functions

 UserProfile ()
 UserProfile (SharedPtr< Profile > baseProfile)
virtual ~UserProfile ()
virtual void setDefaultFrom (const NameAddr &from)
virtual NameAddrgetDefaultFrom ()
virtual void setServiceRoute (const NameAddrs &sRoute)
virtual NameAddrsgetServiceRoute ()
virtual void setImsAuthUser (const Data &userName, const Data &host)
virtual DatagetImsAuthUserName ()
virtual DatagetImsAuthHost ()
virtual SharedPtr< UserProfilegetAnonymousUserProfile () const
bool isAnonymous () const
virtual void addGruu (const Data &aor, const NameAddr &contact)
virtual bool hasGruu (const Data &aor) const
virtual bool hasGruu (const Data &aor, const Data &instance) const
virtual NameAddrgetGruu (const Data &aor)
virtual NameAddrgetGruu (const Data &aor, const NameAddr &contact)
virtual bool & gruuEnabled ()
virtual bool gruuEnabled () const
virtual bool hasPublicGruu () const
virtual const UrigetPublicGruu ()
virtual void setPublicGruu (const Uri &gruu)
virtual bool hasTempGruu () const
virtual const UrigetTempGruu ()
virtual void setTempGruu (const Uri &gruu)
virtual void clearDigestCredentials ()
 The following functions deal with clearing, setting and getting of digest credentals.
virtual void setDigestCredential (const Data &realm, const Data &user, const Data &password, bool isPasswordA1Hash=false)
 For the password you may either provide the plain text password (isPasswordA1Hash = false) or the Digest A1 MD5 Hash (isPasswordA1Hash = true).
virtual const DigestCredentialgetDigestCredential (const Data &realm)
virtual bool & clientOutboundEnabled ()
virtual bool clientOutboundEnabled () const
virtual bool hasInstanceId ()
virtual void setInstanceId (const Data &id)
virtual const DatagetInstanceId () const
virtual void setRegId (int regId)
virtual int getRegId ()
const TuplegetClientOutboundFlowTuple () const
void clearClientOutboundFlowTuple ()

Protected Member Functions

virtual UserProfileclone () const

Private Types

typedef std::set
< DigestCredential
DigestCredentials

Private Attributes

NameAddr mDefaultFrom
Data mInstanceId
NameAddrs mServiceRoute
Data mImsAuthUserName
Data mImsAuthHost
bool mGruuEnabled
Uri mPubGruu
Uri mTempGruu
int mRegId
bool mClientOutboundEnabled
Tuple mClientOutboundFlowTuple
DigestCredentials mDigestCredentials

Static Private Attributes

static const NameAddr mAnonymous

Friends

class DialogUsageManager
class ClientRegistration
class Dialog
EncodeStreamoperator<< (EncodeStream &, const UserProfile &profile)

Detailed Description

Definition at line 16 of file UserProfile.hxx.


Member Typedef Documentation

Definition at line 137 of file UserProfile.hxx.


Constructor & Destructor Documentation

UserProfile::UserProfile ( )

Definition at line 14 of file UserProfile.cxx.

Referenced by clone().

                         : Profile(), 
   mGruuEnabled(false),
   mRegId(0),
   mClientOutboundEnabled(false)
{
    //InfoLog (<< "************ UserProfile created (no base)!: " << *this);
}
UserProfile::UserProfile ( SharedPtr< Profile baseProfile)

Definition at line 22 of file UserProfile.cxx.

                                                       : Profile(baseProfile), 
   mGruuEnabled(false),
   mRegId(0),
   mClientOutboundEnabled(false)
{
    //InfoLog (<< "************ UserProfile created (with base)!: " << *this);
}
UserProfile::~UserProfile ( ) [virtual]

Definition at line 30 of file UserProfile.cxx.

{
    //InfoLog (<< "************ UserProfile destroyed!: " << *this);
}

Member Function Documentation

void UserProfile::addGruu ( const Data aor,
const NameAddr contact 
) [virtual]

Definition at line 98 of file UserProfile.cxx.

{
}
void resip::UserProfile::clearClientOutboundFlowTuple ( ) [inline]

Definition at line 114 of file UserProfile.hxx.

References mClientOutboundFlowTuple.

{ mClientOutboundFlowTuple = Tuple(); }
void UserProfile::clearDigestCredentials ( ) [virtual]

The following functions deal with clearing, setting and getting of digest credentals.

Definition at line 131 of file UserProfile.cxx.

References mDigestCredentials.

{
   mDigestCredentials.clear();
}
virtual bool& resip::UserProfile::clientOutboundEnabled ( ) [inline, virtual]
virtual bool resip::UserProfile::clientOutboundEnabled ( ) const [inline, virtual]

Definition at line 100 of file UserProfile.hxx.

References mClientOutboundEnabled.

UserProfile * UserProfile::clone ( ) const [protected, virtual]

Reimplemented in resip::MasterProfile.

Definition at line 44 of file UserProfile.cxx.

References UserProfile().

Referenced by getAnonymousUserProfile().

{
   return new UserProfile(*this);
}

Here is the call graph for this function:

SharedPtr< UserProfile > UserProfile::getAnonymousUserProfile ( ) const [virtual]

Definition at line 36 of file UserProfile.cxx.

References clone(), and mAnonymous.

{
   SharedPtr<UserProfile> anon(this->clone());
   anon->setDefaultFrom(mAnonymous);
   return anon;
}

Here is the call graph for this function:

const Tuple& resip::UserProfile::getClientOutboundFlowTuple ( ) const [inline]

Definition at line 113 of file UserProfile.hxx.

References mClientOutboundFlowTuple.

NameAddr & UserProfile::getDefaultFrom ( ) [virtual]

Definition at line 62 of file UserProfile.cxx.

References mDefaultFrom.

{
   return mDefaultFrom;
}
const UserProfile::DigestCredential & UserProfile::getDigestCredential ( const Data realm) [virtual]

Definition at line 148 of file UserProfile.cxx.

References DebugLog, emptyDigestCredential, and mDigestCredentials.

Referenced by resip::ClientAuthManager::RealmState::findCredential().

{
   if(mDigestCredentials.empty())
   {
      // !jf! why not just throw here? 
      return emptyDigestCredential;
   }

   DigestCredentials::const_iterator it = mDigestCredentials.find(DigestCredential(realm));
   if (it == mDigestCredentials.end())
   {
      DebugLog(<< "Didn't find credential for realm: " << realm << " " << *mDigestCredentials.begin());
      return *mDigestCredentials.begin();
   }
   else      
   {
      DebugLog(<< "Found credential for realm: " << *it << realm);      
      return *it;
   }
}
NameAddr & UserProfile::getGruu ( const Data aor) [virtual]

Definition at line 115 of file UserProfile.cxx.

{
   assert(0);
   static NameAddr gruu;
   return gruu;
}
NameAddr & UserProfile::getGruu ( const Data aor,
const NameAddr contact 
) [virtual]

Definition at line 123 of file UserProfile.cxx.

{
   assert(0);
   static NameAddr gruu;
   return gruu;
}
virtual Data& resip::UserProfile::getImsAuthHost ( ) [inline, virtual]

Definition at line 31 of file UserProfile.hxx.

References mImsAuthHost.

{ return mImsAuthHost; }
virtual Data& resip::UserProfile::getImsAuthUserName ( ) [inline, virtual]

Definition at line 30 of file UserProfile.hxx.

References mImsAuthUserName.

{ return mImsAuthUserName; }      
const Data & UserProfile::getInstanceId ( ) const [virtual]

Definition at line 92 of file UserProfile.cxx.

References mInstanceId.

{
   return mInstanceId;
}
virtual const Uri& resip::UserProfile::getPublicGruu ( ) [inline, virtual]

Definition at line 55 of file UserProfile.hxx.

References mPubGruu.

{ return mPubGruu; }
virtual int resip::UserProfile::getRegId ( ) [inline, virtual]

Definition at line 109 of file UserProfile.hxx.

References mRegId.

{ return mRegId; }
NameAddrs & UserProfile::getServiceRoute ( ) [virtual]

Definition at line 74 of file UserProfile.cxx.

References mServiceRoute.

{
   return mServiceRoute;
}
virtual const Uri& resip::UserProfile::getTempGruu ( ) [inline, virtual]

Definition at line 59 of file UserProfile.hxx.

References mTempGruu.

{ return mTempGruu; }
virtual bool& resip::UserProfile::gruuEnabled ( ) [inline, virtual]

Definition at line 51 of file UserProfile.hxx.

References mGruuEnabled.

{ return mGruuEnabled; }
virtual bool resip::UserProfile::gruuEnabled ( ) const [inline, virtual]

Definition at line 52 of file UserProfile.hxx.

References mGruuEnabled.

{ return mGruuEnabled; }
bool UserProfile::hasGruu ( const Data aor) const [virtual]

Definition at line 103 of file UserProfile.cxx.

{
   return false;
}
bool UserProfile::hasGruu ( const Data aor,
const Data instance 
) const [virtual]

Definition at line 109 of file UserProfile.cxx.

{
   return false;
}
bool UserProfile::hasInstanceId ( ) [virtual]

Definition at line 80 of file UserProfile.cxx.

References resip::Data::empty(), and mInstanceId.

{
   return !mInstanceId.empty();
}

Here is the call graph for this function:

virtual bool resip::UserProfile::hasPublicGruu ( ) const [inline, virtual]

Definition at line 54 of file UserProfile.hxx.

References resip::Data::empty(), resip::Uri::host(), and mPubGruu.

{ return !mPubGruu.host().empty(); }

Here is the call graph for this function:

virtual bool resip::UserProfile::hasTempGruu ( ) const [inline, virtual]

Definition at line 58 of file UserProfile.hxx.

References resip::Data::empty(), resip::Uri::host(), and mTempGruu.

{ return !mTempGruu.host().empty(); }

Here is the call graph for this function:

bool UserProfile::isAnonymous ( ) const

Definition at line 50 of file UserProfile.cxx.

References resip::Uri::getAor(), mAnonymous, mDefaultFrom, and resip::NameAddr::uri().

Referenced by resip::DialogUsageManager::send().

{
   return (mDefaultFrom.uri().getAor() == mAnonymous.uri().getAor());
}

Here is the call graph for this function:

void UserProfile::setDefaultFrom ( const NameAddr from) [virtual]

Definition at line 56 of file UserProfile.cxx.

References mDefaultFrom.

{
   mDefaultFrom = from;
}
void UserProfile::setDigestCredential ( const Data realm,
const Data user,
const Data password,
bool  isPasswordA1Hash = false 
) [virtual]

For the password you may either provide the plain text password (isPasswordA1Hash = false) or the Digest A1 MD5 Hash (isPasswordA1Hash = true).

Note: If the A1 hash is provided then the realm MUST match the realm in the challenge or authentication will fail. If the plain text password is provided, then we will form the A1 hash using the realm from the challenge.

Definition at line 137 of file UserProfile.cxx.

References DebugLog, and mDigestCredentials.

{
   DigestCredential cred(realm, user, password, isPasswordA1Hash);

   DebugLog (<< "Adding credential: " << cred);
   mDigestCredentials.erase(cred);
   mDigestCredentials.insert(cred);
}
virtual void resip::UserProfile::setImsAuthUser ( const Data userName,
const Data host 
) [inline, virtual]

Definition at line 29 of file UserProfile.hxx.

References mImsAuthHost, and mImsAuthUserName.

{ mImsAuthUserName = userName; mImsAuthHost = host; }      
void UserProfile::setInstanceId ( const Data id) [virtual]

Definition at line 86 of file UserProfile.cxx.

References mInstanceId.

{
   mInstanceId = id;
}
virtual void resip::UserProfile::setPublicGruu ( const Uri gruu) [inline, virtual]

Definition at line 56 of file UserProfile.hxx.

References mPubGruu.

{ mPubGruu = gruu; }
virtual void resip::UserProfile::setRegId ( int  regId) [inline, virtual]

Definition at line 108 of file UserProfile.hxx.

References mRegId.

{ mRegId = regId; }
void UserProfile::setServiceRoute ( const NameAddrs sRoute) [virtual]

Definition at line 68 of file UserProfile.cxx.

References mServiceRoute.

{
   mServiceRoute = sRoute;
}
virtual void resip::UserProfile::setTempGruu ( const Uri gruu) [inline, virtual]

Definition at line 60 of file UserProfile.hxx.

References mTempGruu.

{ mTempGruu = gruu; }

Friends And Related Function Documentation

friend class ClientRegistration [friend]

Definition at line 133 of file UserProfile.hxx.

friend class Dialog [friend]

Definition at line 134 of file UserProfile.hxx.

friend class DialogUsageManager [friend]

Definition at line 132 of file UserProfile.hxx.

EncodeStream& operator<< ( EncodeStream ,
const UserProfile profile 
) [friend]

Member Data Documentation

const resip::NameAddr UserProfile::mAnonymous [static, private]

Definition at line 128 of file UserProfile.hxx.

Referenced by getAnonymousUserProfile(), and isAnonymous().

Definition at line 131 of file UserProfile.hxx.

Referenced by clientOutboundEnabled().

Definition at line 120 of file UserProfile.hxx.

Referenced by getDefaultFrom(), isAnonymous(), and setDefaultFrom().

Definition at line 125 of file UserProfile.hxx.

Referenced by gruuEnabled().

Definition at line 124 of file UserProfile.hxx.

Referenced by getImsAuthHost(), and setImsAuthUser().

Definition at line 123 of file UserProfile.hxx.

Referenced by getImsAuthUserName(), and setImsAuthUser().

Definition at line 121 of file UserProfile.hxx.

Referenced by getInstanceId(), hasInstanceId(), and setInstanceId().

Definition at line 126 of file UserProfile.hxx.

Referenced by getPublicGruu(), hasPublicGruu(), and setPublicGruu().

Definition at line 130 of file UserProfile.hxx.

Referenced by getRegId(), and setRegId().

Definition at line 122 of file UserProfile.hxx.

Referenced by getServiceRoute(), and setServiceRoute().

Definition at line 127 of file UserProfile.hxx.

Referenced by getTempGruu(), hasTempGruu(), and setTempGruu().


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