< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] recon UserAgent hiding SipStack and DUM, adding a TransactionUser



Looking at the UserAgent[1] design in recon, mStack and mDum are both
private and there is no way for subclasses or anything else to access
them directly.

For my registration forwarding, I needed to add an extra subclass of
TransactionUser.  It needs to be inserted before DUM or it is necessary
to modify the MessageFilterRuleSet of the DUM instance.

To test that, I created two protected methods in UserAgent:

   resip::SipStack& getSipStack() { return mStack; };
   resip::DialogUsageManager& getDialogUsageManager();

How do you feel about opening things up like this with more protected
and public accessors?  Would you prefer a more elaborate approach, for
example, passing extra TransactionUsers through the UserAgent
constructor, or letting other classes create and do some initial
configuration of SipStack and pass it in the constructor?

Another issue that arises is how additional TransactionUser subclasses
can become part of the UA process() loop (currently it just calls
mDum.process()), or should the application run them in other threads.

Regards,

Daniel