reSIProcate/DialogUsageManager  9694
Public Member Functions | Static Public Member Functions | Public Attributes
resip::ContactInstanceRecord Class Reference

A single contact record, bound to an Aor during registration. More...

#include <ContactInstanceRecord.hxx>

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

List of all members.

Public Member Functions

 ContactInstanceRecord ()
bool operator== (const ContactInstanceRecord &rhs) const

Static Public Member Functions

static ContactInstanceRecord makeRemoveDelta (const NameAddr &contact)
static ContactInstanceRecord makeUpdateDelta (const NameAddr &contact, UInt64 expires, const SipMessage &msg)

Public Attributes

NameAddr mContact
UInt64 mRegExpires
UInt64 mLastUpdated
Tuple mReceivedFrom
Tuple mPublicAddress
NameAddrs mSipPath
Data mInstance
UInt32 mRegId
bool mSyncContact
bool mUseFlowRouting
void * mUserInfo
 can be used to map user record information (database record id for faster updates?)

Detailed Description

A single contact record, bound to an Aor during registration.

Definition at line 19 of file ContactInstanceRecord.hxx.


Constructor & Destructor Documentation

ContactInstanceRecord::ContactInstanceRecord ( )

Definition at line 8 of file ContactInstanceRecord.cxx.


Member Function Documentation

ContactInstanceRecord ContactInstanceRecord::makeRemoveDelta ( const NameAddr contact) [static]

Definition at line 38 of file ContactInstanceRecord.cxx.

References mContact.

{
   ContactInstanceRecord c;
   c.mContact = contact;
   return c;
}
ContactInstanceRecord ContactInstanceRecord::makeUpdateDelta ( const NameAddr contact,
UInt64  expires,
const SipMessage msg 
) [static]

Definition at line 46 of file ContactInstanceRecord.cxx.

References resip::SipMessage::exists(), resip::NameAddr::exists(), resip::Helper::getClientPublicAddress(), resip::SipMessage::getSource(), resip::SipMessage::header(), mContact, mInstance, mPublicAddress, mReceivedFrom, mRegExpires, mRegId, mSipPath, and resip::ParserCategory::param().

{
   ContactInstanceRecord c;
   c.mContact = contact;
   c.mRegExpires = expires;
   c.mReceivedFrom = msg.getSource();
   c.mPublicAddress = Helper::getClientPublicAddress(msg);
   if (msg.exists(h_Paths))
   {
      c.mSipPath = msg.header(h_Paths);
   }
   if (contact.exists(p_Instance))
   {
      c.mInstance = contact.param(p_Instance);
   }
   if (contact.exists(p_regid))
   {
      c.mRegId = contact.param(p_regid);
   }
   // !jf! need to fill in mServerSessionId here
   return c;
  
}

Here is the call graph for this function:

bool ContactInstanceRecord::operator== ( const ContactInstanceRecord rhs) const

Definition at line 19 of file ContactInstanceRecord.cxx.

References resip::Data::empty(), mContact, mInstance, mRegId, and resip::NameAddr::uri().

{
   if((mRegId != 0 && !mInstance.empty()) || 
      (rhs.mRegId != 0 && !rhs.mInstance.empty()))
   {
      // If regId and instanceId is specified on either, then outbound RFC5626 is 
      // in use - match only if both instance id and reg-id match - ignore contact URI
      return mInstance == rhs.mInstance && 
             mRegId == rhs.mRegId;
   }
   else
   {
      // otherwise both instance (if specified) and contact must match
      return mInstance == rhs.mInstance &&
             mContact.uri() == rhs.mContact.uri();
   }
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 37 of file ContactInstanceRecord.hxx.

Referenced by resip::ServerRegistration::tryFlow().

can be used to map user record information (database record id for faster updates?)

Definition at line 42 of file ContactInstanceRecord.hxx.


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