- switch to unique_ptr
This commit is contained in:
parent
be40ebef7e
commit
31c876490c
|
|
@ -414,7 +414,7 @@ int Account::sendMsg(const std::string& peer, const void* ptr, unsigned length,
|
||||||
type = resip::Mime(resip::Data(mime), resip::Data());
|
type = resip::Mime(resip::Data(mime), resip::Data());
|
||||||
|
|
||||||
resip::ClientPagerMessageHandle msgHandle = mAgent.mDum->makePagerMessage(resip::NameAddr(resip::Data(peer)), mProfile, s);
|
resip::ClientPagerMessageHandle msgHandle = mAgent.mDum->makePagerMessage(resip::NameAddr(resip::Data(peer)), mProfile, s);
|
||||||
auto_ptr<resip::Contents> contentPtr(new resip::PlainContents(resip::Data(std::string((const char*)ptr, length)),type));
|
unique_ptr<resip::Contents> contentPtr(new resip::PlainContents(resip::Data(std::string((const char*)ptr, length)),type));
|
||||||
int result = s->sessionId();
|
int result = s->sessionId();
|
||||||
msgHandle->page(contentPtr);
|
msgHandle->page(contentPtr);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ void UserAgent::start()
|
||||||
|
|
||||||
mDum->setMasterProfile(mProfile);
|
mDum->setMasterProfile(mProfile);
|
||||||
mDum->setClientRegistrationHandler(this);
|
mDum->setClientRegistrationHandler(this);
|
||||||
mDum->setClientAuthManager(auto_ptr<resip::ClientAuthManager>(new resip::ClientAuthManager()));
|
mDum->setClientAuthManager(unique_ptr<resip::ClientAuthManager>(new resip::ClientAuthManager()));
|
||||||
|
|
||||||
mDum->addClientSubscriptionHandler(resip::Symbols::Presence, this);
|
mDum->addClientSubscriptionHandler(resip::Symbols::Presence, this);
|
||||||
mDum->addClientSubscriptionHandler(resip::Data("message-summary"), this);
|
mDum->addClientSubscriptionHandler(resip::Data("message-summary"), this);
|
||||||
|
|
@ -244,7 +244,7 @@ void UserAgent::start()
|
||||||
mDum->setClientPagerMessageHandler(this);
|
mDum->setClientPagerMessageHandler(this);
|
||||||
mDum->setServerPagerMessageHandler(this);
|
mDum->setServerPagerMessageHandler(this);
|
||||||
|
|
||||||
auto_ptr<resip::AppDialogSetFactory> uac_dsf(new ResipSessionFactory(this));
|
unique_ptr<resip::AppDialogSetFactory> uac_dsf(new ResipSessionFactory(this));
|
||||||
mDum->setAppDialogSetFactory(uac_dsf);
|
mDum->setAppDialogSetFactory(uac_dsf);
|
||||||
|
|
||||||
// Fire onStart event if stun is not used or stun server ip is known
|
// Fire onStart event if stun is not used or stun server ip is known
|
||||||
|
|
@ -1471,7 +1471,7 @@ void UserAgent::onSuccess(resip::ClientPagerMessageHandle h, const resip::SipMes
|
||||||
onMessageSent(getAccount(status.header(resip::h_From)), s->sessionId(), s->remoteAddress(), s->tag());
|
onMessageSent(getAccount(status.header(resip::h_From)), s->sessionId(), s->remoteAddress(), s->tag());
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserAgent::onFailure(resip::ClientPagerMessageHandle h, const resip::SipMessage& status, std::auto_ptr<resip::Contents> contents)
|
void UserAgent::onFailure(resip::ClientPagerMessageHandle h, const resip::SipMessage& status, std::unique_ptr<resip::Contents> contents)
|
||||||
{
|
{
|
||||||
if (!h.isValid())
|
if (!h.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
using namespace resip;
|
using namespace resip;
|
||||||
|
|
||||||
std::auto_ptr<ClientAuthExtension> ClientAuthExtension::mInstance = std::auto_ptr<ClientAuthExtension>(new ClientAuthExtension());
|
std::unique_ptr<ClientAuthExtension> ClientAuthExtension::mInstance = std::unique_ptr<ClientAuthExtension>(new ClientAuthExtension());
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientAuthExtension::setInstance(std::auto_ptr<ClientAuthExtension> ext)
|
ClientAuthExtension::setInstance(std::unique_ptr<ClientAuthExtension> ext)
|
||||||
{
|
{
|
||||||
mInstance = ext;
|
mInstance = ext;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -413,7 +413,7 @@ ClientAuthManager::RealmState::addAuthentication(SipMessage& request)
|
||||||
|
|
||||||
// Add client auth decorator so that we ensure any body hashes are calcuated after user defined outbound decorators that
|
// Add client auth decorator so that we ensure any body hashes are calcuated after user defined outbound decorators that
|
||||||
// may be modifying the message body
|
// may be modifying the message body
|
||||||
std::auto_ptr<MessageDecorator> clientAuthDecorator(new ClientAuthDecorator(mIsProxyCredential, mAuth, mCredential, authQop, nonceCountString));
|
std::unique_ptr<MessageDecorator> clientAuthDecorator(new ClientAuthDecorator(mIsProxyCredential, mAuth, mCredential, authQop, nonceCountString));
|
||||||
request.addOutboundDecorator(clientAuthDecorator);
|
request.addOutboundDecorator(clientAuthDecorator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ ClientInviteSession::ClientInviteSession(DialogUsageManager& dum,
|
||||||
assert(request->isRequest());
|
assert(request->isRequest());
|
||||||
if(initialOffer)
|
if(initialOffer)
|
||||||
{
|
{
|
||||||
mProposedLocalOfferAnswer = auto_ptr<Contents>(initialOffer->clone());
|
mProposedLocalOfferAnswer = unique_ptr<Contents>(initialOffer->clone());
|
||||||
mProposedEncryptionLevel = level;
|
mProposedEncryptionLevel = level;
|
||||||
}
|
}
|
||||||
*mLastLocalSessionModification = *request; // Copy message, so that modifications to mLastLocalSessionModification don't effect creator->getLastRequest
|
*mLastLocalSessionModification = *request; // Copy message, so that modifications to mLastLocalSessionModification don't effect creator->getLastRequest
|
||||||
|
|
@ -663,7 +663,7 @@ ClientInviteSession::dispatchStart (const SipMessage& msg)
|
||||||
assert(msg.header(h_CSeq).method() == INVITE);
|
assert(msg.header(h_CSeq).method() == INVITE);
|
||||||
|
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
InviteSession::Event event = toEvent(msg, offerAnswer.get());
|
InviteSession::Event event = toEvent(msg, offerAnswer.get());
|
||||||
|
|
||||||
|
|
@ -793,7 +793,7 @@ void
|
||||||
ClientInviteSession::dispatchEarly (const SipMessage& msg)
|
ClientInviteSession::dispatchEarly (const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -920,7 +920,7 @@ void
|
||||||
ClientInviteSession::dispatchAnswered (const SipMessage& msg)
|
ClientInviteSession::dispatchAnswered (const SipMessage& msg)
|
||||||
{
|
{
|
||||||
//InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
//InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -972,7 +972,7 @@ void
|
||||||
ClientInviteSession::dispatchEarlyWithOffer (const SipMessage& msg)
|
ClientInviteSession::dispatchEarlyWithOffer (const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1040,7 +1040,7 @@ void
|
||||||
ClientInviteSession::dispatchSentAnswer (const SipMessage& msg)
|
ClientInviteSession::dispatchSentAnswer (const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1101,7 +1101,7 @@ void
|
||||||
ClientInviteSession::dispatchQueuedUpdate (const SipMessage& msg)
|
ClientInviteSession::dispatchQueuedUpdate (const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1179,7 +1179,7 @@ void
|
||||||
ClientInviteSession::dispatchEarlyWithAnswer (const SipMessage& msg)
|
ClientInviteSession::dispatchEarlyWithAnswer (const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1258,7 +1258,7 @@ void
|
||||||
ClientInviteSession::dispatchSentUpdateEarly (const SipMessage& msg)
|
ClientInviteSession::dispatchSentUpdateEarly (const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1322,7 +1322,7 @@ void
|
||||||
ClientInviteSession::dispatchSentUpdateEarlyGlare (const SipMessage& msg)
|
ClientInviteSession::dispatchSentUpdateEarlyGlare (const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1364,7 +1364,7 @@ ClientInviteSession::dispatchReceivedUpdateEarly (const SipMessage& msg)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1382,7 +1382,7 @@ void
|
||||||
ClientInviteSession::dispatchCancelled (const SipMessage& msg)
|
ClientInviteSession::dispatchCancelled (const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ ClientPagerMessage::getMessageRequest()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientPagerMessage::page(std::auto_ptr<Contents> contents,
|
ClientPagerMessage::page(std::unique_ptr<Contents> contents,
|
||||||
DialogUsageManager::EncryptionLevel level)
|
DialogUsageManager::EncryptionLevel level)
|
||||||
{
|
{
|
||||||
assert(contents.get() != 0);
|
assert(contents.get() != 0);
|
||||||
|
|
@ -132,7 +132,7 @@ class ClientPagerMessagePageCommand : public DumCommandAdapter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ClientPagerMessagePageCommand(ClientPagerMessage& clientPagerMessage,
|
ClientPagerMessagePageCommand(ClientPagerMessage& clientPagerMessage,
|
||||||
std::auto_ptr<Contents> contents,
|
std::unique_ptr<Contents> contents,
|
||||||
DialogUsageManager::EncryptionLevel level)
|
DialogUsageManager::EncryptionLevel level)
|
||||||
: mClientPagerMessage(clientPagerMessage),
|
: mClientPagerMessage(clientPagerMessage),
|
||||||
mContents(contents),
|
mContents(contents),
|
||||||
|
|
@ -152,12 +152,12 @@ public:
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
ClientPagerMessage& mClientPagerMessage;
|
ClientPagerMessage& mClientPagerMessage;
|
||||||
std::auto_ptr<Contents> mContents;
|
std::unique_ptr<Contents> mContents;
|
||||||
DialogUsageManager::EncryptionLevel mLevel;
|
DialogUsageManager::EncryptionLevel mLevel;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientPagerMessage::pageCommand(std::auto_ptr<Contents> contents,
|
ClientPagerMessage::pageCommand(std::unique_ptr<Contents> contents,
|
||||||
DialogUsageManager::EncryptionLevel level)
|
DialogUsageManager::EncryptionLevel level)
|
||||||
{
|
{
|
||||||
mDum.post(new ClientPagerMessagePageCommand(*this, contents, level));
|
mDum.post(new ClientPagerMessagePageCommand(*this, contents, level));
|
||||||
|
|
@ -203,7 +203,7 @@ ClientPagerMessage::dispatch(const SipMessage& msg)
|
||||||
Contents* p = contents->contents;
|
Contents* p = contents->contents;
|
||||||
WarningLog ( << "Paging failed " << *p );
|
WarningLog ( << "Paging failed " << *p );
|
||||||
Helper::makeResponse(errResponse, *mRequest, code);
|
Helper::makeResponse(errResponse, *mRequest, code);
|
||||||
handler->onFailure(getHandle(), errResponse, std::auto_ptr<Contents>(p));
|
handler->onFailure(getHandle(), errResponse, std::unique_ptr<Contents>(p));
|
||||||
contents->contents = 0;
|
contents->contents = 0;
|
||||||
}
|
}
|
||||||
mMsgQueue.clear();
|
mMsgQueue.clear();
|
||||||
|
|
|
||||||
|
|
@ -322,7 +322,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ClientPublication& mClientPublication;
|
ClientPublication& mClientPublication;
|
||||||
std::auto_ptr<Contents> mBody;
|
std::unique_ptr<Contents> mBody;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -31,17 +31,17 @@ DialogEventInfo::DialogEventInfo(const DialogEventInfo& rhs)
|
||||||
{
|
{
|
||||||
if (rhs.mReplacesId.get())
|
if (rhs.mReplacesId.get())
|
||||||
{
|
{
|
||||||
mReplacesId = std::auto_ptr<DialogId>(new DialogId(rhs.mReplacesId->getCallId(),
|
mReplacesId = std::unique_ptr<DialogId>(new DialogId(rhs.mReplacesId->getCallId(),
|
||||||
rhs.mReplacesId->getLocalTag(),
|
rhs.mReplacesId->getLocalTag(),
|
||||||
rhs.mReplacesId->getRemoteTag()));
|
rhs.mReplacesId->getRemoteTag()));
|
||||||
}
|
}
|
||||||
if (rhs.mLocalOfferAnswer.get())
|
if (rhs.mLocalOfferAnswer.get())
|
||||||
{
|
{
|
||||||
mLocalOfferAnswer = std::auto_ptr<Contents>(rhs.mLocalOfferAnswer->clone());
|
mLocalOfferAnswer = std::unique_ptr<Contents>(rhs.mLocalOfferAnswer->clone());
|
||||||
}
|
}
|
||||||
if (rhs.mRemoteOfferAnswer.get())
|
if (rhs.mRemoteOfferAnswer.get())
|
||||||
{
|
{
|
||||||
mRemoteOfferAnswer = std::auto_ptr<Contents>(rhs.mRemoteOfferAnswer->clone());
|
mRemoteOfferAnswer = std::unique_ptr<Contents>(rhs.mRemoteOfferAnswer->clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,11 @@ DialogEventStateManager::onTryingUas(Dialog& dialog, const SipMessage& invite)
|
||||||
eventInfo->mDirection = DialogEventInfo::Recipient;
|
eventInfo->mDirection = DialogEventInfo::Recipient;
|
||||||
eventInfo->mCreationTimeSeconds = Timer::getTimeSecs();
|
eventInfo->mCreationTimeSeconds = Timer::getTimeSecs();
|
||||||
eventInfo->mInviteSession = InviteSessionHandle::NotValid();
|
eventInfo->mInviteSession = InviteSessionHandle::NotValid();
|
||||||
eventInfo->mRemoteOfferAnswer = (invite.getContents() != NULL ? std::auto_ptr<Contents>(invite.getContents()->clone()) : std::auto_ptr<Contents>());
|
eventInfo->mRemoteOfferAnswer = (invite.getContents() != NULL ? std::unique_ptr<Contents>(invite.getContents()->clone()) : std::unique_ptr<Contents>());
|
||||||
eventInfo->mLocalIdentity = dialog.getLocalNameAddr();
|
eventInfo->mLocalIdentity = dialog.getLocalNameAddr();
|
||||||
eventInfo->mLocalTarget = dialog.getLocalContact().uri(); // !slg! TODO - fix me - the Dialog stored local contact has an empty hostname so that the stack will fill it in
|
eventInfo->mLocalTarget = dialog.getLocalContact().uri(); // !slg! TODO - fix me - the Dialog stored local contact has an empty hostname so that the stack will fill it in
|
||||||
eventInfo->mRemoteIdentity = dialog.getRemoteNameAddr();
|
eventInfo->mRemoteIdentity = dialog.getRemoteNameAddr();
|
||||||
eventInfo->mRemoteTarget = std::auto_ptr<Uri>(new Uri(dialog.getRemoteTarget().uri()));
|
eventInfo->mRemoteTarget = std::unique_ptr<Uri>(new Uri(dialog.getRemoteTarget().uri()));
|
||||||
eventInfo->mRouteSet = dialog.getRouteSet();
|
eventInfo->mRouteSet = dialog.getRouteSet();
|
||||||
eventInfo->mState = DialogEventInfo::Trying;
|
eventInfo->mState = DialogEventInfo::Trying;
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ DialogEventStateManager::onTryingUas(Dialog& dialog, const SipMessage& invite)
|
||||||
Data replacesToTag = invite.header(h_Replaces).exists(p_toTag) ? invite.header(h_Replaces).param(p_toTag) : Data::Empty;
|
Data replacesToTag = invite.header(h_Replaces).exists(p_toTag) ? invite.header(h_Replaces).param(p_toTag) : Data::Empty;
|
||||||
Data replacesFromTag = invite.header(h_Replaces).exists(p_fromTag) ? invite.header(h_Replaces).param(p_fromTag) : Data::Empty;
|
Data replacesFromTag = invite.header(h_Replaces).exists(p_fromTag) ? invite.header(h_Replaces).param(p_fromTag) : Data::Empty;
|
||||||
|
|
||||||
eventInfo->mReplacesId = std::auto_ptr<DialogId>(new DialogId(invite.header(h_Replaces).value(),
|
eventInfo->mReplacesId = std::unique_ptr<DialogId>(new DialogId(invite.header(h_Replaces).value(),
|
||||||
replacesToTag,
|
replacesToTag,
|
||||||
replacesFromTag));
|
replacesFromTag));
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ DialogEventStateManager::onTryingUas(Dialog& dialog, const SipMessage& invite)
|
||||||
if (invite.exists(h_ReferredBy) &&
|
if (invite.exists(h_ReferredBy) &&
|
||||||
invite.header(h_ReferredBy).isWellFormed())
|
invite.header(h_ReferredBy).isWellFormed())
|
||||||
{
|
{
|
||||||
eventInfo->mReferredBy = std::auto_ptr<NameAddr>(new NameAddr(invite.header(h_ReferredBy)));
|
eventInfo->mReferredBy = std::unique_ptr<NameAddr>(new NameAddr(invite.header(h_ReferredBy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
mDialogIdToEventInfo[dialog.getId()] = eventInfo;
|
mDialogIdToEventInfo[dialog.getId()] = eventInfo;
|
||||||
|
|
@ -98,13 +98,13 @@ DialogEventStateManager::onTryingUac(DialogSet& dialogSet, const SipMessage& inv
|
||||||
assert(invite.header(h_Contacts).front().isWellFormed());
|
assert(invite.header(h_Contacts).front().isWellFormed());
|
||||||
eventInfo->mLocalTarget = invite.header(h_Contacts).front().uri();
|
eventInfo->mLocalTarget = invite.header(h_Contacts).front().uri();
|
||||||
eventInfo->mRemoteIdentity = invite.header(h_To);
|
eventInfo->mRemoteIdentity = invite.header(h_To);
|
||||||
eventInfo->mLocalOfferAnswer = (invite.getContents() != NULL ? std::auto_ptr<Contents>(invite.getContents()->clone()) : std::auto_ptr<Contents>());
|
eventInfo->mLocalOfferAnswer = (invite.getContents() != NULL ? std::unique_ptr<Contents>(invite.getContents()->clone()) : std::unique_ptr<Contents>());
|
||||||
eventInfo->mState = DialogEventInfo::Trying;
|
eventInfo->mState = DialogEventInfo::Trying;
|
||||||
|
|
||||||
if (invite.exists(h_ReferredBy) &&
|
if (invite.exists(h_ReferredBy) &&
|
||||||
invite.header(h_ReferredBy).isWellFormed())
|
invite.header(h_ReferredBy).isWellFormed())
|
||||||
{
|
{
|
||||||
eventInfo->mReferredBy = std::auto_ptr<NameAddr>(new NameAddr(invite.header(h_ReferredBy)));
|
eventInfo->mReferredBy = std::unique_ptr<NameAddr>(new NameAddr(invite.header(h_ReferredBy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
mDialogIdToEventInfo[eventInfo->mDialogId] = eventInfo;
|
mDialogIdToEventInfo[eventInfo->mDialogId] = eventInfo;
|
||||||
|
|
@ -132,7 +132,7 @@ DialogEventStateManager::onProceedingUac(const DialogSet& dialogSet, const SipMe
|
||||||
// ?bwc? Has something already checked for well-formedness here?
|
// ?bwc? Has something already checked for well-formedness here?
|
||||||
// Maybe DialogSet? Assert for now.
|
// Maybe DialogSet? Assert for now.
|
||||||
assert(response.header(h_Contacts).front().isWellFormed());
|
assert(response.header(h_Contacts).front().isWellFormed());
|
||||||
eventInfo->mRemoteTarget = std::auto_ptr<Uri>(new Uri(response.header(h_Contacts).front().uri()));
|
eventInfo->mRemoteTarget = std::unique_ptr<Uri>(new Uri(response.header(h_Contacts).front().uri()));
|
||||||
}
|
}
|
||||||
ProceedingDialogEvent evt(*eventInfo);
|
ProceedingDialogEvent evt(*eventInfo);
|
||||||
mDialogEventHandler->onProceeding(evt);
|
mDialogEventHandler->onProceeding(evt);
|
||||||
|
|
@ -162,7 +162,7 @@ DialogEventStateManager::onEarly(const Dialog& dialog, InviteSessionHandle is)
|
||||||
|
|
||||||
// local or remote target might change due to an UPDATE or re-INVITE
|
// local or remote target might change due to an UPDATE or re-INVITE
|
||||||
eventInfo->mLocalTarget = dialog.getLocalContact().uri(); // !slg! TODO - fix me - the Dialog stored local contact has an empty hostname so that the stack will fill it in
|
eventInfo->mLocalTarget = dialog.getLocalContact().uri(); // !slg! TODO - fix me - the Dialog stored local contact has an empty hostname so that the stack will fill it in
|
||||||
eventInfo->mRemoteTarget = std::auto_ptr<Uri>(new Uri(dialog.getRemoteTarget().uri()));
|
eventInfo->mRemoteTarget = std::unique_ptr<Uri>(new Uri(dialog.getRemoteTarget().uri()));
|
||||||
|
|
||||||
EarlyDialogEvent evt(*eventInfo);
|
EarlyDialogEvent evt(*eventInfo);
|
||||||
mDialogEventHandler->onEarly(evt);
|
mDialogEventHandler->onEarly(evt);
|
||||||
|
|
@ -183,7 +183,7 @@ DialogEventStateManager::onConfirmed(const Dialog& dialog, InviteSessionHandle i
|
||||||
|
|
||||||
// local or remote target might change due to an UPDATE or re-INVITE
|
// local or remote target might change due to an UPDATE or re-INVITE
|
||||||
eventInfo->mLocalTarget = dialog.getLocalContact().uri(); // !slg! TODO - fix me - the Dialog stored local contact has an empty hostname so that the stack will fill it in
|
eventInfo->mLocalTarget = dialog.getLocalContact().uri(); // !slg! TODO - fix me - the Dialog stored local contact has an empty hostname so that the stack will fill it in
|
||||||
eventInfo->mRemoteTarget = std::auto_ptr<Uri>(new Uri(dialog.getRemoteTarget().uri()));
|
eventInfo->mRemoteTarget = std::unique_ptr<Uri>(new Uri(dialog.getRemoteTarget().uri()));
|
||||||
|
|
||||||
// for the dialog that got the 200 OK
|
// for the dialog that got the 200 OK
|
||||||
SharedPtr<ConfirmedDialogEvent> confirmedEvt(new ConfirmedDialogEvent(*eventInfo));
|
SharedPtr<ConfirmedDialogEvent> confirmedEvt(new ConfirmedDialogEvent(*eventInfo));
|
||||||
|
|
@ -239,7 +239,7 @@ DialogEventStateManager::onTerminated(const Dialog& dialog, const SipMessage& ms
|
||||||
{
|
{
|
||||||
// .jjg. we're killing a *specific* dialog *after* the successful completion of the initial INVITE transaction;
|
// .jjg. we're killing a *specific* dialog *after* the successful completion of the initial INVITE transaction;
|
||||||
// so just elminate this dialog, not the entire dialogset
|
// so just elminate this dialog, not the entire dialogset
|
||||||
std::auto_ptr<TerminatedDialogEvent> evt(onDialogTerminatedImpl(it->second, reason, getResponseCode(msg), getFrontContact(msg)));
|
std::unique_ptr<TerminatedDialogEvent> evt(onDialogTerminatedImpl(it->second, reason, getResponseCode(msg), getFrontContact(msg)));
|
||||||
mDialogEventHandler->onTerminated(*evt);
|
mDialogEventHandler->onTerminated(*evt);
|
||||||
delete it->second;
|
delete it->second;
|
||||||
mDialogIdToEventInfo.erase(it++);
|
mDialogIdToEventInfo.erase(it++);
|
||||||
|
|
@ -283,7 +283,7 @@ DialogEventStateManager::onDialogSetTerminatedImpl(const DialogSetId& dialogSetI
|
||||||
it->first.getDialogSetId() == dialogSetId)
|
it->first.getDialogSetId() == dialogSetId)
|
||||||
{
|
{
|
||||||
eventInfo = it->second;
|
eventInfo = it->second;
|
||||||
std::auto_ptr<TerminatedDialogEvent> evt(onDialogTerminatedImpl(eventInfo, reason, getResponseCode(msg), getFrontContact(msg)));
|
std::unique_ptr<TerminatedDialogEvent> evt(onDialogTerminatedImpl(eventInfo, reason, getResponseCode(msg), getFrontContact(msg)));
|
||||||
mDialogEventHandler->onTerminated(*evt);
|
mDialogEventHandler->onTerminated(*evt);
|
||||||
delete it->second;
|
delete it->second;
|
||||||
mDialogIdToEventInfo.erase(it++);
|
mDialogIdToEventInfo.erase(it++);
|
||||||
|
|
@ -311,7 +311,7 @@ DialogEventStateManager::onDialogTerminatedImpl(DialogEventInfo* eventInfo,
|
||||||
|
|
||||||
if (remoteTarget)
|
if (remoteTarget)
|
||||||
{
|
{
|
||||||
eventInfo->mRemoteTarget = std::auto_ptr<Uri>(remoteTarget);
|
eventInfo->mRemoteTarget = std::unique_ptr<Uri>(remoteTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
TerminatedDialogEvent* evt = new TerminatedDialogEvent(*eventInfo, actualReason, responseCode);
|
TerminatedDialogEvent* evt = new TerminatedDialogEvent(*eventInfo, actualReason, responseCode);
|
||||||
|
|
@ -403,7 +403,7 @@ DialogEventStateManager::findOrCreateDialogInfo(const Dialog& dialog)
|
||||||
newForkInfo->mCreationTimeSeconds = Timer::getTimeSecs();
|
newForkInfo->mCreationTimeSeconds = Timer::getTimeSecs();
|
||||||
newForkInfo->mDialogId = dialog.getId();
|
newForkInfo->mDialogId = dialog.getId();
|
||||||
newForkInfo->mRemoteIdentity = dialog.getRemoteNameAddr();
|
newForkInfo->mRemoteIdentity = dialog.getRemoteNameAddr();
|
||||||
newForkInfo->mRemoteTarget = std::auto_ptr<Uri>(new Uri(dialog.getRemoteTarget().uri()));
|
newForkInfo->mRemoteTarget = std::unique_ptr<Uri>(new Uri(dialog.getRemoteTarget().uri()));
|
||||||
newForkInfo->mRouteSet = dialog.getRouteSet();
|
newForkInfo->mRouteSet = dialog.getRouteSet();
|
||||||
eventInfo = newForkInfo;
|
eventInfo = newForkInfo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -292,7 +292,7 @@ DialogUsageManager::forceShutdown(DumShutdownHandler* h)
|
||||||
DialogUsageManager::onAllHandlesDestroyed();
|
DialogUsageManager::onAllHandlesDestroyed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogUsageManager::setAppDialogSetFactory(std::auto_ptr<AppDialogSetFactory> factory)
|
void DialogUsageManager::setAppDialogSetFactory(std::unique_ptr<AppDialogSetFactory> factory)
|
||||||
{
|
{
|
||||||
mAppDialogSetFactory = factory;
|
mAppDialogSetFactory = factory;
|
||||||
}
|
}
|
||||||
|
|
@ -318,13 +318,13 @@ void DialogUsageManager::setMasterProfile(const SharedPtr<MasterProfile>& master
|
||||||
mMasterUserProfile = masterProfile; // required so that we can return a reference to SharedPtr<UserProfile> in getMasterUserProfile
|
mMasterUserProfile = masterProfile; // required so that we can return a reference to SharedPtr<UserProfile> in getMasterUserProfile
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogUsageManager::setKeepAliveManager(std::auto_ptr<KeepAliveManager> manager)
|
void DialogUsageManager::setKeepAliveManager(std::unique_ptr<KeepAliveManager> manager)
|
||||||
{
|
{
|
||||||
mKeepAliveManager = manager;
|
mKeepAliveManager = manager;
|
||||||
mKeepAliveManager->setDialogUsageManager(this);
|
mKeepAliveManager->setDialogUsageManager(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogUsageManager::setRedirectManager(std::auto_ptr<RedirectManager> manager)
|
void DialogUsageManager::setRedirectManager(std::unique_ptr<RedirectManager> manager)
|
||||||
{
|
{
|
||||||
mRedirectManager = manager;
|
mRedirectManager = manager;
|
||||||
}
|
}
|
||||||
|
|
@ -340,7 +340,7 @@ RedirectHandler* DialogUsageManager::getRedirectHandler()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DialogUsageManager::setClientAuthManager(std::auto_ptr<ClientAuthManager> manager)
|
DialogUsageManager::setClientAuthManager(std::unique_ptr<ClientAuthManager> manager)
|
||||||
{
|
{
|
||||||
mClientAuthManager = manager;
|
mClientAuthManager = manager;
|
||||||
}
|
}
|
||||||
|
|
@ -393,7 +393,7 @@ DialogUsageManager::setRegistrationPersistenceManager(RegistrationPersistenceMan
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DialogUsageManager::setRemoteCertStore(auto_ptr<RemoteCertStore> store)
|
DialogUsageManager::setRemoteCertStore(unique_ptr<RemoteCertStore> store)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -924,7 +924,7 @@ DialogUsageManager::send(SharedPtr<SipMessage> msg)
|
||||||
SharedPtr<MessageDecorator> outboundDecorator = userProfile->getOutboundDecorator();
|
SharedPtr<MessageDecorator> outboundDecorator = userProfile->getOutboundDecorator();
|
||||||
if (outboundDecorator.get())
|
if (outboundDecorator.get())
|
||||||
{
|
{
|
||||||
msg->addOutboundDecorator(std::auto_ptr<MessageDecorator>(outboundDecorator->clone()));
|
msg->addOutboundDecorator(std::unique_ptr<MessageDecorator>(outboundDecorator->clone()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -987,7 +987,7 @@ DialogUsageManager::send(SharedPtr<SipMessage> msg)
|
||||||
DebugLog (<< "SEND: " << std::endl << std::endl << *msg);
|
DebugLog (<< "SEND: " << std::endl << std::endl << *msg);
|
||||||
|
|
||||||
OutgoingEvent* event = new OutgoingEvent(msg);
|
OutgoingEvent* event = new OutgoingEvent(msg);
|
||||||
outgoingProcess(auto_ptr<Message>(event));
|
outgoingProcess(unique_ptr<Message>(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -998,7 +998,7 @@ DialogUsageManager::sendCommand(SharedPtr<SipMessage> request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DialogUsageManager::outgoingProcess(auto_ptr<Message> message)
|
void DialogUsageManager::outgoingProcess(unique_ptr<Message> message)
|
||||||
{
|
{
|
||||||
Data tid = Data::Empty;
|
Data tid = Data::Empty;
|
||||||
{
|
{
|
||||||
|
|
@ -1073,10 +1073,10 @@ void DialogUsageManager::outgoingProcess(auto_ptr<Message> message)
|
||||||
|
|
||||||
assert(userProfile);
|
assert(userProfile);
|
||||||
|
|
||||||
//!dcm! -- unique SharedPtr to auto_ptr conversion prob. a worthwhile
|
//!dcm! -- unique SharedPtr to unique_ptr conversion prob. a worthwhile
|
||||||
//optimzation here. SharedPtr would have to be changed; would
|
//optimzation here. SharedPtr would have to be changed; would
|
||||||
//throw/assert if not unique.
|
//throw/assert if not unique.
|
||||||
std::auto_ptr<SipMessage> toSend(static_cast<SipMessage*>(event->message()->clone()));
|
std::unique_ptr<SipMessage> toSend(static_cast<SipMessage*>(event->message()->clone()));
|
||||||
|
|
||||||
// .bwc. Protect ourselves from garbage with an isWellFormed() check.
|
// .bwc. Protect ourselves from garbage with an isWellFormed() check.
|
||||||
// (Code in Dialog doesn't check for well-formedness in the
|
// (Code in Dialog doesn't check for well-formedness in the
|
||||||
|
|
@ -1102,7 +1102,7 @@ void DialogUsageManager::outgoingProcess(auto_ptr<Message> message)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DialogUsageManager::sendUsingOutboundIfAppropriate(UserProfile& userProfile, auto_ptr<SipMessage> msg)
|
DialogUsageManager::sendUsingOutboundIfAppropriate(UserProfile& userProfile, unique_ptr<SipMessage> msg)
|
||||||
{
|
{
|
||||||
//a little inefficient, branch parameter might be better
|
//a little inefficient, branch parameter might be better
|
||||||
DialogId id(*msg);
|
DialogId id(*msg);
|
||||||
|
|
@ -1308,7 +1308,7 @@ AppDialogSetHandle DialogUsageManager::findAppDialogSet(const DialogSetId& id)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DialogUsageManager::internalProcess(std::auto_ptr<Message> msg)
|
DialogUsageManager::internalProcess(std::unique_ptr<Message> msg)
|
||||||
{
|
{
|
||||||
#ifdef RESIP_DUM_THREAD_DEBUG
|
#ifdef RESIP_DUM_THREAD_DEBUG
|
||||||
if(!mThreadDebugKey)
|
if(!mThreadDebugKey)
|
||||||
|
|
@ -1499,7 +1499,7 @@ DialogUsageManager::processExternalMessage(ExternalMessageBase* externalMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DialogUsageManager::incomingProcess(std::auto_ptr<Message> msg)
|
DialogUsageManager::incomingProcess(std::unique_ptr<Message> msg)
|
||||||
{
|
{
|
||||||
//call or create feature chain if appropriate
|
//call or create feature chain if appropriate
|
||||||
Data tid = Data::Empty;
|
Data tid = Data::Empty;
|
||||||
|
|
@ -1680,7 +1680,7 @@ DialogUsageManager::process(resip::Lockable* mutex)
|
||||||
#ifdef RESIP_DUM_THREAD_DEBUG
|
#ifdef RESIP_DUM_THREAD_DEBUG
|
||||||
mThreadDebugKey=mHiddenThreadDebugKey;
|
mThreadDebugKey=mHiddenThreadDebugKey;
|
||||||
#endif
|
#endif
|
||||||
internalProcess(std::auto_ptr<Message>(mFifo.getNext()));
|
internalProcess(std::unique_ptr<Message>(mFifo.getNext()));
|
||||||
#ifdef RESIP_DUM_THREAD_DEBUG
|
#ifdef RESIP_DUM_THREAD_DEBUG
|
||||||
// .bwc. Thread checking is disabled if mThreadDebugKey is 0; if the app
|
// .bwc. Thread checking is disabled if mThreadDebugKey is 0; if the app
|
||||||
// is using this mutex-locked process() call, we only enable thread-
|
// is using this mutex-locked process() call, we only enable thread-
|
||||||
|
|
@ -1698,7 +1698,7 @@ DialogUsageManager::process(resip::Lockable* mutex)
|
||||||
bool
|
bool
|
||||||
DialogUsageManager::process(int timeoutMs, resip::Lockable* mutex)
|
DialogUsageManager::process(int timeoutMs, resip::Lockable* mutex)
|
||||||
{
|
{
|
||||||
std::auto_ptr<Message> message;
|
std::unique_ptr<Message> message;
|
||||||
|
|
||||||
if(timeoutMs == -1)
|
if(timeoutMs == -1)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ DumFeature::~DumFeature()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void DumFeature::postCommand(std::auto_ptr<Message> message)
|
void DumFeature::postCommand(std::unique_ptr<Message> message)
|
||||||
{
|
{
|
||||||
mDum.post(new TargetCommand(mTarget, message));
|
mDum.post(new TargetCommand(mTarget, message));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ void DumHelper::setOutgoingEncryptionLevel(SipMessage& message,
|
||||||
{
|
{
|
||||||
SecurityAttributes* attr = new SecurityAttributes();
|
SecurityAttributes* attr = new SecurityAttributes();
|
||||||
attr->setOutgoingEncryptionLevel(convert(level));
|
attr->setOutgoingEncryptionLevel(convert(level));
|
||||||
message.setSecurityAttributes(auto_ptr<SecurityAttributes>(attr));
|
message.setSecurityAttributes(unique_ptr<SecurityAttributes>(attr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DumHelper::setEncryptionPerformed(SipMessage& message)
|
void DumHelper::setEncryptionPerformed(SipMessage& message)
|
||||||
|
|
@ -20,7 +20,7 @@ void DumHelper::setEncryptionPerformed(SipMessage& message)
|
||||||
SecurityAttributes* attr = new SecurityAttributes();
|
SecurityAttributes* attr = new SecurityAttributes();
|
||||||
attr->setOutgoingEncryptionLevel(message.getSecurityAttributes()->getOutgoingEncryptionLevel());
|
attr->setOutgoingEncryptionLevel(message.getSecurityAttributes()->getOutgoingEncryptionLevel());
|
||||||
attr->setEncryptionPerformed(true);
|
attr->setEncryptionPerformed(true);
|
||||||
message.setSecurityAttributes(auto_ptr<SecurityAttributes>(attr));
|
message.setSecurityAttributes(unique_ptr<SecurityAttributes>(attr));
|
||||||
}
|
}
|
||||||
|
|
||||||
SecurityAttributes::OutgoingEncryptionLevel DumHelper::convert(DialogUsageManager::EncryptionLevel level)
|
SecurityAttributes::OutgoingEncryptionLevel DumHelper::convert(DialogUsageManager::EncryptionLevel level)
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ DumThread::thread()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
std::auto_ptr<Message> msg(mDum.mFifo.getNext(1000)); // Only need to wake up to see if we are shutdown
|
std::unique_ptr<Message> msg(mDum.mFifo.getNext(1000)); // Only need to wake up to see if we are shutdown
|
||||||
if (msg.get())
|
if (msg.get())
|
||||||
{
|
{
|
||||||
mDum.internalProcess(msg);
|
mDum.internalProcess(msg);
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
using namespace resip;
|
using namespace resip;
|
||||||
|
|
||||||
HttpProvider* HttpProvider::mInstance = 0;
|
HttpProvider* HttpProvider::mInstance = 0;
|
||||||
std::auto_ptr<HttpProviderFactory> HttpProvider::mFactory;
|
std::unique_ptr<HttpProviderFactory> HttpProvider::mFactory;
|
||||||
Mutex HttpProvider::mMutex;
|
Mutex HttpProvider::mMutex;
|
||||||
|
|
||||||
void
|
void
|
||||||
HttpProvider::setFactory(std::auto_ptr<HttpProviderFactory> fact)
|
HttpProvider::setFactory(std::unique_ptr<HttpProviderFactory> fact)
|
||||||
{
|
{
|
||||||
mFactory = fact;
|
mFactory = fact;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ IdentityHandler::queueForIdentityCheck(SipMessage* sipMsg)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::auto_ptr<SecurityAttributes> sec(new SecurityAttributes);
|
std::unique_ptr<SecurityAttributes> sec(new SecurityAttributes);
|
||||||
sec->setIdentity(sipMsg->header(h_From).uri().getAor());
|
sec->setIdentity(sipMsg->header(h_From).uri().getAor());
|
||||||
sec->setIdentityStrength(SecurityAttributes::From);
|
sec->setIdentityStrength(SecurityAttributes::From);
|
||||||
sipMsg->setSecurityAttributes(sec);
|
sipMsg->setSecurityAttributes(sec);
|
||||||
|
|
@ -114,7 +114,7 @@ IdentityHandler::processIdentityCheckResponse(const HttpGetMessage& msg)
|
||||||
if (it != mRequiresCerts.end())
|
if (it != mRequiresCerts.end())
|
||||||
{
|
{
|
||||||
mDum.getSecurity()->checkAndSetIdentity( *it->second, msg.getBodyData() );
|
mDum.getSecurity()->checkAndSetIdentity( *it->second, msg.getBodyData() );
|
||||||
postCommand(auto_ptr<Message>(it->second));
|
postCommand(unique_ptr<Message>(it->second));
|
||||||
mRequiresCerts.erase(it);
|
mRequiresCerts.erase(it);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -507,9 +507,9 @@ public:
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
InviteSession& mInviteSession;
|
InviteSession& mInviteSession;
|
||||||
std::auto_ptr<const Contents> mOffer;
|
std::unique_ptr<const Contents> mOffer;
|
||||||
DialogUsageManager::EncryptionLevel mLevel;
|
DialogUsageManager::EncryptionLevel mLevel;
|
||||||
std::auto_ptr<const Contents> mAlternative;
|
std::unique_ptr<const Contents> mAlternative;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -544,7 +544,7 @@ public:
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
InviteSession& mInviteSession;
|
InviteSession& mInviteSession;
|
||||||
std::auto_ptr<const Contents> mOffer;
|
std::unique_ptr<const Contents> mOffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -621,7 +621,7 @@ public:
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
InviteSession& mInviteSession;
|
InviteSession& mInviteSession;
|
||||||
std::auto_ptr<const Contents> mAnswer;
|
std::unique_ptr<const Contents> mAnswer;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -813,7 +813,7 @@ public:
|
||||||
private:
|
private:
|
||||||
InviteSession& mInviteSession;
|
InviteSession& mInviteSession;
|
||||||
int mCode;
|
int mCode;
|
||||||
std::auto_ptr<WarningCategory> mWarning;
|
std::unique_ptr<WarningCategory> mWarning;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -840,10 +840,10 @@ InviteSession::targetRefresh(const NameAddr& localUri)
|
||||||
void
|
void
|
||||||
InviteSession::refer(const NameAddr& referTo, bool referSub)
|
InviteSession::refer(const NameAddr& referTo, bool referSub)
|
||||||
{
|
{
|
||||||
refer(referTo,std::auto_ptr<resip::Contents>(0),referSub);
|
refer(referTo,std::unique_ptr<resip::Contents>(0),referSub);
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
InviteSession::refer(const NameAddr& referTo, std::auto_ptr<resip::Contents> contents,bool referSub)
|
InviteSession::refer(const NameAddr& referTo, std::unique_ptr<resip::Contents> contents,bool referSub)
|
||||||
{
|
{
|
||||||
if (isConnected()) // ?slg? likely not safe in any state except Connected - what should behaviour be if state is ReceivedReinvite?
|
if (isConnected()) // ?slg? likely not safe in any state except Connected - what should behaviour be if state is ReceivedReinvite?
|
||||||
{
|
{
|
||||||
|
|
@ -938,11 +938,11 @@ InviteSession::referCommand(const NameAddr& referTo, bool referSub)
|
||||||
void
|
void
|
||||||
InviteSession::refer(const NameAddr& referTo, InviteSessionHandle sessionToReplace, bool referSub)
|
InviteSession::refer(const NameAddr& referTo, InviteSessionHandle sessionToReplace, bool referSub)
|
||||||
{
|
{
|
||||||
refer(referTo,sessionToReplace,std::auto_ptr<resip::Contents>(0),referSub);
|
refer(referTo,sessionToReplace,std::unique_ptr<resip::Contents>(0),referSub);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
InviteSession::refer(const NameAddr& referTo, InviteSessionHandle sessionToReplace, std::auto_ptr<resip::Contents> contents, bool referSub)
|
InviteSession::refer(const NameAddr& referTo, InviteSessionHandle sessionToReplace, std::unique_ptr<resip::Contents> contents, bool referSub)
|
||||||
{
|
{
|
||||||
if (!sessionToReplace.isValid())
|
if (!sessionToReplace.isValid())
|
||||||
{
|
{
|
||||||
|
|
@ -961,11 +961,11 @@ InviteSession::refer(const NameAddr& referTo, InviteSessionHandle sessionToRepla
|
||||||
void
|
void
|
||||||
InviteSession::refer(const NameAddr& referTo, const CallId& replaces, bool referSub)
|
InviteSession::refer(const NameAddr& referTo, const CallId& replaces, bool referSub)
|
||||||
{
|
{
|
||||||
refer(referTo,replaces,std::auto_ptr<resip::Contents>(0),referSub);
|
refer(referTo,replaces,std::unique_ptr<resip::Contents>(0),referSub);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
InviteSession::refer(const NameAddr& referTo, const CallId& replaces, std::auto_ptr<resip::Contents> contents, bool referSub)
|
InviteSession::refer(const NameAddr& referTo, const CallId& replaces, std::unique_ptr<resip::Contents> contents, bool referSub)
|
||||||
{
|
{
|
||||||
if (isConnected()) // ?slg? likely not safe in any state except Connected - what should behaviour be if state is ReceivedReinvite?
|
if (isConnected()) // ?slg? likely not safe in any state except Connected - what should behaviour be if state is ReceivedReinvite?
|
||||||
{
|
{
|
||||||
|
|
@ -1078,7 +1078,7 @@ public:
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
InviteSession& mInviteSession;
|
InviteSession& mInviteSession;
|
||||||
std::auto_ptr<Contents> mContents;
|
std::unique_ptr<Contents> mContents;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1128,7 +1128,7 @@ public:
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
InviteSession& mInviteSession;
|
InviteSession& mInviteSession;
|
||||||
std::auto_ptr<Contents> mContents;
|
std::unique_ptr<Contents> mContents;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1365,7 +1365,7 @@ void
|
||||||
InviteSession::dispatchConnected(const SipMessage& msg)
|
InviteSession::dispatchConnected(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1440,7 +1440,7 @@ void
|
||||||
InviteSession::dispatchSentUpdate(const SipMessage& msg)
|
InviteSession::dispatchSentUpdate(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1523,7 +1523,7 @@ void
|
||||||
InviteSession::dispatchSentReinvite(const SipMessage& msg)
|
InviteSession::dispatchSentReinvite(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1644,7 +1644,7 @@ void
|
||||||
InviteSession::dispatchSentReinviteNoOffer(const SipMessage& msg)
|
InviteSession::dispatchSentReinviteNoOffer(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1739,7 +1739,7 @@ void
|
||||||
InviteSession::dispatchReceivedReinviteSentOffer(const SipMessage& msg)
|
InviteSession::dispatchReceivedReinviteSentOffer(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1839,7 +1839,7 @@ void
|
||||||
InviteSession::dispatchReceivedUpdateOrReinvite(const SipMessage& msg)
|
InviteSession::dispatchReceivedUpdateOrReinvite(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
// InviteSessionHandler* handler = mDum.mInviteSessionHandler; // unused
|
// InviteSessionHandler* handler = mDum.mInviteSessionHandler; // unused
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1966,7 +1966,7 @@ InviteSession::dispatchWaitingToTerminate(const SipMessage& msg)
|
||||||
void
|
void
|
||||||
InviteSession::dispatchWaitingToHangup(const SipMessage& msg)
|
InviteSession::dispatchWaitingToHangup(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -2239,7 +2239,7 @@ public:
|
||||||
private:
|
private:
|
||||||
InviteSession& mInviteSession;
|
InviteSession& mInviteSession;
|
||||||
int mStatusCode;
|
int mStatusCode;
|
||||||
std::auto_ptr<Contents> mContents;
|
std::unique_ptr<Contents> mContents;
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -2744,34 +2744,34 @@ InviteSession::isReliable(const SipMessage& msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static std::auto_ptr<SdpContents> emptySdp;
|
//static std::unique_ptr<SdpContents> emptySdp;
|
||||||
std::auto_ptr<Contents>
|
std::unique_ptr<Contents>
|
||||||
InviteSession::getOfferAnswer(const SipMessage& msg)
|
InviteSession::getOfferAnswer(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
if(mDum.mInviteSessionHandler->isGenericOfferAnswer())
|
if(mDum.mInviteSessionHandler->isGenericOfferAnswer())
|
||||||
{
|
{
|
||||||
if(msg.getContents())
|
if(msg.getContents())
|
||||||
{
|
{
|
||||||
return std::auto_ptr<Contents>(msg.getContents()->clone());
|
return std::unique_ptr<Contents>(msg.getContents()->clone());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return std::auto_ptr<Contents>();
|
return std::unique_ptr<Contents>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return std::auto_ptr<Contents>(Helper::getSdp(msg.getContents()));
|
return std::unique_ptr<Contents>(Helper::getSdp(msg.getContents()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::auto_ptr<Contents>
|
std::unique_ptr<Contents>
|
||||||
InviteSession::makeOfferAnswer(const Contents& offerAnswer)
|
InviteSession::makeOfferAnswer(const Contents& offerAnswer)
|
||||||
{
|
{
|
||||||
return std::auto_ptr<Contents>(static_cast<Contents*>(offerAnswer.clone()));
|
return std::unique_ptr<Contents>(static_cast<Contents*>(offerAnswer.clone()));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto_ptr<Contents>
|
unique_ptr<Contents>
|
||||||
InviteSession::makeOfferAnswer(const Contents& offerAnswer,
|
InviteSession::makeOfferAnswer(const Contents& offerAnswer,
|
||||||
const Contents* alternative)
|
const Contents* alternative)
|
||||||
{
|
{
|
||||||
|
|
@ -2780,11 +2780,11 @@ InviteSession::makeOfferAnswer(const Contents& offerAnswer,
|
||||||
MultipartAlternativeContents* mac = new MultipartAlternativeContents;
|
MultipartAlternativeContents* mac = new MultipartAlternativeContents;
|
||||||
mac->parts().push_back(alternative->clone());
|
mac->parts().push_back(alternative->clone());
|
||||||
mac->parts().push_back(offerAnswer.clone());
|
mac->parts().push_back(offerAnswer.clone());
|
||||||
return auto_ptr<Contents>(mac);
|
return unique_ptr<Contents>(mac);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return auto_ptr<Contents>(offerAnswer.clone());
|
return unique_ptr<Contents>(offerAnswer.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2800,7 +2800,7 @@ InviteSession::setOfferAnswer(SipMessage& msg, const Contents& offerAnswer, cons
|
||||||
MultipartAlternativeContents* mac = new MultipartAlternativeContents;
|
MultipartAlternativeContents* mac = new MultipartAlternativeContents;
|
||||||
mac->parts().push_back(alternative->clone());
|
mac->parts().push_back(alternative->clone());
|
||||||
mac->parts().push_back(offerAnswer.clone());
|
mac->parts().push_back(offerAnswer.clone());
|
||||||
msg.setContents(auto_ptr<Contents>(mac));
|
msg.setContents(unique_ptr<Contents>(mac));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -3115,16 +3115,16 @@ InviteSession::setCurrentLocalOfferAnswer(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
if (DialogUsageManager::Encrypt == getEncryptionLevel(msg) || DialogUsageManager::SignAndEncrypt == getEncryptionLevel(msg))
|
if (DialogUsageManager::Encrypt == getEncryptionLevel(msg) || DialogUsageManager::SignAndEncrypt == getEncryptionLevel(msg))
|
||||||
{
|
{
|
||||||
mCurrentLocalOfferAnswer = auto_ptr<Contents>(static_cast<Contents*>((dynamic_cast<MultipartAlternativeContents*>(mProposedLocalOfferAnswer.get()))->parts().back()->clone()));
|
mCurrentLocalOfferAnswer = unique_ptr<Contents>(static_cast<Contents*>((dynamic_cast<MultipartAlternativeContents*>(mProposedLocalOfferAnswer.get()))->parts().back()->clone()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mCurrentLocalOfferAnswer = auto_ptr<Contents>(static_cast<Contents*>((dynamic_cast<MultipartAlternativeContents*>(mProposedLocalOfferAnswer.get()))->parts().front()->clone()));
|
mCurrentLocalOfferAnswer = unique_ptr<Contents>(static_cast<Contents*>((dynamic_cast<MultipartAlternativeContents*>(mProposedLocalOfferAnswer.get()))->parts().front()->clone()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mCurrentLocalOfferAnswer = auto_ptr<Contents>(static_cast<Contents*>(mProposedLocalOfferAnswer.get()->clone()));
|
mCurrentLocalOfferAnswer = unique_ptr<Contents>(static_cast<Contents*>(mProposedLocalOfferAnswer.get()->clone()));
|
||||||
}
|
}
|
||||||
mProposedLocalOfferAnswer.reset();
|
mProposedLocalOfferAnswer.reset();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ InviteSessionCreator::InviteSessionCreator(DialogUsageManager& dum,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::auto_ptr<Contents> initialOffer;
|
std::unique_ptr<Contents> initialOffer;
|
||||||
if (initial)
|
if (initial)
|
||||||
{
|
{
|
||||||
if (alternative)
|
if (alternative)
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ ServerAuthManager::process(Message* msg)
|
||||||
InfoLog(<< "ServerAuth got ChallengeInfo " << challengeInfo->brief());
|
InfoLog(<< "ServerAuth got ChallengeInfo " << challengeInfo->brief());
|
||||||
MessageMap::iterator it = mMessages.find(challengeInfo->getTransactionId());
|
MessageMap::iterator it = mMessages.find(challengeInfo->getTransactionId());
|
||||||
assert(it != mMessages.end());
|
assert(it != mMessages.end());
|
||||||
std::auto_ptr<SipMessage> sipMsg(it->second);
|
std::unique_ptr<SipMessage> sipMsg(it->second);
|
||||||
mMessages.erase(it);
|
mMessages.erase(it);
|
||||||
|
|
||||||
if(challengeInfo->isFailed())
|
if(challengeInfo->isFailed())
|
||||||
|
|
@ -88,7 +88,7 @@ ServerAuthManager::process(Message* msg)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// challenge is not required, re-instate original message
|
// challenge is not required, re-instate original message
|
||||||
postCommand(auto_ptr<Message>(sipMsg));
|
postCommand(unique_ptr<Message>(sipMsg));
|
||||||
return FeatureDoneAndEventDone;
|
return FeatureDoneAndEventDone;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -103,7 +103,7 @@ ServerAuthManager::process(Message* msg)
|
||||||
Message* result = handleUserAuthInfo(userAuth);
|
Message* result = handleUserAuthInfo(userAuth);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
postCommand(auto_ptr<Message>(result));
|
postCommand(unique_ptr<Message>(result));
|
||||||
return FeatureDoneAndEventDone;
|
return FeatureDoneAndEventDone;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -726,7 +726,7 @@ ServerInviteSession::dispatchStart(const SipMessage& msg)
|
||||||
assert(msg.header(h_CSeq).method() == INVITE);
|
assert(msg.header(h_CSeq).method() == INVITE);
|
||||||
|
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
storePeerCapabilities(msg);
|
storePeerCapabilities(msg);
|
||||||
|
|
||||||
if (mDum.mDialogEventStateManager)
|
if (mDum.mDialogEventStateManager)
|
||||||
|
|
@ -786,7 +786,7 @@ ServerInviteSession::dispatchStart(const SipMessage& msg)
|
||||||
void
|
void
|
||||||
ServerInviteSession::dispatchOfferOrEarly(const SipMessage& msg)
|
ServerInviteSession::dispatchOfferOrEarly(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
case OnCancel:
|
case OnCancel:
|
||||||
|
|
@ -806,7 +806,7 @@ void
|
||||||
ServerInviteSession::dispatchAccepted(const SipMessage& msg)
|
ServerInviteSession::dispatchAccepted(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
InfoLog (<< "dispatchAccepted: " << msg.brief());
|
InfoLog (<< "dispatchAccepted: " << msg.brief());
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
|
|
@ -868,7 +868,7 @@ void
|
||||||
ServerInviteSession::dispatchWaitingToOffer(const SipMessage& msg)
|
ServerInviteSession::dispatchWaitingToOffer(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
InfoLog (<< "dispatchWaitingToOffer: " << msg.brief());
|
InfoLog (<< "dispatchWaitingToOffer: " << msg.brief());
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
|
|
@ -937,7 +937,7 @@ void
|
||||||
ServerInviteSession::dispatchWaitingToRequestOffer(const SipMessage& msg)
|
ServerInviteSession::dispatchWaitingToRequestOffer(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
InfoLog (<< "dispatchWaitingToRequestOffer: " << msg.brief());
|
InfoLog (<< "dispatchWaitingToRequestOffer: " << msg.brief());
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
|
|
@ -1005,7 +1005,7 @@ void
|
||||||
ServerInviteSession::dispatchAcceptedWaitingAnswer(const SipMessage& msg)
|
ServerInviteSession::dispatchAcceptedWaitingAnswer(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
InviteSessionHandler* handler = mDum.mInviteSessionHandler;
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
@ -1131,7 +1131,7 @@ ServerInviteSession::dispatchWaitingToTerminate(const SipMessage& msg)
|
||||||
void
|
void
|
||||||
ServerInviteSession::dispatchWaitingToHangup(const SipMessage& msg)
|
ServerInviteSession::dispatchWaitingToHangup(const SipMessage& msg)
|
||||||
{
|
{
|
||||||
std::auto_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
std::unique_ptr<Contents> offerAnswer = InviteSession::getOfferAnswer(msg);
|
||||||
|
|
||||||
switch (toEvent(msg, offerAnswer.get()))
|
switch (toEvent(msg, offerAnswer.get()))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -85,8 +85,8 @@ ServerRegistration::accept(SipMessage& ok)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::auto_ptr<ContactRecordTransactionLog> log;
|
std::unique_ptr<ContactRecordTransactionLog> log;
|
||||||
std::auto_ptr<ContactPtrList> contacts;
|
std::unique_ptr<ContactPtrList> contacts;
|
||||||
|
|
||||||
mAsyncLocalStore->releaseLog(log,contacts);
|
mAsyncLocalStore->releaseLog(log,contacts);
|
||||||
|
|
||||||
|
|
@ -111,8 +111,8 @@ ServerRegistration::accept(SipMessage& ok)
|
||||||
//receive a final contact list before sending the 200.
|
//receive a final contact list before sending the 200.
|
||||||
mAsyncState = asyncStateAcceptedWaitingForFinalContactList;
|
mAsyncState = asyncStateAcceptedWaitingForFinalContactList;
|
||||||
|
|
||||||
std::auto_ptr<ContactRecordTransactionLog> log;
|
std::unique_ptr<ContactRecordTransactionLog> log;
|
||||||
std::auto_ptr<ContactPtrList> modifiedContacts;
|
std::unique_ptr<ContactPtrList> modifiedContacts;
|
||||||
|
|
||||||
mAsyncLocalStore->releaseLog(log,modifiedContacts);
|
mAsyncLocalStore->releaseLog(log,modifiedContacts);
|
||||||
|
|
||||||
|
|
@ -612,7 +612,7 @@ ServerRegistration::asyncProcessFinalOkMsg(SipMessage &msg, ContactPtrList &cont
|
||||||
ContactPtrList::iterator it(contacts.begin());
|
ContactPtrList::iterator it(contacts.begin());
|
||||||
ContactPtrList::iterator itEnd(contacts.end());
|
ContactPtrList::iterator itEnd(contacts.end());
|
||||||
|
|
||||||
std::auto_ptr<ContactPtrList> expired;
|
std::unique_ptr<ContactPtrList> expired;
|
||||||
|
|
||||||
UInt64 now=Timer::getTimeSecs();
|
UInt64 now=Timer::getTimeSecs();
|
||||||
|
|
||||||
|
|
@ -630,7 +630,7 @@ ServerRegistration::asyncProcessFinalOkMsg(SipMessage &msg, ContactPtrList &cont
|
||||||
{
|
{
|
||||||
if (!expired.get())
|
if (!expired.get())
|
||||||
{
|
{
|
||||||
expired = std::auto_ptr<ContactPtrList>(new ContactPtrList());
|
expired = std::unique_ptr<ContactPtrList>(new ContactPtrList());
|
||||||
}
|
}
|
||||||
expired->push_back(rec);
|
expired->push_back(rec);
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -677,7 +677,7 @@ ServerRegistration::processFinalOkMsg(SipMessage &msg, ContactList &contacts)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ServerRegistration::asyncProvideContacts(std::auto_ptr<resip::ContactPtrList> contacts)
|
ServerRegistration::asyncProvideContacts(std::unique_ptr<resip::ContactPtrList> contacts)
|
||||||
{
|
{
|
||||||
switch (mAsyncState)
|
switch (mAsyncState)
|
||||||
{
|
{
|
||||||
|
|
@ -711,7 +711,7 @@ ServerRegistration::asyncProvideContacts(std::auto_ptr<resip::ContactPtrList> co
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ServerRegistration::asyncProcessFinalContacts(std::auto_ptr<resip::ContactPtrList> contacts)
|
ServerRegistration::asyncProcessFinalContacts(std::unique_ptr<resip::ContactPtrList> contacts)
|
||||||
{
|
{
|
||||||
if (contacts.get())
|
if (contacts.get())
|
||||||
{
|
{
|
||||||
|
|
@ -732,10 +732,10 @@ ServerRegistration::asyncProcessFinalContacts(std::auto_ptr<resip::ContactPtrLis
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ServerRegistration::AsyncLocalStore::create(std::auto_ptr<ContactPtrList> originalContacts)
|
ServerRegistration::AsyncLocalStore::create(std::unique_ptr<ContactPtrList> originalContacts)
|
||||||
{
|
{
|
||||||
mModifiedContacts = originalContacts;
|
mModifiedContacts = originalContacts;
|
||||||
mLog = std::auto_ptr<ContactRecordTransactionLog>(new ContactRecordTransactionLog());
|
mLog = std::unique_ptr<ContactRecordTransactionLog>(new ContactRecordTransactionLog());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ using namespace std;
|
||||||
|
|
||||||
|
|
||||||
TargetCommand::TargetCommand(Target& target,
|
TargetCommand::TargetCommand(Target& target,
|
||||||
auto_ptr<Message> message)
|
unique_ptr<Message> message)
|
||||||
: mTarget(target),
|
: mTarget(target),
|
||||||
mMessage(message)
|
mMessage(message)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ EncryptionManager::~EncryptionManager()
|
||||||
mRequests.clear();
|
mRequests.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EncryptionManager::setRemoteCertStore(std::auto_ptr<RemoteCertStore> store)
|
void EncryptionManager::setRemoteCertStore(std::unique_ptr<RemoteCertStore> store)
|
||||||
{
|
{
|
||||||
ErrLog(<< "Async currently is not supported");
|
ErrLog(<< "Async currently is not supported");
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
@ -149,7 +149,7 @@ DumFeature::ProcessingResult EncryptionManager::process(Message* msg)
|
||||||
{
|
{
|
||||||
if (setContents)
|
if (setContents)
|
||||||
{
|
{
|
||||||
event->message()->setContents(auto_ptr<Contents>(contents));
|
event->message()->setContents(unique_ptr<Contents>(contents));
|
||||||
DumHelper::setEncryptionPerformed(*event->message());
|
DumHelper::setEncryptionPerformed(*event->message());
|
||||||
}
|
}
|
||||||
return DumFeature::FeatureDone;
|
return DumFeature::FeatureDone;
|
||||||
|
|
@ -438,11 +438,11 @@ EncryptionManager::Result EncryptionManager::Sign::received(bool success,
|
||||||
{
|
{
|
||||||
InfoLog(<< "Signing message" << endl);
|
InfoLog(<< "Signing message" << endl);
|
||||||
MultipartSignedContents* msc = mDum.getSecurity()->sign(aor, mMsgToEncrypt->getContents());
|
MultipartSignedContents* msc = mDum.getSecurity()->sign(aor, mMsgToEncrypt->getContents());
|
||||||
mMsgToEncrypt->setContents(auto_ptr<Contents>(msc));
|
mMsgToEncrypt->setContents(unique_ptr<Contents>(msc));
|
||||||
DumHelper::setEncryptionPerformed(*mMsgToEncrypt);
|
DumHelper::setEncryptionPerformed(*mMsgToEncrypt);
|
||||||
OutgoingEvent* event = new OutgoingEvent(mMsgToEncrypt);
|
OutgoingEvent* event = new OutgoingEvent(mMsgToEncrypt);
|
||||||
//mTaken = false;
|
//mTaken = false;
|
||||||
mDum.post(new TargetCommand(mDum.dumOutgoingTarget(), auto_ptr<Message>(event)));
|
mDum.post(new TargetCommand(mDum.dumOutgoingTarget(), unique_ptr<Message>(event)));
|
||||||
result = Complete;
|
result = Complete;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -533,11 +533,11 @@ EncryptionManager::Result EncryptionManager::Encrypt::received(bool success,
|
||||||
--mPendingRequests;
|
--mPendingRequests;
|
||||||
InfoLog(<< "Encrypting message" << endl);
|
InfoLog(<< "Encrypting message" << endl);
|
||||||
Pkcs7Contents* encrypted = mDum.getSecurity()->encrypt(mMsgToEncrypt->getContents(), aor);
|
Pkcs7Contents* encrypted = mDum.getSecurity()->encrypt(mMsgToEncrypt->getContents(), aor);
|
||||||
mMsgToEncrypt->setContents(auto_ptr<Contents>(encrypted));
|
mMsgToEncrypt->setContents(unique_ptr<Contents>(encrypted));
|
||||||
DumHelper::setEncryptionPerformed(*mMsgToEncrypt);
|
DumHelper::setEncryptionPerformed(*mMsgToEncrypt);
|
||||||
OutgoingEvent* event = new OutgoingEvent(mMsgToEncrypt);
|
OutgoingEvent* event = new OutgoingEvent(mMsgToEncrypt);
|
||||||
//mTaken = false;
|
//mTaken = false;
|
||||||
mDum.post(new TargetCommand(mDum.dumOutgoingTarget(), auto_ptr<Message>(event)));
|
mDum.post(new TargetCommand(mDum.dumOutgoingTarget(), unique_ptr<Message>(event)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -641,11 +641,11 @@ EncryptionManager::Result EncryptionManager::SignAndEncrypt::received(bool succe
|
||||||
{
|
{
|
||||||
InfoLog(<< "Encrypting and signing message" << endl);
|
InfoLog(<< "Encrypting and signing message" << endl);
|
||||||
Contents* contents = doWork();
|
Contents* contents = doWork();
|
||||||
mMsgToEncrypt->setContents(auto_ptr<Contents>(contents));
|
mMsgToEncrypt->setContents(unique_ptr<Contents>(contents));
|
||||||
DumHelper::setEncryptionPerformed(*mMsgToEncrypt);
|
DumHelper::setEncryptionPerformed(*mMsgToEncrypt);
|
||||||
OutgoingEvent* event = new OutgoingEvent(mMsgToEncrypt);
|
OutgoingEvent* event = new OutgoingEvent(mMsgToEncrypt);
|
||||||
//mTaken = false;
|
//mTaken = false;
|
||||||
mDum.post(new TargetCommand(mDum.dumOutgoingTarget(), auto_ptr<Message>(event)));
|
mDum.post(new TargetCommand(mDum.dumOutgoingTarget(), unique_ptr<Message>(event)));
|
||||||
result = Complete;
|
result = Complete;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -925,7 +925,7 @@ bool EncryptionManager::Decrypt::isEncryptedRecurse(Contents** contents)
|
||||||
|
|
||||||
if (*contents == mMsgToDecrypt->getContents())
|
if (*contents == mMsgToDecrypt->getContents())
|
||||||
{
|
{
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(createInvalidContents(mps)));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(createInvalidContents(mps)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -950,7 +950,7 @@ bool EncryptionManager::Decrypt::isEncryptedRecurse(Contents** contents)
|
||||||
ErrLog(<< e.name() << endl << e.getMessage());
|
ErrLog(<< e.name() << endl << e.getMessage());
|
||||||
if (*contents == mMsgToDecrypt->getContents())
|
if (*contents == mMsgToDecrypt->getContents())
|
||||||
{
|
{
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(createInvalidContents(alt)));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(createInvalidContents(alt)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1022,7 +1022,7 @@ bool EncryptionManager::Decrypt::isSignedRecurse(Contents** contents,
|
||||||
{
|
{
|
||||||
if (*contents == mMsgToDecrypt->getContents())
|
if (*contents == mMsgToDecrypt->getContents())
|
||||||
{
|
{
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(decrypted));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(decrypted));
|
||||||
*contents = mMsgToDecrypt->getContents();
|
*contents = mMsgToDecrypt->getContents();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -1040,7 +1040,7 @@ bool EncryptionManager::Decrypt::isSignedRecurse(Contents** contents,
|
||||||
|
|
||||||
if (*contents == mMsgToDecrypt->getContents())
|
if (*contents == mMsgToDecrypt->getContents())
|
||||||
{
|
{
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(createInvalidContents(decrypted)));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(createInvalidContents(decrypted)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1076,7 +1076,7 @@ bool EncryptionManager::Decrypt::isSignedRecurse(Contents** contents,
|
||||||
|
|
||||||
if (*contents == mMsgToDecrypt->getContents())
|
if (*contents == mMsgToDecrypt->getContents())
|
||||||
{
|
{
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(createInvalidContents(alt)));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(createInvalidContents(alt)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1127,8 +1127,8 @@ Helper::ContentsSecAttrs EncryptionManager::Decrypt::getContents(SipMessage* mes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::auto_ptr<Contents> c(contents);
|
std::unique_ptr<Contents> c(contents);
|
||||||
std::auto_ptr<SecurityAttributes> a(attr);
|
std::unique_ptr<SecurityAttributes> a(attr);
|
||||||
return Helper::ContentsSecAttrs(c, a);
|
return Helper::ContentsSecAttrs(c, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1167,7 +1167,7 @@ Contents* EncryptionManager::Decrypt::getContentsRecurse(Contents** tree,
|
||||||
{
|
{
|
||||||
if (*tree == mMsgToDecrypt->getContents())
|
if (*tree == mMsgToDecrypt->getContents())
|
||||||
{
|
{
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(contents));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(contents));
|
||||||
*tree = mMsgToDecrypt->getContents();
|
*tree = mMsgToDecrypt->getContents();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -1189,7 +1189,7 @@ Contents* EncryptionManager::Decrypt::getContentsRecurse(Contents** tree,
|
||||||
|
|
||||||
if (*tree == mMsgToDecrypt->getContents())
|
if (*tree == mMsgToDecrypt->getContents())
|
||||||
{
|
{
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(createInvalidContents(contents)));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(createInvalidContents(contents)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1233,7 +1233,7 @@ Contents* EncryptionManager::Decrypt::getContentsRecurse(Contents** tree,
|
||||||
|
|
||||||
if (*tree == mMsgToDecrypt->getContents())
|
if (*tree == mMsgToDecrypt->getContents())
|
||||||
{
|
{
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(createInvalidContents(alt)));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(createInvalidContents(alt)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1272,7 +1272,7 @@ Contents* EncryptionManager::Decrypt::getContentsRecurse(Contents** tree,
|
||||||
|
|
||||||
if (*tree == mMsgToDecrypt->getContents())
|
if (*tree == mMsgToDecrypt->getContents())
|
||||||
{
|
{
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(createInvalidContents(mult)));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(createInvalidContents(mult)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1300,7 +1300,7 @@ Contents* EncryptionManager::Decrypt::getContentsRecurse(Contents** tree,
|
||||||
|
|
||||||
if (*tree == mMsgToDecrypt->getContents())
|
if (*tree == mMsgToDecrypt->getContents())
|
||||||
{
|
{
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(createInvalidContents(*tree)));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(createInvalidContents(*tree)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1341,7 +1341,7 @@ EncryptionManager::Decrypt::handleInvalidContents()
|
||||||
{
|
{
|
||||||
DebugLog(<< "No valid contents in the request" << endl);
|
DebugLog(<< "No valid contents in the request" << endl);
|
||||||
InvalidContents* invalid = new InvalidContents(mOriginalMsgContents, mOriginalMsgContentsType);
|
InvalidContents* invalid = new InvalidContents(mOriginalMsgContents, mOriginalMsgContentsType);
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(invalid));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(invalid));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1355,7 +1355,7 @@ EncryptionManager::Decrypt::handleInvalidContents()
|
||||||
{
|
{
|
||||||
DebugLog(<< "No valid contents in the response" << endl);
|
DebugLog(<< "No valid contents in the response" << endl);
|
||||||
InvalidContents* invalid = new InvalidContents(mOriginalMsgContents, mOriginalMsgContentsType);
|
InvalidContents* invalid = new InvalidContents(mOriginalMsgContents, mOriginalMsgContentsType);
|
||||||
mMsgToDecrypt->setContents(auto_ptr<Contents>(invalid));
|
mMsgToDecrypt->setContents(unique_ptr<Contents>(invalid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,7 @@ ConnectionBase::preparseNewBytes(int bytesRead)
|
||||||
|
|
||||||
// .bwc. This handles all appropriate checking for whether
|
// .bwc. This handles all appropriate checking for whether
|
||||||
// this is a response or an ACK.
|
// this is a response or an ACK.
|
||||||
std::auto_ptr<SendData> tryLater(transport()->make503(*mMessage, expectedWait/1000));
|
std::unique_ptr<SendData> tryLater(transport()->make503(*mMessage, expectedWait/1000));
|
||||||
if(tryLater.get())
|
if(tryLater.get())
|
||||||
{
|
{
|
||||||
transport()->send(tryLater);
|
transport()->send(tryLater);
|
||||||
|
|
@ -478,7 +478,7 @@ ConnectionBase::preparseNewBytes(int bytesRead)
|
||||||
|
|
||||||
// .bwc. This handles all appropriate checking for whether
|
// .bwc. This handles all appropriate checking for whether
|
||||||
// this is a response or an ACK.
|
// this is a response or an ACK.
|
||||||
std::auto_ptr<SendData> tryLater = transport()->make503(*mMessage, expectedWait/1000);
|
std::unique_ptr<SendData> tryLater = transport()->make503(*mMessage, expectedWait/1000);
|
||||||
if(tryLater.get())
|
if(tryLater.get())
|
||||||
{
|
{
|
||||||
transport()->send(tryLater);
|
transport()->send(tryLater);
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ unsigned int Helper::hex2integer(const char* _s)
|
||||||
SipMessage*
|
SipMessage*
|
||||||
Helper::makeRequest(const NameAddr& target, const NameAddr& from, const NameAddr& contact, MethodTypes method)
|
Helper::makeRequest(const NameAddr& target, const NameAddr& from, const NameAddr& contact, MethodTypes method)
|
||||||
{
|
{
|
||||||
std::auto_ptr<SipMessage> request(new SipMessage);
|
std::unique_ptr<SipMessage> request(new SipMessage);
|
||||||
RequestLine rLine(method);
|
RequestLine rLine(method);
|
||||||
rLine.uri() = target.uri();
|
rLine.uri() = target.uri();
|
||||||
request->header(h_To) = target;
|
request->header(h_To) = target;
|
||||||
|
|
@ -153,7 +153,7 @@ Helper::makeRegister(const NameAddr& to, const NameAddr& from)
|
||||||
SipMessage*
|
SipMessage*
|
||||||
Helper::makeRegister(const NameAddr& to, const NameAddr& from, const NameAddr& contact)
|
Helper::makeRegister(const NameAddr& to, const NameAddr& from, const NameAddr& contact)
|
||||||
{
|
{
|
||||||
std::auto_ptr<SipMessage> request(new SipMessage);
|
std::unique_ptr<SipMessage> request(new SipMessage);
|
||||||
RequestLine rLine(REGISTER);
|
RequestLine rLine(REGISTER);
|
||||||
|
|
||||||
rLine.uri().scheme() = to.uri().scheme();
|
rLine.uri().scheme() = to.uri().scheme();
|
||||||
|
|
@ -192,7 +192,7 @@ Helper::makeRegister(const NameAddr& to,const Data& transport)
|
||||||
SipMessage*
|
SipMessage*
|
||||||
Helper::makeRegister(const NameAddr& to, const Data& transport, const NameAddr& contact)
|
Helper::makeRegister(const NameAddr& to, const Data& transport, const NameAddr& contact)
|
||||||
{
|
{
|
||||||
std::auto_ptr<SipMessage> request(new SipMessage);
|
std::unique_ptr<SipMessage> request(new SipMessage);
|
||||||
RequestLine rLine(REGISTER);
|
RequestLine rLine(REGISTER);
|
||||||
|
|
||||||
rLine.uri().scheme() = to.uri().scheme();
|
rLine.uri().scheme() = to.uri().scheme();
|
||||||
|
|
@ -231,7 +231,7 @@ Helper::makePublish(const NameAddr& target, const NameAddr& from)
|
||||||
SipMessage*
|
SipMessage*
|
||||||
Helper::makePublish(const NameAddr& target, const NameAddr& from, const NameAddr& contact)
|
Helper::makePublish(const NameAddr& target, const NameAddr& from, const NameAddr& contact)
|
||||||
{
|
{
|
||||||
std::auto_ptr<SipMessage> request(new SipMessage);
|
std::unique_ptr<SipMessage> request(new SipMessage);
|
||||||
RequestLine rLine(PUBLISH);
|
RequestLine rLine(PUBLISH);
|
||||||
rLine.uri() = target.uri();
|
rLine.uri() = target.uri();
|
||||||
|
|
||||||
|
|
@ -261,7 +261,7 @@ Helper::makeMessage(const NameAddr& target, const NameAddr& from)
|
||||||
SipMessage*
|
SipMessage*
|
||||||
Helper::makeMessage(const NameAddr& target, const NameAddr& from, const NameAddr& contact)
|
Helper::makeMessage(const NameAddr& target, const NameAddr& from, const NameAddr& contact)
|
||||||
{
|
{
|
||||||
std::auto_ptr<SipMessage> request(new SipMessage);
|
std::unique_ptr<SipMessage> request(new SipMessage);
|
||||||
RequestLine rLine(MESSAGE);
|
RequestLine rLine(MESSAGE);
|
||||||
rLine.uri() = target.uri();
|
rLine.uri() = target.uri();
|
||||||
|
|
||||||
|
|
@ -292,7 +292,7 @@ Helper::makeSubscribe(const NameAddr& target, const NameAddr& from)
|
||||||
SipMessage*
|
SipMessage*
|
||||||
Helper::makeSubscribe(const NameAddr& target, const NameAddr& from, const NameAddr& contact)
|
Helper::makeSubscribe(const NameAddr& target, const NameAddr& from, const NameAddr& contact)
|
||||||
{
|
{
|
||||||
std::auto_ptr<SipMessage> request(new SipMessage);
|
std::unique_ptr<SipMessage> request(new SipMessage);
|
||||||
RequestLine rLine(SUBSCRIBE);
|
RequestLine rLine(SUBSCRIBE);
|
||||||
rLine.uri() = target.uri();
|
rLine.uri() = target.uri();
|
||||||
|
|
||||||
|
|
@ -453,7 +453,7 @@ Helper::makeResponse(const SipMessage& request,
|
||||||
{
|
{
|
||||||
// .bwc. Exception safety. Catch/rethrow is dicey because we can't rethrow
|
// .bwc. Exception safety. Catch/rethrow is dicey because we can't rethrow
|
||||||
// resip::BaseException, since it is abstract.
|
// resip::BaseException, since it is abstract.
|
||||||
std::auto_ptr<SipMessage> response(new SipMessage);
|
std::unique_ptr<SipMessage> response(new SipMessage);
|
||||||
|
|
||||||
makeResponse(*response, request, responseCode, reason, hostname, warning);
|
makeResponse(*response, request, responseCode, reason, hostname, warning);
|
||||||
|
|
||||||
|
|
@ -475,7 +475,7 @@ Helper::makeResponse(const SipMessage& request,
|
||||||
{
|
{
|
||||||
// .bwc. Exception safety. Catch/rethrow is dicey because we can't rethrow
|
// .bwc. Exception safety. Catch/rethrow is dicey because we can't rethrow
|
||||||
// resip::BaseException, since it is abstract.
|
// resip::BaseException, since it is abstract.
|
||||||
std::auto_ptr<SipMessage> response(new SipMessage);
|
std::unique_ptr<SipMessage> response(new SipMessage);
|
||||||
|
|
||||||
makeResponse(*response, request, responseCode, reason, hostname, warning);
|
makeResponse(*response, request, responseCode, reason, hostname, warning);
|
||||||
return response.release();
|
return response.release();
|
||||||
|
|
@ -574,7 +574,7 @@ Helper::makeCancel(const SipMessage& request)
|
||||||
{
|
{
|
||||||
assert(request.isRequest());
|
assert(request.isRequest());
|
||||||
assert(request.header(h_RequestLine).getMethod() == INVITE);
|
assert(request.header(h_RequestLine).getMethod() == INVITE);
|
||||||
std::auto_ptr<SipMessage> cancel(new SipMessage);
|
std::unique_ptr<SipMessage> cancel(new SipMessage);
|
||||||
|
|
||||||
RequestLine rLine(CANCEL, request.header(h_RequestLine).getSipVersion());
|
RequestLine rLine(CANCEL, request.header(h_RequestLine).getSipVersion());
|
||||||
rLine.uri() = request.header(h_RequestLine).uri();
|
rLine.uri() = request.header(h_RequestLine).uri();
|
||||||
|
|
@ -611,7 +611,7 @@ Helper::makeFailureAck(const SipMessage& request, const SipMessage& response)
|
||||||
assert (request.header(h_Vias).size() >= 1);
|
assert (request.header(h_Vias).size() >= 1);
|
||||||
assert (request.header(h_RequestLine).getMethod() == INVITE);
|
assert (request.header(h_RequestLine).getMethod() == INVITE);
|
||||||
|
|
||||||
std::auto_ptr<SipMessage> ack(new SipMessage);
|
std::unique_ptr<SipMessage> ack(new SipMessage);
|
||||||
|
|
||||||
RequestLine rLine(ACK, request.header(h_RequestLine).getSipVersion());
|
RequestLine rLine(ACK, request.header(h_RequestLine).getSipVersion());
|
||||||
rLine.uri() = request.header(h_RequestLine).uri();
|
rLine.uri() = request.header(h_RequestLine).uri();
|
||||||
|
|
@ -1800,7 +1800,7 @@ Helper::gruuUserPart(const Data& instanceId,
|
||||||
sep.size() + 1
|
sep.size() + 1
|
||||||
+ aor.size() ) % 8))
|
+ aor.size() ) % 8))
|
||||||
% 8));
|
% 8));
|
||||||
auto_ptr <unsigned char> out(new unsigned char[token.size()]);
|
unique_ptr <unsigned char> out(new unsigned char[token.size()]);
|
||||||
BF_cbc_encrypt((const unsigned char*)token.data(),
|
BF_cbc_encrypt((const unsigned char*)token.data(),
|
||||||
out.get(),
|
out.get(),
|
||||||
(long)token.size(),
|
(long)token.size(),
|
||||||
|
|
@ -1840,7 +1840,7 @@ Helper::fromGruuUserPart(const Data& gruuUserPart,
|
||||||
|
|
||||||
const Data decoded = gruu.base64decode();
|
const Data decoded = gruu.base64decode();
|
||||||
|
|
||||||
auto_ptr <unsigned char> out(new unsigned char[gruuUserPart.size()+1]);
|
unique_ptr <unsigned char> out(new unsigned char[gruuUserPart.size()+1]);
|
||||||
BF_cbc_encrypt((const unsigned char*)decoded.data(),
|
BF_cbc_encrypt((const unsigned char*)decoded.data(),
|
||||||
out.get(),
|
out.get(),
|
||||||
(long)decoded.size(),
|
(long)decoded.size(),
|
||||||
|
|
@ -1864,8 +1864,8 @@ Helper::ContentsSecAttrs::ContentsSecAttrs()
|
||||||
mAttributes(0)
|
mAttributes(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Helper::ContentsSecAttrs::ContentsSecAttrs(std::auto_ptr<Contents> contents,
|
Helper::ContentsSecAttrs::ContentsSecAttrs(std::unique_ptr<Contents> contents,
|
||||||
std::auto_ptr<SecurityAttributes> attributes)
|
std::unique_ptr<SecurityAttributes> attributes)
|
||||||
: mContents(contents),
|
: mContents(contents),
|
||||||
mAttributes(attributes)
|
mAttributes(attributes)
|
||||||
{}
|
{}
|
||||||
|
|
@ -1990,8 +1990,8 @@ Helper::extractFromPkcs7(const SipMessage& message,
|
||||||
b = extractFromPkcs7Recurse(b, toAor, fromAor, attr, security);
|
b = extractFromPkcs7Recurse(b, toAor, fromAor, attr, security);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::auto_ptr<Contents> c(b);
|
std::unique_ptr<Contents> c(b);
|
||||||
std::auto_ptr<SecurityAttributes> a(attr);
|
std::unique_ptr<SecurityAttributes> a(attr);
|
||||||
return ContentsSecAttrs(c, a);
|
return ContentsSecAttrs(c, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2161,8 +2161,8 @@ SdpContents* getSdpRecurse(Contents* tree)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::auto_ptr<SdpContents> emptysdp;
|
static std::unique_ptr<SdpContents> emptysdp;
|
||||||
auto_ptr<SdpContents> Helper::getSdp(Contents* tree)
|
unique_ptr<SdpContents> Helper::getSdp(Contents* tree)
|
||||||
{
|
{
|
||||||
if (tree)
|
if (tree)
|
||||||
{
|
{
|
||||||
|
|
@ -2171,7 +2171,7 @@ auto_ptr<SdpContents> Helper::getSdp(Contents* tree)
|
||||||
if (sdp)
|
if (sdp)
|
||||||
{
|
{
|
||||||
DebugLog(<< "Got sdp" << endl);
|
DebugLog(<< "Got sdp" << endl);
|
||||||
return auto_ptr<SdpContents>(static_cast<SdpContents*>(sdp->clone()));
|
return unique_ptr<SdpContents>(static_cast<SdpContents*>(sdp->clone()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ InternalTransport::hasDataToSend() const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
InternalTransport::send(std::auto_ptr<SendData> data)
|
InternalTransport::send(std::unique_ptr<SendData> data)
|
||||||
{
|
{
|
||||||
mTxFifo.add(data.release());
|
mTxFifo.add(data.release());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1837,7 +1837,7 @@ Codec::CodecMap& Codec::getStaticCodecs()
|
||||||
//
|
//
|
||||||
// Build map of static codecs as defined in RFC 3551
|
// Build map of static codecs as defined in RFC 3551
|
||||||
//
|
//
|
||||||
sStaticCodecs = std::auto_ptr<CodecMap>(new CodecMap);
|
sStaticCodecs = std::unique_ptr<CodecMap>(new CodecMap);
|
||||||
|
|
||||||
// Audio codecs
|
// Audio codecs
|
||||||
sStaticCodecs->insert(make_pair(0,Codec("PCMU",0,8000)));
|
sStaticCodecs->insert(make_pair(0,Codec("PCMU",0,8000)));
|
||||||
|
|
@ -1907,7 +1907,7 @@ const Codec Codec::FrfDialedDigit("frf-dialed-event",102, 8000);
|
||||||
const Codec Codec::CN("CN", 13, 8000);
|
const Codec Codec::CN("CN", 13, 8000);
|
||||||
|
|
||||||
bool Codec::sStaticCodecsCreated = false;
|
bool Codec::sStaticCodecsCreated = false;
|
||||||
std::auto_ptr<Codec::CodecMap> Codec::sStaticCodecs;
|
std::unique_ptr<Codec::CodecMap> Codec::sStaticCodecs;
|
||||||
|
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* The Vovida Software License, Version 1.0
|
* The Vovida Software License, Version 1.0
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ class SdpContents : public Contents
|
||||||
Data mParameters; // Format parameters
|
Data mParameters; // Format parameters
|
||||||
Data mEncodingParameters;
|
Data mEncodingParameters;
|
||||||
|
|
||||||
static std::auto_ptr<CodecMap> sStaticCodecs;
|
static std::unique_ptr<CodecMap> sStaticCodecs;
|
||||||
static bool sStaticCodecsCreated;
|
static bool sStaticCodecsCreated;
|
||||||
friend EncodeStream& operator<<(EncodeStream&, const Codec&);
|
friend EncodeStream& operator<<(EncodeStream&, const Codec&);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -970,7 +970,7 @@ SipMessage::setRawBody(const HeaderFieldValue& body)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SipMessage::setContents(auto_ptr<Contents> contents)
|
SipMessage::setContents(unique_ptr<Contents> contents)
|
||||||
{
|
{
|
||||||
Contents* contentsP = contents.release();
|
Contents* contentsP = contents.release();
|
||||||
|
|
||||||
|
|
@ -1020,11 +1020,11 @@ SipMessage::setContents(const Contents* contents)
|
||||||
{
|
{
|
||||||
if (contents)
|
if (contents)
|
||||||
{
|
{
|
||||||
setContents(auto_ptr<Contents>(contents->clone()));
|
setContents(unique_ptr<Contents>(contents->clone()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setContents(auto_ptr<Contents>(0));
|
setContents(unique_ptr<Contents>(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1082,13 +1082,13 @@ SipMessage::getContents() const
|
||||||
return mContents;
|
return mContents;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto_ptr<Contents>
|
unique_ptr<Contents>
|
||||||
SipMessage::releaseContents()
|
SipMessage::releaseContents()
|
||||||
{
|
{
|
||||||
Contents* c=getContents();
|
Contents* c=getContents();
|
||||||
// .bwc. auto_ptr owns the Contents. No other references allowed!
|
// .bwc. unique_ptr owns the Contents. No other references allowed!
|
||||||
auto_ptr<Contents> ret(c ? c->clone() : 0);
|
unique_ptr<Contents> ret(c ? c->clone() : 0);
|
||||||
setContents(std::auto_ptr<Contents>(0));
|
setContents(std::unique_ptr<Contents>(0));
|
||||||
|
|
||||||
if (ret.get() != 0 && !ret->isWellFormed())
|
if (ret.get() != 0 && !ret->isWellFormed())
|
||||||
{
|
{
|
||||||
|
|
@ -1692,7 +1692,7 @@ SipMessage::mergeUri(const Uri& source)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SipMessage::setSecurityAttributes(auto_ptr<SecurityAttributes> sec)
|
SipMessage::setSecurityAttributes(unique_ptr<SecurityAttributes> sec)
|
||||||
{
|
{
|
||||||
mSecurityAttributes = sec;
|
mSecurityAttributes = sec;
|
||||||
}
|
}
|
||||||
|
|
@ -1746,7 +1746,7 @@ SipMessage::copyOutboundDecoratorsToStackCancel(SipMessage& cancel)
|
||||||
{
|
{
|
||||||
if((*i)->copyToStackCancels())
|
if((*i)->copyToStackCancels())
|
||||||
{
|
{
|
||||||
cancel.addOutboundDecorator(*(new auto_ptr<MessageDecorator>((*i)->clone())));
|
cancel.addOutboundDecorator(*(new unique_ptr<MessageDecorator>((*i)->clone())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1760,7 +1760,7 @@ SipMessage::copyOutboundDecoratorsToStackFailureAck(SipMessage& ack)
|
||||||
{
|
{
|
||||||
if((*i)->copyToStackFailureAcks())
|
if((*i)->copyToStackFailureAcks())
|
||||||
{
|
{
|
||||||
ack.addOutboundDecorator(*(new auto_ptr<MessageDecorator>((*i)->clone())));
|
ack.addOutboundDecorator(*(new unique_ptr<MessageDecorator>((*i)->clone())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -461,14 +461,14 @@ class SipMessage : public TransactionMessage
|
||||||
**/
|
**/
|
||||||
Contents* getContents() const;
|
Contents* getContents() const;
|
||||||
/// Removes the contents from the message
|
/// Removes the contents from the message
|
||||||
std::auto_ptr<Contents> releaseContents();
|
std::unique_ptr<Contents> releaseContents();
|
||||||
|
|
||||||
/// @brief Set the contents of the message
|
/// @brief Set the contents of the message
|
||||||
/// @param contents to store in the message
|
/// @param contents to store in the message
|
||||||
void setContents(const Contents* contents);
|
void setContents(const Contents* contents);
|
||||||
/// @brief Set the contents of the message
|
/// @brief Set the contents of the message
|
||||||
/// @param contents to store in the message
|
/// @param contents to store in the message
|
||||||
void setContents(std::auto_ptr<Contents> contents);
|
void setContents(std::unique_ptr<Contents> contents);
|
||||||
|
|
||||||
/// @internal transport interface
|
/// @internal transport interface
|
||||||
void setStartLine(const char* start, int len);
|
void setStartLine(const char* start, int len);
|
||||||
|
|
@ -516,12 +516,12 @@ class SipMessage : public TransactionMessage
|
||||||
|
|
||||||
SipMessage& mergeUri(const Uri& source);
|
SipMessage& mergeUri(const Uri& source);
|
||||||
|
|
||||||
void setSecurityAttributes(std::auto_ptr<SecurityAttributes>);
|
void setSecurityAttributes(std::unique_ptr<SecurityAttributes>);
|
||||||
const SecurityAttributes* getSecurityAttributes() const { return mSecurityAttributes.get(); }
|
const SecurityAttributes* getSecurityAttributes() const { return mSecurityAttributes.get(); }
|
||||||
|
|
||||||
/// @brief Call a MessageDecorator to process the message before it is
|
/// @brief Call a MessageDecorator to process the message before it is
|
||||||
/// sent to the transport
|
/// sent to the transport
|
||||||
void addOutboundDecorator(std::auto_ptr<MessageDecorator> md){mOutboundDecorators.push_back(md.release());}
|
void addOutboundDecorator(std::unique_ptr<MessageDecorator> md){mOutboundDecorators.push_back(md.release());}
|
||||||
void clearOutboundDecorators();
|
void clearOutboundDecorators();
|
||||||
void callOutboundDecorators(const Tuple &src,
|
void callOutboundDecorators(const Tuple &src,
|
||||||
const Tuple &dest,
|
const Tuple &dest,
|
||||||
|
|
@ -677,7 +677,7 @@ class SipMessage : public TransactionMessage
|
||||||
// peers domain associate with this message (MTLS)
|
// peers domain associate with this message (MTLS)
|
||||||
std::list<Data> mTlsPeerNames;
|
std::list<Data> mTlsPeerNames;
|
||||||
|
|
||||||
std::auto_ptr<SecurityAttributes> mSecurityAttributes;
|
std::unique_ptr<SecurityAttributes> mSecurityAttributes;
|
||||||
|
|
||||||
std::vector<MessageDecorator*> mOutboundDecorators;
|
std::vector<MessageDecorator*> mOutboundDecorators;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -389,12 +389,12 @@ SipStack::addTransport( TransportType protocol,
|
||||||
<< ": " << e);
|
<< ": " << e);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
addTransport(std::auto_ptr<Transport>(transport));
|
addTransport(std::unique_ptr<Transport>(transport));
|
||||||
return transport;
|
return transport;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SipStack::addTransport(std::auto_ptr<Transport> transport)
|
SipStack::addTransport(std::unique_ptr<Transport> transport)
|
||||||
{
|
{
|
||||||
//.dcm. once addTransport starts throwing, need to back out alias
|
//.dcm. once addTransport starts throwing, need to back out alias
|
||||||
if (!transport->interfaceName().empty())
|
if (!transport->interfaceName().empty())
|
||||||
|
|
@ -566,7 +566,7 @@ SipStack::send(const SipMessage& msg, TransactionUser* tu)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SipStack::send(std::auto_ptr<SipMessage> msg, TransactionUser* tu)
|
SipStack::send(std::unique_ptr<SipMessage> msg, TransactionUser* tu)
|
||||||
{
|
{
|
||||||
DebugLog (<< "SEND: " << msg->brief());
|
DebugLog (<< "SEND: " << msg->brief());
|
||||||
|
|
||||||
|
|
@ -580,7 +580,7 @@ SipStack::send(std::auto_ptr<SipMessage> msg, TransactionUser* tu)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SipStack::sendTo(std::auto_ptr<SipMessage> msg, const Uri& uri, TransactionUser* tu)
|
SipStack::sendTo(std::unique_ptr<SipMessage> msg, const Uri& uri, TransactionUser* tu)
|
||||||
{
|
{
|
||||||
if (tu) msg->setTransactionUser(tu);
|
if (tu) msg->setTransactionUser(tu);
|
||||||
msg->setForceTarget(uri);
|
msg->setForceTarget(uri);
|
||||||
|
|
@ -590,7 +590,7 @@ SipStack::sendTo(std::auto_ptr<SipMessage> msg, const Uri& uri, TransactionUser*
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SipStack::sendTo(std::auto_ptr<SipMessage> msg, const Tuple& destination, TransactionUser* tu)
|
SipStack::sendTo(std::unique_ptr<SipMessage> msg, const Tuple& destination, TransactionUser* tu)
|
||||||
{
|
{
|
||||||
assert(!mShuttingDown);
|
assert(!mShuttingDown);
|
||||||
|
|
||||||
|
|
@ -641,7 +641,7 @@ SipStack::checkAsyncProcessHandler()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SipStack::post(std::auto_ptr<ApplicationMessage> message)
|
SipStack::post(std::unique_ptr<ApplicationMessage> message)
|
||||||
{
|
{
|
||||||
assert(!mShuttingDown);
|
assert(!mShuttingDown);
|
||||||
mTuSelector.add(message.release(), TimeLimitFifo<Message>::InternalElement);
|
mTuSelector.add(message.release(), TimeLimitFifo<Message>::InternalElement);
|
||||||
|
|
@ -678,7 +678,7 @@ SipStack::postMS(const ApplicationMessage& message, unsigned int ms,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SipStack::post(std::auto_ptr<ApplicationMessage> message,
|
SipStack::post(std::unique_ptr<ApplicationMessage> message,
|
||||||
unsigned int secondsLater,
|
unsigned int secondsLater,
|
||||||
TransactionUser* tu)
|
TransactionUser* tu)
|
||||||
{
|
{
|
||||||
|
|
@ -687,7 +687,7 @@ SipStack::post(std::auto_ptr<ApplicationMessage> message,
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SipStack::postMS( std::auto_ptr<ApplicationMessage> message,
|
SipStack::postMS( std::unique_ptr<ApplicationMessage> message,
|
||||||
unsigned int ms,
|
unsigned int ms,
|
||||||
TransactionUser* tu)
|
TransactionUser* tu)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -929,9 +929,9 @@ TransactionState::saveOriginalContactAndVia(const SipMessage& sip)
|
||||||
if(sip.exists(h_Contacts) && sip.const_header(h_Contacts).size() == 1 &&
|
if(sip.exists(h_Contacts) && sip.const_header(h_Contacts).size() == 1 &&
|
||||||
sip.const_header(h_Contacts).front().isWellFormed())
|
sip.const_header(h_Contacts).front().isWellFormed())
|
||||||
{
|
{
|
||||||
mOriginalContact = std::auto_ptr<NameAddr>(new NameAddr(sip.header(h_Contacts).front()));
|
mOriginalContact = std::unique_ptr<NameAddr>(new NameAddr(sip.header(h_Contacts).front()));
|
||||||
}
|
}
|
||||||
mOriginalVia = std::auto_ptr<Via>(new Via(sip.header(h_Vias).front()));
|
mOriginalVia = std::unique_ptr<Via>(new Via(sip.header(h_Vias).front()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransactionState::restoreOriginalContactAndVia()
|
void TransactionState::restoreOriginalContactAndVia()
|
||||||
|
|
|
||||||
|
|
@ -224,11 +224,11 @@ Transport::fail(const Data& tid, TransportFailure::FailureReason reason, int sub
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::auto_ptr<SendData>
|
std::unique_ptr<SendData>
|
||||||
Transport::makeSendData( const Tuple& dest, const Data& d, const Data& tid, const Data &sigcompId)
|
Transport::makeSendData( const Tuple& dest, const Data& d, const Data& tid, const Data &sigcompId)
|
||||||
{
|
{
|
||||||
assert(dest.getPort() != -1);
|
assert(dest.getPort() != -1);
|
||||||
std::auto_ptr<SendData> data(new SendData(dest, d, tid, sigcompId));
|
std::unique_ptr<SendData> data(new SendData(dest, d, tid, sigcompId));
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -241,7 +241,7 @@ Transport::makeFailedResponse(const SipMessage& msg,
|
||||||
|
|
||||||
const Tuple& dest = msg.getSource();
|
const Tuple& dest = msg.getSource();
|
||||||
|
|
||||||
std::auto_ptr<SipMessage> errMsg(Helper::makeResponse(msg,
|
std::unique_ptr<SipMessage> errMsg(Helper::makeResponse(msg,
|
||||||
responseCode,
|
responseCode,
|
||||||
warning ? warning : "Original request had no Vias"));
|
warning ? warning : "Original request had no Vias"));
|
||||||
|
|
||||||
|
|
@ -259,13 +259,13 @@ Transport::makeFailedResponse(const SipMessage& msg,
|
||||||
// Calculate compartment ID for outbound message
|
// Calculate compartment ID for outbound message
|
||||||
Data remoteSigcompId;
|
Data remoteSigcompId;
|
||||||
setRemoteSigcompId(*errMsg,remoteSigcompId);
|
setRemoteSigcompId(*errMsg,remoteSigcompId);
|
||||||
send(std::auto_ptr<SendData>(makeSendData(dest, encoded, Data::Empty, remoteSigcompId)));
|
send(std::unique_ptr<SendData>(makeSendData(dest, encoded, Data::Empty, remoteSigcompId)));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::auto_ptr<SendData>
|
std::unique_ptr<SendData>
|
||||||
Transport::make503(SipMessage& msg, UInt16 retryAfter)
|
Transport::make503(SipMessage& msg, UInt16 retryAfter)
|
||||||
{
|
{
|
||||||
std::auto_ptr<SendData> result;
|
std::unique_ptr<SendData> result;
|
||||||
if (msg.isResponse()) return result;
|
if (msg.isResponse()) return result;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
@ -296,10 +296,10 @@ Transport::make503(SipMessage& msg, UInt16 retryAfter)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::auto_ptr<SendData>
|
std::unique_ptr<SendData>
|
||||||
Transport::make100(SipMessage& msg)
|
Transport::make100(SipMessage& msg)
|
||||||
{
|
{
|
||||||
std::auto_ptr<SendData> result;
|
std::unique_ptr<SendData> result;
|
||||||
if (msg.isResponse()) return result;
|
if (msg.isResponse()) return result;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ TransportSelector::isFinished() const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TransportSelector::addTransport(std::auto_ptr<Transport> autoTransport,
|
TransportSelector::addTransport(std::unique_ptr<Transport> autoTransport,
|
||||||
bool immediate)
|
bool immediate)
|
||||||
{
|
{
|
||||||
if(immediate)
|
if(immediate)
|
||||||
|
|
@ -176,7 +176,7 @@ TransportSelector::addTransport(std::auto_ptr<Transport> autoTransport,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TransportSelector::addTransportInternal(std::auto_ptr<Transport> autoTransport)
|
TransportSelector::addTransportInternal(std::unique_ptr<Transport> autoTransport)
|
||||||
{
|
{
|
||||||
Transport* transport = autoTransport.release();
|
Transport* transport = autoTransport.release();
|
||||||
mDns.addTransportType(transport->transport(), transport->ipVersion());
|
mDns.addTransportType(transport->transport(), transport->ipVersion());
|
||||||
|
|
@ -370,7 +370,7 @@ TransportSelector::process()
|
||||||
void
|
void
|
||||||
TransportSelector::checkTransportAddQueue()
|
TransportSelector::checkTransportAddQueue()
|
||||||
{
|
{
|
||||||
std::auto_ptr<Transport> t(mTransportsToAdd.getNext(-1));
|
std::unique_ptr<Transport> t(mTransportsToAdd.getNext(-1));
|
||||||
while(t.get())
|
while(t.get())
|
||||||
{
|
{
|
||||||
addTransportInternal(t);
|
addTransportInternal(t);
|
||||||
|
|
@ -1138,7 +1138,7 @@ TransportSelector::transmit(SipMessage* msg, Tuple& target, SendData* sendData)
|
||||||
// Call back anyone who wants to perform outbound decoration
|
// Call back anyone who wants to perform outbound decoration
|
||||||
msg->callOutboundDecorators(source, target,remoteSigcompId);
|
msg->callOutboundDecorators(source, target,remoteSigcompId);
|
||||||
|
|
||||||
std::auto_ptr<SendData> send(new SendData(target,
|
std::unique_ptr<SendData> send(new SendData(target,
|
||||||
resip::Data::Empty,
|
resip::Data::Empty,
|
||||||
msg->getTransactionId(),
|
msg->getTransactionId(),
|
||||||
remoteSigcompId));
|
remoteSigcompId));
|
||||||
|
|
@ -1217,7 +1217,7 @@ TransportSelector::retransmit(const SendData& data)
|
||||||
if(transport)
|
if(transport)
|
||||||
{
|
{
|
||||||
// If this is not true, it means the transport has been removed.
|
// If this is not true, it means the transport has been removed.
|
||||||
transport->send(std::auto_ptr<SendData>(data.clone()));
|
transport->send(std::unique_ptr<SendData>(data.clone()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1232,7 +1232,7 @@ TransportSelector::closeConnection(const Tuple& peer)
|
||||||
resip::Data::Empty,
|
resip::Data::Empty,
|
||||||
resip::Data::Empty);
|
resip::Data::Empty);
|
||||||
close->command = SendData::CloseConnection;
|
close->command = SendData::CloseConnection;
|
||||||
t->send(std::auto_ptr<SendData>(close));
|
t->send(std::unique_ptr<SendData>(close));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1279,7 +1279,7 @@ TransportSelector::enableFlowTimer(const resip::Tuple& flow)
|
||||||
resip::Data::Empty,
|
resip::Data::Empty,
|
||||||
resip::Data::Empty);
|
resip::Data::Empty);
|
||||||
enableFlowTimer->command = SendData::EnableFlowTimer;
|
enableFlowTimer->command = SendData::EnableFlowTimer;
|
||||||
t->send(std::auto_ptr<SendData>(enableFlowTimer));
|
t->send(std::unique_ptr<SendData>(enableFlowTimer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ TuIM::sendPage(const Data& text, const Uri& dest,
|
||||||
|
|
||||||
DeprecatedDialog* dialog = new DeprecatedDialog( NameAddr(mContact) );
|
DeprecatedDialog* dialog = new DeprecatedDialog( NameAddr(mContact) );
|
||||||
|
|
||||||
auto_ptr<SipMessage> msg( dialog->makeInitialMessage(NameAddr(target),NameAddr(from)) );
|
unique_ptr<SipMessage> msg( dialog->makeInitialMessage(NameAddr(target),NameAddr(from)) );
|
||||||
|
|
||||||
Page page;
|
Page page;
|
||||||
page.text = text;
|
page.text = text;
|
||||||
|
|
@ -411,7 +411,7 @@ TuIM::processSubscribeRequest(SipMessage* msg)
|
||||||
assert( dialog );
|
assert( dialog );
|
||||||
dialog->setExpirySeconds( expires );
|
dialog->setExpirySeconds( expires );
|
||||||
|
|
||||||
auto_ptr<SipMessage> response( dialog->makeResponse( *msg, 200 ));
|
unique_ptr<SipMessage> response( dialog->makeResponse( *msg, 200 ));
|
||||||
|
|
||||||
response->header(h_Expires).value() = expires;
|
response->header(h_Expires).value() = expires;
|
||||||
response->header(h_Event).value() = Data("presence");
|
response->header(h_Event).value() = Data("presence");
|
||||||
|
|
@ -504,7 +504,7 @@ TuIM::processNotifyRequest(SipMessage* msg)
|
||||||
|
|
||||||
processSipFrag( msg );
|
processSipFrag( msg );
|
||||||
|
|
||||||
auto_ptr<SipMessage> response( Helper::makeResponse( *msg, 200 ));
|
unique_ptr<SipMessage> response( Helper::makeResponse( *msg, 200 ));
|
||||||
mStack->send( *response );
|
mStack->send( *response );
|
||||||
|
|
||||||
Uri from = msg->header(h_From).uri();
|
Uri from = msg->header(h_From).uri();
|
||||||
|
|
@ -1110,7 +1110,7 @@ TuIM::process()
|
||||||
{
|
{
|
||||||
if ( mRegistrationDialog.isCreated() )
|
if ( mRegistrationDialog.isCreated() )
|
||||||
{
|
{
|
||||||
auto_ptr<SipMessage> msg( mRegistrationDialog.makeRegister() );
|
unique_ptr<SipMessage> msg( mRegistrationDialog.makeRegister() );
|
||||||
msg->header(h_Expires).value() = mRegistrationTimeSeconds;
|
msg->header(h_Expires).value() = mRegistrationTimeSeconds;
|
||||||
setOutbound( *msg );
|
setOutbound( *msg );
|
||||||
mStack->send( *msg );
|
mStack->send( *msg );
|
||||||
|
|
@ -1131,7 +1131,7 @@ TuIM::process()
|
||||||
assert( buddy.presDialog );
|
assert( buddy.presDialog );
|
||||||
if ( buddy.presDialog->isCreated() )
|
if ( buddy.presDialog->isCreated() )
|
||||||
{
|
{
|
||||||
auto_ptr<SipMessage> msg( buddy.presDialog->makeSubscribe() );
|
unique_ptr<SipMessage> msg( buddy.presDialog->makeSubscribe() );
|
||||||
|
|
||||||
msg->header(h_Event).value() = Data("presence");;
|
msg->header(h_Event).value() = Data("presence");;
|
||||||
msg->header(h_Accepts).push_back( Mime( "application","pidf+xml") );
|
msg->header(h_Accepts).push_back( Mime( "application","pidf+xml") );
|
||||||
|
|
@ -1183,7 +1183,7 @@ TuIM::registerAor( const Uri& uri, const Data& password )
|
||||||
//contactName.uri() = mContact;
|
//contactName.uri() = mContact;
|
||||||
//SipMessage* msg = Helper::makeRegister(aorName,aorName,contactName);
|
//SipMessage* msg = Helper::makeRegister(aorName,aorName,contactName);
|
||||||
|
|
||||||
auto_ptr<SipMessage> msg( mRegistrationDialog.makeInitialRegister(NameAddr(uri),NameAddr(uri)) );
|
unique_ptr<SipMessage> msg( mRegistrationDialog.makeInitialRegister(NameAddr(uri),NameAddr(uri)) );
|
||||||
|
|
||||||
msg->header(h_Expires).value() = mRegistrationTimeSeconds;
|
msg->header(h_Expires).value() = mRegistrationTimeSeconds;
|
||||||
msg->header(h_Contacts).front().param(p_expires) = mRegistrationTimeSeconds;
|
msg->header(h_Contacts).front().param(p_expires) = mRegistrationTimeSeconds;
|
||||||
|
|
@ -1248,7 +1248,7 @@ void
|
||||||
TuIM::subscribeBuddy( Buddy& buddy )
|
TuIM::subscribeBuddy( Buddy& buddy )
|
||||||
{
|
{
|
||||||
// subscribe to this budy
|
// subscribe to this budy
|
||||||
auto_ptr<SipMessage> msg( buddy.presDialog->makeInitialSubscribe(NameAddr(buddy.uri),NameAddr(mAor)) );
|
unique_ptr<SipMessage> msg( buddy.presDialog->makeInitialSubscribe(NameAddr(buddy.uri),NameAddr(mAor)) );
|
||||||
|
|
||||||
msg->header(h_Event).value() = Data("presence");;
|
msg->header(h_Event).value() = Data("presence");;
|
||||||
msg->header(h_Accepts).push_back( Mime( "application","pidf+xml") );
|
msg->header(h_Accepts).push_back( Mime( "application","pidf+xml") );
|
||||||
|
|
@ -1308,7 +1308,7 @@ TuIM::sendNotify(DeprecatedDialog* dialog)
|
||||||
{
|
{
|
||||||
assert( dialog );
|
assert( dialog );
|
||||||
|
|
||||||
auto_ptr<SipMessage> msg( dialog->makeNotify() );
|
unique_ptr<SipMessage> msg( dialog->makeNotify() );
|
||||||
|
|
||||||
Pidf* pidf = new Pidf( *mPidf );
|
Pidf* pidf = new Pidf( *mPidf );
|
||||||
|
|
||||||
|
|
@ -1332,7 +1332,7 @@ TuIM::sendPublish(StateAgent& sa)
|
||||||
{
|
{
|
||||||
assert( sa.dialog );
|
assert( sa.dialog );
|
||||||
|
|
||||||
auto_ptr<SipMessage> msg( sa.dialog->makeInitialPublish(NameAddr(sa.uri),NameAddr(mAor)) );
|
unique_ptr<SipMessage> msg( sa.dialog->makeInitialPublish(NameAddr(sa.uri),NameAddr(mAor)) );
|
||||||
|
|
||||||
Pidf* pidf = new Pidf( *mPidf );
|
Pidf* pidf = new Pidf( *mPidf );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ UdpTransport::processTxOne(SendData *data)
|
||||||
{
|
{
|
||||||
++mTxMsgCnt;
|
++mTxMsgCnt;
|
||||||
assert(data);
|
assert(data);
|
||||||
std::auto_ptr<SendData> sendData(data);
|
std::unique_ptr<SendData> sendData(data);
|
||||||
//DebugLog (<< "Sent: " << sendData->data);
|
//DebugLog (<< "Sent: " << sendData->data);
|
||||||
//DebugLog (<< "Sending message on udp.");
|
//DebugLog (<< "Sending message on udp.");
|
||||||
assert( sendData->destination.getPort() != 0 );
|
assert( sendData->destination.getPort() != 0 );
|
||||||
|
|
@ -598,7 +598,7 @@ UdpTransport::processRxParse(char *buffer, int len, Tuple& sender)
|
||||||
StackLog(<< Data(Data::Borrow, buffer, len));
|
StackLog(<< Data(Data::Borrow, buffer, len));
|
||||||
if(mExternalUnknownDatagramHandler)
|
if(mExternalUnknownDatagramHandler)
|
||||||
{
|
{
|
||||||
auto_ptr<Data> datagram(new Data(buffer,len));
|
unique_ptr<Data> datagram(new Data(buffer,len));
|
||||||
(*mExternalUnknownDatagramHandler)(this,sender,datagram);
|
(*mExternalUnknownDatagramHandler)(this,sender,datagram);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -640,7 +640,7 @@ UdpTransport::processRxParse(char *buffer, int len, Tuple& sender)
|
||||||
|
|
||||||
// .bwc. This handles all appropriate checking for whether
|
// .bwc. This handles all appropriate checking for whether
|
||||||
// this is a response or an ACK.
|
// this is a response or an ACK.
|
||||||
std::auto_ptr<SendData> tryLater(make503(*message, getExpectedWaitForIncoming()/1000));
|
std::unique_ptr<SendData> tryLater(make503(*message, getExpectedWaitForIncoming()/1000));
|
||||||
if(tryLater.get())
|
if(tryLater.get())
|
||||||
{
|
{
|
||||||
send(tryLater);
|
send(tryLater);
|
||||||
|
|
|
||||||
|
|
@ -264,8 +264,8 @@ class Uri : public ParserCategory
|
||||||
mutable bool mHostCanonicalized;
|
mutable bool mHostCanonicalized;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<Data> mEmbeddedHeadersText;
|
std::unique_ptr<Data> mEmbeddedHeadersText;
|
||||||
std::auto_ptr<SipMessage> mEmbeddedHeaders;
|
std::unique_ptr<SipMessage> mEmbeddedHeaders;
|
||||||
|
|
||||||
static ParameterTypes::Factory ParameterFactories[ParameterTypes::MAX_PARAMETER];
|
static ParameterTypes::Factory ParameterFactories[ParameterTypes::MAX_PARAMETER];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1857,7 +1857,7 @@ BaseSecurity::checkIdentity( const Data& signerDomain, const Data& in, const Dat
|
||||||
void
|
void
|
||||||
BaseSecurity::checkAndSetIdentity(SipMessage& msg, const Data& certDer) const
|
BaseSecurity::checkAndSetIdentity(SipMessage& msg, const Data& certDer) const
|
||||||
{
|
{
|
||||||
auto_ptr<SecurityAttributes> sec(new SecurityAttributes);
|
unique_ptr<SecurityAttributes> sec(new SecurityAttributes);
|
||||||
X509* cert=NULL;
|
X509* cert=NULL;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue