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

[reSIProcate] Something very confusing...


hi,

Still having lots and lots of problems compiling this piece of code... take a look
below...  this is from BasicCall.cxx

class testAppDialogSet : public AppDialogSet
{
public:
testAppDialogSet(DialogUsageManager& dum, Data SampleAppData) : AppDialogSet(dum), mSampleAppData(SampleAppData) { cout << mSampleAppData << ": testAppDialogSet: created." << endl; }
  virtual ~testAppDialogSet()
{ cout << mSampleAppData << ": testAppDialogSet: destroyed." << endl; }
  virtual AppDialog* createAppDialog(const SipMessage& msg)
{ return new testAppDialog(mDum, mSampleAppData); }
  virtual UserProfile* selectUASUserProfile(const SipMessage& msg)
  {
cout << mSampleAppData << ": testAppDialogSet: UAS UserProfile requested for msg: " << msg.brief() << endl; return mDum.getMasterProfile();
  }
  Data mSampleAppData;
};

When I conpile this,  I get...

cannot convert `resip::MasterProfile*' to `resip::UserProfile*' in return

As you can see in the return statement in the "selectUASUserProfile" method,
it appears to return a MasterProfile object, but it is declared as returning a
UserProfile * - is this a mistake?   If so,  what should it be?

Is this a bug? why am I getting this? I copied this directly from the test application, so there shouldn't be any reason why it isn't compiling. Also, where is 'mDum' defined at? see how it is used in the return argument in the "createAppDialog" method above.....

John