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

[reSIProcate] stack initialization proposed change


Hi,

I'm proposing changing the way SipStack is initialized (constructed). Goal is to make it easier to add additional initialization parameters (to support new features within stack) without constantly extending the constructor arguments. To that end, there is a new class SipStackOptions, which has field that can be individually set, and then the whole instance is passed to the SipStack constructor. This makes it easier to have helper classes/functions that "pass thru" initialization arguments.

The change is entirely backwards compat: the old constructor is supported. Originally I had planned to share more code between the two constructors, but in the end I wasn't comfortable with the possible change in order of operations.

 Also added is new class "EventStackSimpleMgr" which handles creating thread related resources (thread, pollgrp, asyncIntr) and initializing the stack on an application behalf. This should simplify writing simple applications.

Two patches are attached. The first has the core changes to resip/stack. The 2nd has changes to resip/stack/tests (mostly testStack.cxx).

I'll commit sometime next week if feedback is positive.

Thanks,
Kennard

Attachment: resip-stackinit.patch
Description: Binary data

Attachment: resip-stackinit2.patch
Description: Binary data