[reSIProcate] Ok, I have a "thumbs up" on my problem.
Hi Guys,
Ok, after I "fixed" the dum/Handle.hxx file - I got a clean build...
seemed to have
fixed my problem.
Now I have some very fundimental questions about the "lifetime" of these
objects.
So, I want to go through each one... and ask specific questions about them.
I hope the time and energy I put into this can help the developer group
hammer
this into something that can be used more broadly by other Platforms
(Mac included)
I'll be making references to the files in .../dun/test
REGISTERING...
referring to "BasicRegister.cxx"... It creates an instance of a SipStack.
Does this instance of a SipStack live throughout the SIP Phone? Ie:
Do I use just a single instance of a SipStack? Or do I have to have a
seperate one for each Sip Command I would want to issue: Ie: register,
Invite, etc.
what about DialogUsageManager? Do I instantiate a single one and use
it throughout my program? Or do I create an instance of one for each
basic command I would issue?
In this piece of code... starting from line 20 in basicRegister.cxx.
we have:
class RegisterAppDialogSet : public AppDialogSet
{
public:
RegisterAppDialogSet(DialogUsageManager& dum) : AppDialogSet(dum)
{}
};
Then, where it's called... in line 128...
SipMessage & regMessage = clientDum.makeRegistration(from, new
RegisterAppDialogSet(clientDum));
Being somewhat unfamiliar with C++, does "SipMessage & regMessage"
imply that this is
a "pointer" to a SipMessage which is returned from the
"makeRegistration" method call?
The regMessage is declated as a local variable, right? If I were to
make it a pointer,
then would this statement be valid?
clientDum is delared as a POINTER, as well as "from". Thus the -> notation.
SipMessage *reqMessage = clientDum->makeRegistration(*from, new
AppDialogSet(*clientDum));
Note, due to mixing C++ with Obj C, I have to use pointers.... so
would this work (ABOVE) ? And what is
the expected lifetime of a reqMessage? Should I keep it around, or can
I just refer to it as
a local var? in that it is temporarily used.
Defining variables in "main" can all be local vars, becuase the scope
is valid throughout the
test, it's all in "main()" - but in MY case, I have to know what
things I need to "keep around"
and what I can use as local vars.... Obviously, no docs explain this,
but you developers know
this from working so long on the project.
This is why the concept of finding a full implementation of a SIP
Phone in source is so
important to me. And according to the responses I've gotten on this
list, none exist (sigh).
I thought a Linux SIP Phone exists in source form, but I can find any
that use the
resip/dum stack, but none of the links offered to me point to any stand
alone SIP
phone implemented with resiprocate.
INVITE
refer to BasicCall.cxx please...
In these two lines:
auto_ptr<AppDialogSetFactory> uac_dsf(new testAppDialogSetFactory);
dumUac->setAppDialogSetFactory(uac_dsf);
What is a "AppDialogSetFactory".... and is it ONLY used for the INVITE
command? I didn't see it in "BasicRegister.cxx"... and "dumUac" is the
Handler, right?
Although in this example, they are using multiple inheritance to "mix in"
all the handler classes in a single class. I prefer not to do it this way.
Instead, I want to have seperate handler files for each main handler
object. Do I have this freedom?
Also, my handlers will be defined in seperate C++ code and header modules
and referred to by pointers in my Bridge code.
I can see why they did it this way, just because everything can be put into
a single module for convenience.... is my assumption correct?
John