|
reSIProcate/DialogUsageManager
9694
|
#include <UserProfile.hxx>


Classes | |
| struct | DigestCredential |
Public Member Functions | |
| UserProfile () | |
| UserProfile (SharedPtr< Profile > baseProfile) | |
| virtual | ~UserProfile () |
| virtual void | setDefaultFrom (const NameAddr &from) |
| virtual NameAddr & | getDefaultFrom () |
| virtual void | setServiceRoute (const NameAddrs &sRoute) |
| virtual NameAddrs & | getServiceRoute () |
| virtual void | setImsAuthUser (const Data &userName, const Data &host) |
| virtual Data & | getImsAuthUserName () |
| virtual Data & | getImsAuthHost () |
| virtual SharedPtr< UserProfile > | getAnonymousUserProfile () 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 NameAddr & | getGruu (const Data &aor) |
| virtual NameAddr & | getGruu (const Data &aor, const NameAddr &contact) |
| virtual bool & | gruuEnabled () |
| virtual bool | gruuEnabled () const |
| virtual bool | hasPublicGruu () const |
| virtual const Uri & | getPublicGruu () |
| virtual void | setPublicGruu (const Uri &gruu) |
| virtual bool | hasTempGruu () const |
| virtual const Uri & | getTempGruu () |
| 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 DigestCredential & | getDigestCredential (const Data &realm) |
| virtual bool & | clientOutboundEnabled () |
| virtual bool | clientOutboundEnabled () const |
| virtual bool | hasInstanceId () |
| virtual void | setInstanceId (const Data &id) |
| virtual const Data & | getInstanceId () const |
| virtual void | setRegId (int regId) |
| virtual int | getRegId () |
| const Tuple & | getClientOutboundFlowTuple () const |
| void | clearClientOutboundFlowTuple () |
Protected Member Functions | |
| virtual UserProfile * | clone () 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 |
| EncodeStream & | operator<< (EncodeStream &, const UserProfile &profile) |
Definition at line 16 of file UserProfile.hxx.
typedef std::set<DigestCredential> resip::UserProfile::DigestCredentials [private] |
Definition at line 137 of file UserProfile.hxx.
| 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); }
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);
}
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] |
Definition at line 99 of file UserProfile.hxx.
References mClientOutboundEnabled.
Referenced by resip::DialogUsageManager::sendUsingOutboundIfAppropriate().
{ return mClientOutboundEnabled; }
| virtual bool resip::UserProfile::clientOutboundEnabled | ( | ) | const [inline, virtual] |
Definition at line 100 of file UserProfile.hxx.
References mClientOutboundEnabled.
{ return 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);
}

| 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;
}

| const Tuple& resip::UserProfile::getClientOutboundFlowTuple | ( | ) | const [inline] |
Definition at line 113 of file UserProfile.hxx.
References mClientOutboundFlowTuple.
{ return mClientOutboundFlowTuple; }
| NameAddr & UserProfile::getDefaultFrom | ( | ) | [virtual] |
| 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;
}
}
Definition at line 115 of file UserProfile.cxx.
{
assert(0);
static NameAddr gruu;
return gruu;
}
Definition at line 123 of file UserProfile.cxx.
{
assert(0);
static NameAddr gruu;
return gruu;
}
| virtual Data& resip::UserProfile::getImsAuthHost | ( | ) | [inline, virtual] |
| 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] |
| virtual const Uri& resip::UserProfile::getPublicGruu | ( | ) | [inline, virtual] |
| virtual int resip::UserProfile::getRegId | ( | ) | [inline, virtual] |
| NameAddrs & UserProfile::getServiceRoute | ( | ) | [virtual] |
| virtual const Uri& resip::UserProfile::getTempGruu | ( | ) | [inline, virtual] |
| virtual bool& resip::UserProfile::gruuEnabled | ( | ) | [inline, virtual] |
| virtual bool resip::UserProfile::gruuEnabled | ( | ) | const [inline, virtual] |
| bool UserProfile::hasGruu | ( | const Data & | aor | ) | const [virtual] |
Definition at line 103 of file UserProfile.cxx.
{
return false;
}
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();
}

| 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(); }

| 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(); }

| 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());
}

| void UserProfile::setDefaultFrom | ( | const NameAddr & | from | ) | [virtual] |
| 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] |
| virtual void resip::UserProfile::setPublicGruu | ( | const Uri & | gruu | ) | [inline, virtual] |
| virtual void resip::UserProfile::setRegId | ( | int | regId | ) | [inline, virtual] |
| 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] |
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] |
const resip::NameAddr UserProfile::mAnonymous [static, private] |
Definition at line 128 of file UserProfile.hxx.
Referenced by getAnonymousUserProfile(), and isAnonymous().
bool resip::UserProfile::mClientOutboundEnabled [private] |
Definition at line 131 of file UserProfile.hxx.
Referenced by clientOutboundEnabled().
Definition at line 135 of file UserProfile.hxx.
Referenced by clearClientOutboundFlowTuple(), getClientOutboundFlowTuple(), and resip::DialogUsageManager::sendUsingOutboundIfAppropriate().
NameAddr resip::UserProfile::mDefaultFrom [private] |
Definition at line 120 of file UserProfile.hxx.
Referenced by getDefaultFrom(), isAnonymous(), and setDefaultFrom().
Definition at line 138 of file UserProfile.hxx.
Referenced by clearDigestCredentials(), getDigestCredential(), and setDigestCredential().
bool resip::UserProfile::mGruuEnabled [private] |
Definition at line 125 of file UserProfile.hxx.
Referenced by gruuEnabled().
Data resip::UserProfile::mImsAuthHost [private] |
Definition at line 124 of file UserProfile.hxx.
Referenced by getImsAuthHost(), and setImsAuthUser().
Data resip::UserProfile::mImsAuthUserName [private] |
Definition at line 123 of file UserProfile.hxx.
Referenced by getImsAuthUserName(), and setImsAuthUser().
Data resip::UserProfile::mInstanceId [private] |
Definition at line 121 of file UserProfile.hxx.
Referenced by getInstanceId(), hasInstanceId(), and setInstanceId().
Uri resip::UserProfile::mPubGruu [private] |
Definition at line 126 of file UserProfile.hxx.
Referenced by getPublicGruu(), hasPublicGruu(), and setPublicGruu().
int resip::UserProfile::mRegId [private] |
Definition at line 130 of file UserProfile.hxx.
Referenced by getRegId(), and setRegId().
NameAddrs resip::UserProfile::mServiceRoute [private] |
Definition at line 122 of file UserProfile.hxx.
Referenced by getServiceRoute(), and setServiceRoute().
Uri resip::UserProfile::mTempGruu [private] |
Definition at line 127 of file UserProfile.hxx.
Referenced by getTempGruu(), hasTempGruu(), and setTempGruu().
1.7.5.1