parent
31c876490c
commit
228e2d7829
|
|
@ -0,0 +1,7 @@
|
|||
build_exe:
|
||||
script:
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake ../src
|
||||
- cmake --build .
|
||||
|
||||
|
|
@ -416,7 +416,7 @@ int Account::sendMsg(const std::string& peer, const void* ptr, unsigned length,
|
|||
resip::ClientPagerMessageHandle msgHandle = mAgent.mDum->makePagerMessage(resip::NameAddr(resip::Data(peer)), mProfile, s);
|
||||
unique_ptr<resip::Contents> contentPtr(new resip::PlainContents(resip::Data(std::string((const char*)ptr, length)),type));
|
||||
int result = s->sessionId();
|
||||
msgHandle->page(contentPtr);
|
||||
msgHandle->page(std::move(contentPtr));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ void UserAgent::start()
|
|||
mDum->setServerPagerMessageHandler(this);
|
||||
|
||||
unique_ptr<resip::AppDialogSetFactory> uac_dsf(new ResipSessionFactory(this));
|
||||
mDum->setAppDialogSetFactory(uac_dsf);
|
||||
mDum->setAppDialogSetFactory(std::move(uac_dsf));
|
||||
|
||||
// Fire onStart event if stun is not used or stun server ip is known
|
||||
if (mConfig[CONFIG_STUNSERVER_NAME].asStdString().empty() || !mConfig[CONFIG_STUNSERVER_IP].asStdString().empty())
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ public:
|
|||
|
||||
#pragma region PagerHandler
|
||||
void onSuccess(resip::ClientPagerMessageHandle, const resip::SipMessage& status) override;
|
||||
void onFailure(resip::ClientPagerMessageHandle, const resip::SipMessage& status, std::auto_ptr<resip::Contents> contents) override;
|
||||
void onFailure(resip::ClientPagerMessageHandle, const resip::SipMessage& status, std::unique_ptr<resip::Contents> contents) override;
|
||||
void onMessageArrived(resip::ServerPagerMessageHandle, const resip::SipMessage& message) override;
|
||||
#pragma endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class Message;
|
|||
class BatchMessages : public EventConsumerBase, public Event
|
||||
{
|
||||
BatchMessages(Dispatcher& dispatcher,
|
||||
std::vector<std::auto_ptr<Message> >& messages,
|
||||
std::vector<std::unique_ptr<Message> >& messages,
|
||||
Postable<Event>& postable);
|
||||
virtual ~BatchMessages() = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class ChordTopology : public TopologyAPI
|
|||
virtual ResourceId resourceId( const resip::Data& resourceName );
|
||||
|
||||
// not public api
|
||||
virtual void post(std::auto_ptr<Event> message);
|
||||
virtual void post(std::unique_ptr<Event> message);
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public:
|
|||
virtual MessageType getType() const { return ConnectReqType; }
|
||||
virtual resip::Data brief() const { return "ConnectReq Message"; }
|
||||
|
||||
std::auto_ptr<Event> event()
|
||||
std::unique_ptr<Event> event()
|
||||
{
|
||||
return wrap(this);
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ public:
|
|||
virtual MessageType getType() const { return ConnectAnsType; }
|
||||
virtual resip::Data brief() const { return "ConnectAns Message"; }
|
||||
|
||||
std::auto_ptr<Event> event()
|
||||
std::unique_ptr<Event> event()
|
||||
{
|
||||
return wrap(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ class Dispatcher : public Postable<Message>
|
|||
|
||||
void init(ForwardingLayer& forwardingLayer);
|
||||
void registerPostable(Message::MessageType type, Postable<Event>& postable);
|
||||
void send(std::auto_ptr<Message> message, Postable<Event>& responseSink);
|
||||
void send(std::unique_ptr<Message> message, Postable<Event>& responseSink);
|
||||
|
||||
// not public API
|
||||
virtual void post(std::auto_ptr<Message> message);
|
||||
virtual void post(std::unique_ptr<Message> message);
|
||||
|
||||
private:
|
||||
class Entry
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ class EventWrapper : public Event
|
|||
|
||||
|
||||
private:
|
||||
std::auto_ptr<T> mWrapped;
|
||||
std::unique_ptr<T> mWrapped;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
static std::auto_ptr<Event> wrap(T* t)
|
||||
static std::unique_ptr<Event> wrap(T* t)
|
||||
{
|
||||
return std::auto_ptr<Event>(new EventWrapper<T>(t));
|
||||
return std::unique_ptr<Event>(new EventWrapper<T>(t));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class FetchAns : public Message
|
|||
AbstractValues& values();
|
||||
const AbstractValues& values() const;
|
||||
|
||||
std::auto_ptr<Event> event()
|
||||
std::unique_ptr<Event> event()
|
||||
{
|
||||
return wrap(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class FetchReq : public ResourceMessage
|
|||
DataSpecifiers& specifiers();
|
||||
const DataSpecifiers& specifiers() const;
|
||||
|
||||
std::auto_ptr<Event> event()
|
||||
std::unique_ptr<Event> event()
|
||||
{
|
||||
return wrap(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ class ForwardingLayer: public EventConsumer
|
|||
virtual void consume(LocalCandidatesCollected& m);
|
||||
|
||||
// from messages from above or below that need to be forwarded
|
||||
void forward( std::auto_ptr<Message> m );
|
||||
void forward( std::unique_ptr<Message> m );
|
||||
|
||||
//not public api
|
||||
virtual void post(std::auto_ptr<Event> event);
|
||||
virtual void post(std::unique_ptr<Event> event);
|
||||
|
||||
virtual resip::Data brief() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public:
|
|||
virtual void getEncodedPayload(resip::DataStream &data);
|
||||
virtual resip::Data brief() const { return "JoinAns Message"; }
|
||||
|
||||
std::auto_ptr<Event> event() {return wrap(this);}
|
||||
std::unique_ptr<Event> event() {return wrap(this);}
|
||||
|
||||
protected:
|
||||
virtual void decodePayload(resip::DataStream &dataStream);
|
||||
|
|
@ -38,7 +38,7 @@ public:
|
|||
virtual void getEncodedPayload(resip::DataStream &data);
|
||||
virtual resip::Data brief() const { return "JoinReq Message"; }
|
||||
|
||||
std::auto_ptr<Event> event() {return wrap(this);}
|
||||
std::unique_ptr<Event> event() {return wrap(this);}
|
||||
|
||||
protected:
|
||||
virtual void decodePayload(resip::DataStream &dataStream);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public:
|
|||
virtual void getEncodedPayload(resip::DataStream &data);
|
||||
virtual resip::Data brief() const { return "LeaveAns Message"; }
|
||||
|
||||
std::auto_ptr<Event> event() {return wrap(this);}
|
||||
std::unique_ptr<Event> event() {return wrap(this);}
|
||||
|
||||
|
||||
protected:
|
||||
|
|
@ -40,7 +40,7 @@ public:
|
|||
virtual void getEncodedPayload(resip::DataStream &data);
|
||||
virtual resip::Data brief() const { return "LeaveReq Message"; }
|
||||
|
||||
std::auto_ptr<Event> event() {return wrap(this);}
|
||||
std::unique_ptr<Event> event() {return wrap(this);}
|
||||
|
||||
protected:
|
||||
virtual void decodePayload(resip::DataStream &dataStream);
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class Message : public Signable
|
|||
DestinationId nextDestination() const;
|
||||
void popNextDestinationId();
|
||||
|
||||
virtual std::auto_ptr<Event> event() = 0;
|
||||
virtual std::unique_ptr<Event> event() = 0;
|
||||
|
||||
virtual resip::Data brief() const =0;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class Postable
|
|||
{
|
||||
public:
|
||||
virtual ~Postable(){}
|
||||
virtual void post(std::auto_ptr<T> posted)=0;
|
||||
virtual void post(std::unique_ptr<T> posted)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ class SelectTransporter : public Transporter
|
|||
void addListenerImpl(resip::TransportType transport,
|
||||
resip::GenericIPAddress &address);
|
||||
|
||||
void sendImpl(NodeId nodeId, std::auto_ptr<p2p::Message> msg);
|
||||
void sendImpl(FlowId flowId, std::auto_ptr<resip::Data> data);
|
||||
void sendImpl(NodeId nodeId, std::unique_ptr<p2p::Message> msg);
|
||||
void sendImpl(FlowId flowId, std::unique_ptr<resip::Data> data);
|
||||
|
||||
void collectCandidatesImpl(UInt64 tid, NodeId nodeId, unsigned short appId);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class StoreAns : public ResourceMessage
|
|||
}
|
||||
|
||||
// call Event->dispatch(consumer) when you want to dispatch this
|
||||
std::auto_ptr<Event> event()
|
||||
std::unique_ptr<Event> event()
|
||||
{
|
||||
return wrap(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class StoreReq : public ResourceMessage
|
|||
mReplicaNamber = number;
|
||||
}
|
||||
|
||||
std::auto_ptr<Event> event()
|
||||
std::unique_ptr<Event> event()
|
||||
{
|
||||
return wrap(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ class StoreSet : public EventConsumer,
|
|||
public:
|
||||
StoreSet(Dispatcher& dispatcher,
|
||||
TopologyApi& topology,
|
||||
std::vector<auto_ptr<StoreReq> > stores);
|
||||
std::vector<unique_ptr<StoreReq> > stores);
|
||||
|
||||
virtual void consume(EventWrapper<StoreAns>& event);
|
||||
virtual void post(std::auto_ptr<Event> event)
|
||||
virtual void post(std::unique_ptr<Event> event)
|
||||
{
|
||||
event->dispatch(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ class Transporter
|
|||
void addListener(resip::TransportType transport,
|
||||
resip::GenericIPAddress &address);
|
||||
|
||||
void send(NodeId nodeId, std::auto_ptr<p2p::Message> msg);
|
||||
void send(FlowId flowId, std::auto_ptr<resip::Data> data);
|
||||
void send(NodeId nodeId, std::unique_ptr<p2p::Message> msg);
|
||||
void send(FlowId flowId, std::unique_ptr<resip::Data> data);
|
||||
|
||||
void collectCandidates(UInt64 tid, NodeId nodeId,
|
||||
unsigned short appId = RELOAD_APPLICATION_ID);
|
||||
|
|
@ -69,8 +69,8 @@ class Transporter
|
|||
virtual void addListenerImpl(resip::TransportType transport,
|
||||
resip::GenericIPAddress &address) = 0;
|
||||
|
||||
virtual void sendImpl(NodeId nodeId, std::auto_ptr<p2p::Message> msg) = 0;
|
||||
virtual void sendImpl(FlowId flowId, std::auto_ptr<resip::Data> data) = 0;
|
||||
virtual void sendImpl(NodeId nodeId, std::unique_ptr<p2p::Message> msg) = 0;
|
||||
virtual void sendImpl(FlowId flowId, std::unique_ptr<resip::Data> data) = 0;
|
||||
|
||||
virtual void collectCandidatesImpl(UInt64 tid, NodeId, unsigned short appId) = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -85,14 +85,14 @@ class ConnectionClosed : public Event
|
|||
class MessageArrived : public Event
|
||||
{
|
||||
public:
|
||||
MessageArrived (NodeId nodeId, std::auto_ptr<p2p::Message> message)
|
||||
MessageArrived (NodeId nodeId, std::unique_ptr<p2p::Message> message)
|
||||
: mNodeId(nodeId), mMessage(message) {}
|
||||
~MessageArrived();
|
||||
|
||||
virtual void dispatch(EventConsumer& consumer);
|
||||
|
||||
NodeId getNodeId() const {return mNodeId;}
|
||||
std::auto_ptr<p2p::Message> getMessage() { assert(mMessage.get());
|
||||
std::unique_ptr<p2p::Message> getMessage() { assert(mMessage.get());
|
||||
return mMessage; }
|
||||
|
||||
virtual resip::Data brief() const
|
||||
|
|
@ -104,7 +104,7 @@ class MessageArrived : public Event
|
|||
protected:
|
||||
|
||||
NodeId mNodeId;
|
||||
std::auto_ptr<p2p::Message> mMessage;
|
||||
std::unique_ptr<p2p::Message> mMessage;
|
||||
};
|
||||
|
||||
class ApplicationMessageArrived : public Event
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public:
|
|||
virtual resip::Data brief() const { return "UpdateAns Message"; }
|
||||
|
||||
|
||||
std::auto_ptr<Event> event()
|
||||
std::unique_ptr<Event> event()
|
||||
{
|
||||
return wrap(this);
|
||||
}
|
||||
|
|
@ -42,7 +42,7 @@ public:
|
|||
virtual void getEncodedPayload(resip::DataStream &data);
|
||||
virtual resip::Data brief() const { return "UpdateReq Message"; }
|
||||
|
||||
std::auto_ptr<Event> event()
|
||||
std::unique_ptr<Event> event()
|
||||
{
|
||||
return wrap(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ SubDialog::processSubscribe(SipMessage* msg)
|
|||
|
||||
}
|
||||
|
||||
auto_ptr<SipMessage> resp(Helper::makeResponse(*msg,202,""));
|
||||
unique_ptr<SipMessage> resp(Helper::makeResponse(*msg,202,""));
|
||||
resp->header(h_Expires).value() = mSubState->expires()-time(NULL);
|
||||
mStack->send(*resp);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ SubDialogMgr::dispatchSubscribe(SipMessage* msg)
|
|||
SubDialog *dialog = matchDialog(msg);
|
||||
if (!dialog)
|
||||
{
|
||||
auto_ptr<SipMessage> resp(Helper::makeResponse(*msg,481,""));
|
||||
unique_ptr<SipMessage> resp(Helper::makeResponse(*msg,481,""));
|
||||
mStack->send(*resp);
|
||||
// !dlb! return here?
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ TuPresSvr::process()
|
|||
}
|
||||
else if (msg->header(h_RequestLine).getMethod() == OPTIONS )
|
||||
{
|
||||
auto_ptr<SipMessage> resp(
|
||||
unique_ptr<SipMessage> resp(
|
||||
Helper::makeResponse(*msg,500,"You Shot Me!"));
|
||||
mStack->send(*resp);
|
||||
done = 1;
|
||||
|
|
@ -45,7 +45,7 @@ TuPresSvr::process()
|
|||
}
|
||||
else
|
||||
{
|
||||
auto_ptr<SipMessage> resp(Helper::makeResponse(*msg,501,""));
|
||||
unique_ptr<SipMessage> resp(Helper::makeResponse(*msg,501,""));
|
||||
mStack->send(*resp);
|
||||
}
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@ void TuPresSvr::processNewSubscribe(SipMessage* msg)
|
|||
|| msg->header(h_Event).value()!=presence.value()
|
||||
)
|
||||
{
|
||||
auto_ptr<SipMessage> resp(Helper::makeResponse(*msg,489,""));
|
||||
unique_ptr<SipMessage> resp(Helper::makeResponse(*msg,489,""));
|
||||
resp->header(h_AllowEvents).push_back(presence);
|
||||
mStack->send(*resp);
|
||||
return;
|
||||
|
|
@ -99,7 +99,7 @@ void TuPresSvr::processNewSubscribe(SipMessage* msg)
|
|||
}
|
||||
else
|
||||
{
|
||||
auto_ptr<SipMessage> resp(Helper::makeResponse(*msg,404,""));
|
||||
unique_ptr<SipMessage> resp(Helper::makeResponse(*msg,404,""));
|
||||
mStack->send(*resp);
|
||||
}
|
||||
|
||||
|
|
@ -126,18 +126,18 @@ void TuPresSvr::processPublish(SipMessage* msg)
|
|||
{
|
||||
int retcode = (ResourceMgr::instance().setPresenceDocument(aor,contents)
|
||||
?200:403);
|
||||
auto_ptr<SipMessage> resp(Helper::makeResponse(*msg,retcode,""));
|
||||
unique_ptr<SipMessage> resp(Helper::makeResponse(*msg,retcode,""));
|
||||
mStack->send(*resp);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto_ptr<SipMessage> resp(Helper::makeResponse(*msg,400,"This hacked-up service requires a body"));
|
||||
unique_ptr<SipMessage> resp(Helper::makeResponse(*msg,400,"This hacked-up service requires a body"));
|
||||
mStack->send(*resp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
auto_ptr<SipMessage> resp(Helper::makeResponse(*msg,404,""));
|
||||
unique_ptr<SipMessage> resp(Helper::makeResponse(*msg,404,""));
|
||||
mStack->send(*resp);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,17 +27,17 @@ class DtlsFactory
|
|||
enum PacketType { rtp, dtls, stun, unknown};
|
||||
|
||||
// Creates a DTLS SSL Context and enables srtp extension, also sets the private and public key cert
|
||||
DtlsFactory(std::auto_ptr<DtlsTimerContext> tc, X509 *cert, EVP_PKEY *privkey);
|
||||
DtlsFactory(std::unique_ptr<DtlsTimerContext> tc, X509 *cert, EVP_PKEY *privkey);
|
||||
|
||||
// Note: this orphans any DtlsSockets you were stupid enough
|
||||
// not to free
|
||||
~DtlsFactory();
|
||||
|
||||
// Creates a new DtlsSocket to be used as a client
|
||||
DtlsSocket* createClient(std::auto_ptr<DtlsSocketContext> context);
|
||||
DtlsSocket* createClient(std::unique_ptr<DtlsSocketContext> context);
|
||||
|
||||
// Creates a new DtlsSocket to be used as a server
|
||||
DtlsSocket* createServer(std::auto_ptr<DtlsSocketContext> context);
|
||||
DtlsSocket* createServer(std::unique_ptr<DtlsSocketContext> context);
|
||||
|
||||
// Returns the fingerprint of the user cert that was passed into the constructor
|
||||
void getMyCertFingerprint(char *fingerprint);
|
||||
|
|
@ -60,7 +60,7 @@ class DtlsFactory
|
|||
private:
|
||||
friend class DtlsSocket;
|
||||
SSL_CTX* mContext;
|
||||
std::auto_ptr<DtlsTimerContext> mTimerContext;
|
||||
std::unique_ptr<DtlsTimerContext> mTimerContext;
|
||||
X509 *mCert;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class DtlsSocket
|
|||
void forceRetransmit();
|
||||
|
||||
// Creates an SSL socket, and if client sets state to connect_state and if server sets state to accept_state. Sets SSL BIO's.
|
||||
DtlsSocket(std::auto_ptr<DtlsSocketContext> socketContext, DtlsFactory* factory, enum SocketType);
|
||||
DtlsSocket(std::unique_ptr<DtlsSocketContext> socketContext, DtlsFactory* factory, enum SocketType);
|
||||
|
||||
// Give CPU cyces to the handshake process - checks current state and acts appropraitely
|
||||
void doHandshakeIteration();
|
||||
|
|
@ -125,7 +125,7 @@ class DtlsSocket
|
|||
int getReadTimeout();
|
||||
|
||||
// Internals
|
||||
std::auto_ptr<DtlsSocketContext> mSocketContext;
|
||||
std::unique_ptr<DtlsSocketContext> mSocketContext;
|
||||
DtlsFactory* mFactory;
|
||||
DtlsTimer *mReadTimer; // Timer used during handshake process
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ private:
|
|||
resip::TimeLimitFifo<FifoEvent> mFifo;
|
||||
PersistentMessageEnqueue* initializeEventQueue(FifoEventType type, bool destroyFirst=false);
|
||||
void pushEventObjectToQueue(json::Object& object, FifoEventType type);
|
||||
void internalProcess(std::auto_ptr<FifoEvent> eventData);
|
||||
void internalProcess(std::unique_ptr<FifoEvent> eventData);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class MyAsyncProcessor : public AsyncProcessor
|
|||
// Dispatch async request to worker thread pool
|
||||
MyAsyncProcessorAsyncMessage* async = new MyAsyncProcessorAsyncMessage(*this, rc.getTransactionId(), &rc.getProxy());
|
||||
async->mDataRequiredToCallBlockingFunction = "foo";
|
||||
mAsyncDispatcher->post(std::auto_ptr<ApplicationMessage>(async));
|
||||
mAsyncDispatcher->post(std::unique_ptr<ApplicationMessage>(async));
|
||||
return WaitingForEvent;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class Dispatcher
|
|||
@param startImmediately Whether to start this thread bank on
|
||||
construction.
|
||||
*/
|
||||
Dispatcher(std::auto_ptr<Worker> prototype,
|
||||
Dispatcher(std::unique_ptr<Worker> prototype,
|
||||
resip::SipStack* stack,
|
||||
int workers=2,
|
||||
bool startImmediately=true);
|
||||
|
|
@ -70,7 +70,7 @@ class Dispatcher
|
|||
@returns true iff this message was successfully posted. (This may not
|
||||
be the case if this Dispatcher is in the process of shutting down)
|
||||
*/
|
||||
virtual bool post(std::auto_ptr<resip::ApplicationMessage>& work);
|
||||
virtual bool post(std::unique_ptr<resip::ApplicationMessage>& work);
|
||||
|
||||
/**
|
||||
@returns The number of messages in this Dispatcher's queue
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class ProcessorChain : public Processor
|
|||
ProcessorChain(ChainType type);
|
||||
virtual ~ProcessorChain();
|
||||
|
||||
void addProcessor(std::auto_ptr<Processor>);
|
||||
void addProcessor(std::unique_ptr<Processor>);
|
||||
|
||||
virtual processor_action_t process(RequestContext &);
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class Proxy : public resip::TransactionUser, public resip::ThreadIf
|
|||
|
||||
// Note: These are not thread safe and should be called before run() only
|
||||
void setOptionsHandler(OptionsHandler* handler);
|
||||
void setRequestContextFactory(std::auto_ptr<RequestContextFactory> requestContextFactory);
|
||||
void setRequestContextFactory(std::unique_ptr<RequestContextFactory> requestContextFactory);
|
||||
|
||||
virtual bool isShutDown() const ;
|
||||
virtual void thread();
|
||||
|
|
@ -86,9 +86,9 @@ class Proxy : public resip::TransactionUser, public resip::ThreadIf
|
|||
void send(const resip::SipMessage& msg);
|
||||
void addClientTransaction(const resip::Data& transactionId, RequestContext* rc);
|
||||
|
||||
void postTimerC(std::auto_ptr<TimerCMessage> tc);
|
||||
void postTimerC(std::unique_ptr<TimerCMessage> tc);
|
||||
|
||||
void postMS(std::auto_ptr<resip::ApplicationMessage> msg, int msec);
|
||||
void postMS(std::unique_ptr<resip::ApplicationMessage> msg, int msec);
|
||||
|
||||
bool compressionEnabled() const;
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ class Proxy : public resip::TransactionUser, public resip::ThreadIf
|
|||
UserStore &mUserStore;
|
||||
std::set<resip::Data> mSupportedOptions;
|
||||
OptionsHandler* mOptionsHandler;
|
||||
std::auto_ptr<RequestContextFactory> mRequestContextFactory;
|
||||
std::unique_ptr<RequestContextFactory> mRequestContextFactory;
|
||||
|
||||
bool mSessionAccountingEnabled;
|
||||
bool mRegistrationAccountingEnabled;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ protected:
|
|||
virtual resip::Data addDomains(resip::TransactionUser& tu, bool log);
|
||||
virtual bool addTransports(bool& allTransportsSpecifyRecordRoute);
|
||||
// Override this and examine the processor name to selectively add custom processors before or after the standard ones
|
||||
virtual void addProcessor(repro::ProcessorChain& chain, std::auto_ptr<repro::Processor> processor);
|
||||
virtual void addProcessor(repro::ProcessorChain& chain, std::unique_ptr<repro::Processor> processor);
|
||||
virtual void makeRequestProcessorChain(repro::ProcessorChain& chain);
|
||||
virtual void makeResponseProcessorChain(repro::ProcessorChain& chain);
|
||||
virtual void makeTargetProcessorChain(repro::ProcessorChain& chain);
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ class RequestContext
|
|||
virtual ~RequestContext();
|
||||
|
||||
virtual void process(resip::TransactionTerminated& msg);
|
||||
virtual void process(std::auto_ptr<resip::SipMessage> sip);
|
||||
virtual void process(std::auto_ptr<resip::ApplicationMessage> app);
|
||||
virtual void process(std::unique_ptr<resip::SipMessage> sip);
|
||||
virtual void process(std::unique_ptr<resip::ApplicationMessage> app);
|
||||
|
||||
virtual void handleSelfAimedStrayAck(resip::SipMessage* sip);
|
||||
virtual void cancelClientTransaction(const resip::Data& tid);
|
||||
|
|
@ -69,7 +69,7 @@ class RequestContext
|
|||
void setSessionCreatedEventSent() { mSessionCreatedEventSent = true; }
|
||||
void setSessionEstablishedEventSent() { mSessionEstablishedEventSent = true; }
|
||||
|
||||
void postTimedMessage(std::auto_ptr<resip::ApplicationMessage> msg,int seconds);
|
||||
void postTimedMessage(std::unique_ptr<resip::ApplicationMessage> msg,int seconds);
|
||||
|
||||
// Accessor for per-requset extensible state storage for monkeys
|
||||
resip::KeyValueStore& getKeyValueStore() { return mKeyValueStore; }
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class ResponseContext
|
|||
@note Targets are not checked for duplicate uris until an attempt
|
||||
is made to start them.
|
||||
*/
|
||||
bool addTarget(std::auto_ptr<repro::Target> target, bool beginImmediately=false);
|
||||
bool addTarget(std::unique_ptr<repro::Target> target, bool beginImmediately=false);
|
||||
|
||||
/**
|
||||
Adds a batch of Targets.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ std::unique_ptr<ClientAuthExtension> ClientAuthExtension::mInstance = std::uniqu
|
|||
void
|
||||
ClientAuthExtension::setInstance(std::unique_ptr<ClientAuthExtension> ext)
|
||||
{
|
||||
mInstance = ext;
|
||||
mInstance = std::move(ext);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class ClientAuthExtension
|
|||
|
||||
virtual bool algorithmAndQopSupported(const Auth& challenge);
|
||||
|
||||
static void setInstance(std::auto_ptr<ClientAuthExtension> ext);
|
||||
static void setInstance(std::unique_ptr<ClientAuthExtension> ext);
|
||||
static ClientAuthExtension& instance()
|
||||
{
|
||||
return *mInstance;
|
||||
|
|
@ -54,7 +54,7 @@ class ClientAuthExtension
|
|||
ClientAuthExtension() {}
|
||||
|
||||
|
||||
static std::auto_ptr<ClientAuthExtension> mInstance;
|
||||
static std::unique_ptr<ClientAuthExtension> mInstance;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -414,7 +414,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
|
||||
// may be modifying the message body
|
||||
std::unique_ptr<MessageDecorator> clientAuthDecorator(new ClientAuthDecorator(mIsProxyCredential, mAuth, mCredential, authQop, nonceCountString));
|
||||
request.addOutboundDecorator(clientAuthDecorator);
|
||||
request.addOutboundDecorator(std::move(clientAuthDecorator));
|
||||
}
|
||||
|
||||
void ClientAuthManager::dialogSetDestroyed(const DialogSetId& id)
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ ClientInviteSession::provideAnswer (const Contents& answer)
|
|||
transition(UAC_SentAnswer);
|
||||
|
||||
// Remember proposed local offerAnswer.
|
||||
mCurrentRemoteOfferAnswer = mProposedRemoteOfferAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(mProposedRemoteOfferAnswer);
|
||||
mCurrentLocalOfferAnswer = InviteSession::makeOfferAnswer(answer);
|
||||
|
||||
// Creates an PRACK request with application supplied offer.
|
||||
|
|
@ -137,7 +137,7 @@ ClientInviteSession::provideAnswer (const Contents& answer)
|
|||
transition(Connected);
|
||||
sendAck(&answer);
|
||||
|
||||
mCurrentRemoteOfferAnswer = mProposedRemoteOfferAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(mProposedRemoteOfferAnswer);
|
||||
mCurrentLocalOfferAnswer = InviteSession::makeOfferAnswer(answer);
|
||||
// mLastSessionModification = ack; // ?slg? is this needed?
|
||||
break;
|
||||
|
|
@ -154,7 +154,7 @@ ClientInviteSession::provideAnswer (const Contents& answer)
|
|||
mDialog.makeResponse(*response, *mLastRemoteSessionModification, 200);
|
||||
InviteSession::setOfferAnswer(*response, answer, 0);
|
||||
mCurrentLocalOfferAnswer = InviteSession::makeOfferAnswer(answer);
|
||||
mCurrentRemoteOfferAnswer = mProposedRemoteOfferAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(mProposedRemoteOfferAnswer);
|
||||
InfoLog (<< "Sending " << response->brief());
|
||||
DumHelper::setOutgoingEncryptionLevel(*response, mCurrentEncryptionLevel);
|
||||
send(response);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class ClientInviteSession : public InviteSession
|
|||
void onProvisionalAspect(ClientInviteSessionHandle c, const SipMessage& msg);
|
||||
void onFailureAspect(ClientInviteSessionHandle c, const SipMessage& msg);
|
||||
|
||||
std::auto_ptr<Contents> mEarlyMedia;
|
||||
std::unique_ptr<Contents> mEarlyMedia;
|
||||
|
||||
RAckCategory mRelRespInfo;
|
||||
unsigned int mStaleCallTimerSeq;
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ public:
|
|||
std::unique_ptr<Contents> contents,
|
||||
DialogUsageManager::EncryptionLevel level)
|
||||
: mClientPagerMessage(clientPagerMessage),
|
||||
mContents(contents),
|
||||
mContents(std::move(contents)),
|
||||
mLevel(level)
|
||||
{
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ public:
|
|||
|
||||
virtual void executeCommand()
|
||||
{
|
||||
mClientPagerMessage.page(mContents, mLevel);
|
||||
mClientPagerMessage.page(std::move(mContents), mLevel);
|
||||
}
|
||||
|
||||
virtual EncodeStream& encodeBrief(EncodeStream& strm) const
|
||||
|
|
@ -160,7 +160,7 @@ void
|
|||
ClientPagerMessage::pageCommand(std::unique_ptr<Contents> contents,
|
||||
DialogUsageManager::EncryptionLevel level)
|
||||
{
|
||||
mDum.post(new ClientPagerMessagePageCommand(*this, contents, level));
|
||||
mDum.post(new ClientPagerMessagePageCommand(*this, std::move(contents), level));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ class ClientPagerMessage : public NonDialogUsage
|
|||
//queues the message if there is one sent but not yet received a response
|
||||
//for it.
|
||||
//asserts if contents->get() is NULL.
|
||||
virtual void page(std::auto_ptr<Contents> contents, DialogUsageManager::EncryptionLevel level=DialogUsageManager::None);
|
||||
virtual void page(std::unique_ptr<Contents> contents, DialogUsageManager::EncryptionLevel level=DialogUsageManager::None);
|
||||
virtual void end();
|
||||
|
||||
/**
|
||||
* Provide asynchronous method access by using command
|
||||
*/
|
||||
virtual void endCommand();
|
||||
virtual void pageCommand(std::auto_ptr<Contents> contents, DialogUsageManager::EncryptionLevel level=DialogUsageManager::None);
|
||||
virtual void pageCommand(std::unique_ptr<Contents> contents, DialogUsageManager::EncryptionLevel level=DialogUsageManager::None);
|
||||
|
||||
virtual void dispatch(const SipMessage& msg);
|
||||
virtual void dispatch(const DumTimeout& timer);
|
||||
|
|
|
|||
|
|
@ -83,22 +83,22 @@ class DialogEventInfo
|
|||
DialogId mDialogId;
|
||||
Direction mDirection;
|
||||
//ID of the dialog this dialog replaced.
|
||||
std::auto_ptr<DialogId> mReplacesId;
|
||||
std::unique_ptr<DialogId> mReplacesId;
|
||||
InviteSessionHandle mInviteSession;
|
||||
|
||||
std::auto_ptr<NameAddr> mReferredBy;
|
||||
std::unique_ptr<NameAddr> mReferredBy;
|
||||
|
||||
//could back-point to dialog for this information to save space
|
||||
NameAddrs mRouteSet;
|
||||
NameAddr mLocalIdentity;
|
||||
NameAddr mRemoteIdentity;
|
||||
Uri mLocalTarget;
|
||||
std::auto_ptr<Uri> mRemoteTarget;
|
||||
std::unique_ptr<Uri> mRemoteTarget;
|
||||
|
||||
UInt64 mCreationTimeSeconds;
|
||||
|
||||
std::auto_ptr<Contents> mLocalOfferAnswer;
|
||||
std::auto_ptr<Contents> mRemoteOfferAnswer;
|
||||
std::unique_ptr<Contents> mLocalOfferAnswer;
|
||||
std::unique_ptr<Contents> mRemoteOfferAnswer;
|
||||
|
||||
private:
|
||||
bool mReplaced;
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ DialogUsageManager::forceShutdown(DumShutdownHandler* h)
|
|||
|
||||
void DialogUsageManager::setAppDialogSetFactory(std::unique_ptr<AppDialogSetFactory> factory)
|
||||
{
|
||||
mAppDialogSetFactory = factory;
|
||||
mAppDialogSetFactory = std::move(factory);
|
||||
}
|
||||
|
||||
SharedPtr<MasterProfile>&
|
||||
|
|
@ -320,13 +320,13 @@ void DialogUsageManager::setMasterProfile(const SharedPtr<MasterProfile>& master
|
|||
|
||||
void DialogUsageManager::setKeepAliveManager(std::unique_ptr<KeepAliveManager> manager)
|
||||
{
|
||||
mKeepAliveManager = manager;
|
||||
mKeepAliveManager = std::move(manager);
|
||||
mKeepAliveManager->setDialogUsageManager(this);
|
||||
}
|
||||
|
||||
void DialogUsageManager::setRedirectManager(std::unique_ptr<RedirectManager> manager)
|
||||
{
|
||||
mRedirectManager = manager;
|
||||
mRedirectManager = std::move(manager);
|
||||
}
|
||||
|
||||
void DialogUsageManager::setRedirectHandler(RedirectHandler* handler)
|
||||
|
|
@ -342,7 +342,7 @@ RedirectHandler* DialogUsageManager::getRedirectHandler()
|
|||
void
|
||||
DialogUsageManager::setClientAuthManager(std::unique_ptr<ClientAuthManager> manager)
|
||||
{
|
||||
mClientAuthManager = manager;
|
||||
mClientAuthManager = std::move(manager);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1087,11 +1087,11 @@ void DialogUsageManager::outgoingProcess(unique_ptr<Message> message)
|
|||
!event->message()->header(h_Routes).front().uri().exists(p_lr))
|
||||
{
|
||||
Helper::processStrictRoute(*toSend);
|
||||
sendUsingOutboundIfAppropriate(*userProfile, toSend);
|
||||
sendUsingOutboundIfAppropriate(*userProfile, std::move(toSend));
|
||||
}
|
||||
else
|
||||
{
|
||||
sendUsingOutboundIfAppropriate(*userProfile, toSend);
|
||||
sendUsingOutboundIfAppropriate(*userProfile, std::move(toSend));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1121,12 +1121,12 @@ DialogUsageManager::sendUsingOutboundIfAppropriate(UserProfile& userProfile, uni
|
|||
{
|
||||
DebugLog ( << "Sending with client outbound flow tuple to express outbound" );
|
||||
DebugLog ( << "Flow Tuple: " << userProfile.mClientOutboundFlowTuple << " and key: " << userProfile.mClientOutboundFlowTuple.mFlowKey);
|
||||
mStack.sendTo(msg, userProfile.mClientOutboundFlowTuple, this);
|
||||
mStack.sendTo(std::move(msg), userProfile.mClientOutboundFlowTuple, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugLog ( << "Sending to express outbound w/o flow tuple");
|
||||
mStack.send(msg, this);
|
||||
mStack.send(std::move(msg), this);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1134,12 +1134,12 @@ DialogUsageManager::sendUsingOutboundIfAppropriate(UserProfile& userProfile, uni
|
|||
if(userProfile.clientOutboundEnabled() && userProfile.mClientOutboundFlowTuple.mFlowKey != 0)
|
||||
{
|
||||
DebugLog ( << "Sending to outbound (no express) with flow tuple");
|
||||
mStack.sendTo(msg, userProfile.mClientOutboundFlowTuple, this);
|
||||
mStack.sendTo(std::move(msg), userProfile.mClientOutboundFlowTuple, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugLog ( << "Sending to outbound uri");
|
||||
mStack.sendTo(msg, userProfile.getOutboundProxy().uri(), this);
|
||||
mStack.sendTo(std::move(msg), userProfile.getOutboundProxy().uri(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1148,11 +1148,11 @@ DialogUsageManager::sendUsingOutboundIfAppropriate(UserProfile& userProfile, uni
|
|||
DebugLog (<< "Send: " << msg->brief());
|
||||
if(userProfile.clientOutboundEnabled() && userProfile.mClientOutboundFlowTuple.mFlowKey != 0)
|
||||
{
|
||||
mStack.sendTo(msg, userProfile.mClientOutboundFlowTuple, this);
|
||||
mStack.sendTo(std::move(msg), userProfile.mClientOutboundFlowTuple, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
mStack.send(msg, this);
|
||||
mStack.send(std::move(msg), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1162,7 +1162,7 @@ void
|
|||
DialogUsageManager::end(DialogSetId setid)
|
||||
{
|
||||
DialogSet* ds = findDialogSet(setid);
|
||||
if (ds == 0)
|
||||
if (ds == nullptr)
|
||||
{
|
||||
throw Exception("Request no longer exists", __FILE__, __LINE__);
|
||||
}
|
||||
|
|
@ -1480,7 +1480,7 @@ DialogUsageManager::internalProcess(std::unique_ptr<Message> msg)
|
|||
}
|
||||
}
|
||||
|
||||
incomingProcess(msg);
|
||||
incomingProcess(std::move(msg));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1714,7 +1714,7 @@ DialogUsageManager::process(int timeoutMs, resip::Lockable* mutex)
|
|||
#ifdef RESIP_DUM_THREAD_DEBUG
|
||||
mThreadDebugKey=mHiddenThreadDebugKey;
|
||||
#endif
|
||||
internalProcess(message);
|
||||
internalProcess(std::move(message));
|
||||
#ifdef RESIP_DUM_THREAD_DEBUG
|
||||
// .bwc. Thread checking is disabled if mThreadDebugKey is 0; if the app
|
||||
// is using this mutex-locked process() call, we only enable thread-
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
|
||||
Data getHostAddress();
|
||||
|
||||
void setAppDialogSetFactory(std::auto_ptr<AppDialogSetFactory>);
|
||||
void setAppDialogSetFactory(std::unique_ptr<AppDialogSetFactory>);
|
||||
|
||||
void setMasterProfile(const SharedPtr<MasterProfile>& masterProfile);
|
||||
SharedPtr<MasterProfile>& getMasterProfile();
|
||||
|
|
@ -137,18 +137,18 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
//optional handler to track the progress of DialogSets
|
||||
void setDialogSetHandler(DialogSetHandler* handler);
|
||||
|
||||
void setKeepAliveManager(std::auto_ptr<KeepAliveManager> keepAlive);
|
||||
void setKeepAliveManager(std::unique_ptr<KeepAliveManager> keepAlive);
|
||||
|
||||
//There is a default RedirectManager. Setting one may cause the old one
|
||||
//to be deleted.
|
||||
void setRedirectManager(std::auto_ptr<RedirectManager> redirect);
|
||||
void setRedirectManager(std::unique_ptr<RedirectManager> redirect);
|
||||
//informational, so a RedirectHandler is not required
|
||||
void setRedirectHandler(RedirectHandler* handler);
|
||||
RedirectHandler* getRedirectHandler();
|
||||
|
||||
/// If there is no ClientAuthManager, when the client receives a 401/407,
|
||||
/// pass it up through the normal BaseUsageHandler
|
||||
void setClientAuthManager(std::auto_ptr<ClientAuthManager> client);
|
||||
void setClientAuthManager(std::unique_ptr<ClientAuthManager> client);
|
||||
|
||||
/// If there is no ServerAuthManager, the server does not authenticate requests
|
||||
void setServerAuthManager(resip::SharedPtr<ServerAuthManager> server);
|
||||
|
|
@ -188,7 +188,7 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
/// Sets a manager to handle storage of registration state
|
||||
void setRegistrationPersistenceManager(RegistrationPersistenceManager*);
|
||||
|
||||
void setRemoteCertStore(std::auto_ptr<RemoteCertStore> store);
|
||||
void setRemoteCertStore(std::unique_ptr<RemoteCertStore> store);
|
||||
|
||||
// The message is owned by the underlying datastructure and may go away in
|
||||
// the future. If the caller wants to keep it, it should make a copy. The
|
||||
|
|
@ -338,7 +338,7 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
|
||||
//exposed so DumThread variants can be written
|
||||
Message* getNext(int ms) { return mFifo.getNext(ms); }
|
||||
void internalProcess(std::auto_ptr<Message> msg);
|
||||
void internalProcess(std::unique_ptr<Message> msg);
|
||||
bool messageAvailable(void) { return mFifo.messageAvailable(); }
|
||||
|
||||
void applyToAllClientSubscriptions(ClientSubscriptionFunctor*);
|
||||
|
|
@ -400,9 +400,9 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
{
|
||||
}
|
||||
|
||||
virtual void post(std::auto_ptr<Message> msg)
|
||||
virtual void post(std::unique_ptr<Message> msg)
|
||||
{
|
||||
mDum.incomingProcess(msg);
|
||||
mDum.incomingProcess(std::move(msg));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -413,9 +413,9 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
{
|
||||
}
|
||||
|
||||
virtual void post(std::auto_ptr<Message> msg)
|
||||
virtual void post(std::unique_ptr<Message> msg)
|
||||
{
|
||||
mDum.outgoingProcess(msg);
|
||||
mDum.outgoingProcess(std::move(msg));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -430,7 +430,7 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
// May call a callback to let the app adorn
|
||||
void sendResponse(const SipMessage& response);
|
||||
|
||||
void sendUsingOutboundIfAppropriate(UserProfile& userProfile, std::auto_ptr<SipMessage> msg);
|
||||
void sendUsingOutboundIfAppropriate(UserProfile& userProfile, std::unique_ptr<SipMessage> msg);
|
||||
|
||||
void addTimer(DumTimeout::Type type,
|
||||
unsigned long durationSeconds,
|
||||
|
|
@ -472,8 +472,8 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
bool queueForIdentityCheck(SipMessage* msg);
|
||||
void processIdentityCheckResponse(const HttpGetMessage& msg);
|
||||
|
||||
void incomingProcess(std::auto_ptr<Message> msg);
|
||||
void outgoingProcess(std::auto_ptr<Message> msg);
|
||||
void incomingProcess(std::unique_ptr<Message> msg);
|
||||
void outgoingProcess(std::unique_ptr<Message> msg);
|
||||
void processExternalMessage(ExternalMessageBase* externalMessage);
|
||||
|
||||
// For delayed delete of a Usage
|
||||
|
|
@ -495,9 +495,9 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
|
||||
SharedPtr<MasterProfile> mMasterProfile;
|
||||
SharedPtr<UserProfile> mMasterUserProfile;
|
||||
std::auto_ptr<RedirectManager> mRedirectManager;
|
||||
std::auto_ptr<ClientAuthManager> mClientAuthManager;
|
||||
//std::auto_ptr<ServerAuthManager> mServerAuthManager;
|
||||
std::unique_ptr<RedirectManager> mRedirectManager;
|
||||
std::unique_ptr<ClientAuthManager> mClientAuthManager;
|
||||
//std::unique_ptr<ServerAuthManager> mServerAuthManager;
|
||||
|
||||
InviteSessionHandler* mInviteSessionHandler;
|
||||
ClientRegistrationHandler* mClientRegistrationHandler;
|
||||
|
|
@ -515,7 +515,7 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
std::map<Data, ClientPublicationHandler*> mClientPublicationHandlers;
|
||||
std::map<Data, ServerPublicationHandler*> mServerPublicationHandlers;
|
||||
std::map<MethodTypes, OutOfDialogHandler*> mOutOfDialogHandlers;
|
||||
std::auto_ptr<KeepAliveManager> mKeepAliveManager;
|
||||
std::unique_ptr<KeepAliveManager> mKeepAliveManager;
|
||||
bool mIsDefaultServerReferHandler;
|
||||
|
||||
ClientPagerMessageHandler* mClientPagerMessageHandler;
|
||||
|
|
@ -526,7 +526,7 @@ class DialogUsageManager : public HandleManager, public TransactionUser
|
|||
// server subscription handler for the 'dialog' event...
|
||||
DialogEventStateManager* mDialogEventStateManager;
|
||||
|
||||
std::auto_ptr<AppDialogSetFactory> mAppDialogSetFactory;
|
||||
std::unique_ptr<AppDialogSetFactory> mAppDialogSetFactory;
|
||||
|
||||
SipStack& mStack;
|
||||
DumShutdownHandler* mDumShutdownHandler;
|
||||
|
|
|
|||
|
|
@ -18,5 +18,5 @@ DumFeature::~DumFeature()
|
|||
|
||||
void DumFeature::postCommand(std::unique_ptr<Message> message)
|
||||
{
|
||||
mDum.post(new TargetCommand(mTarget, message));
|
||||
mDum.post(new TargetCommand(mTarget, std::move(message)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class DumFeature
|
|||
// taken ownership of msg until we get a return. If we throw, the
|
||||
// ownership of msg is unknown. This is unacceptable.
|
||||
virtual ProcessingResult process(Message* msg) = 0;
|
||||
virtual void postCommand(std::auto_ptr<Message> message);
|
||||
virtual void postCommand(std::unique_ptr<Message> message);
|
||||
|
||||
protected:
|
||||
DialogUsageManager& mDum;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ DumThread::thread()
|
|||
std::unique_ptr<Message> msg(mDum.mFifo.getNext(1000)); // Only need to wake up to see if we are shutdown
|
||||
if (msg.get())
|
||||
{
|
||||
mDum.internalProcess(msg);
|
||||
mDum.internalProcess(std::move(msg));
|
||||
}
|
||||
}
|
||||
catch (BaseException& e)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Mutex HttpProvider::mMutex;
|
|||
void
|
||||
HttpProvider::setFactory(std::unique_ptr<HttpProviderFactory> fact)
|
||||
{
|
||||
mFactory = fact;
|
||||
mFactory = std::move(fact);
|
||||
}
|
||||
|
||||
HttpProvider*
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class HttpProvider
|
|||
{
|
||||
public:
|
||||
//HttpProvider assumes memory
|
||||
static void setFactory(std::auto_ptr<HttpProviderFactory> fact);
|
||||
static void setFactory(std::unique_ptr<HttpProviderFactory> fact);
|
||||
//ptr so users can check for existence
|
||||
static HttpProvider* instance();
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ class HttpProvider
|
|||
virtual ~HttpProvider(){} //impl. singleton destructor pattern later
|
||||
private:
|
||||
static HttpProvider* mInstance;
|
||||
static std::auto_ptr<HttpProviderFactory> mFactory;
|
||||
static std::unique_ptr<HttpProviderFactory> mFactory;
|
||||
static Mutex mMutex;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ IdentityHandler::queueForIdentityCheck(SipMessage* sipMsg)
|
|||
std::unique_ptr<SecurityAttributes> sec(new SecurityAttributes);
|
||||
sec->setIdentity(sipMsg->header(h_From).uri().getAor());
|
||||
sec->setIdentityStrength(SecurityAttributes::From);
|
||||
sipMsg->setSecurityAttributes(sec);
|
||||
sipMsg->setSecurityAttributes(std::move(sec));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ InviteSession::provideAnswer(const Contents& answer)
|
|||
handleSessionTimerRequest(*mInvite200, *mLastRemoteSessionModification);
|
||||
InviteSession::setOfferAnswer(*mInvite200, answer, 0);
|
||||
mCurrentLocalOfferAnswer = InviteSession::makeOfferAnswer(answer);
|
||||
mCurrentRemoteOfferAnswer = mProposedRemoteOfferAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(mProposedRemoteOfferAnswer);
|
||||
InfoLog (<< "Sending " << mInvite200->brief());
|
||||
DumHelper::setOutgoingEncryptionLevel(*mInvite200, mCurrentEncryptionLevel);
|
||||
send(mInvite200);
|
||||
|
|
@ -578,9 +578,9 @@ InviteSession::provideAnswer(const Contents& answer)
|
|||
SharedPtr<SipMessage> response(new SipMessage);
|
||||
mDialog.makeResponse(*response, *mLastRemoteSessionModification, 200);
|
||||
handleSessionTimerRequest(*response, *mLastRemoteSessionModification);
|
||||
InviteSession::setOfferAnswer(*response, answer, 0);
|
||||
InviteSession::setOfferAnswer(*response, answer, nullptr);
|
||||
mCurrentLocalOfferAnswer = InviteSession::makeOfferAnswer(answer);
|
||||
mCurrentRemoteOfferAnswer = mProposedRemoteOfferAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(mProposedRemoteOfferAnswer);
|
||||
InfoLog (<< "Sending " << response->brief());
|
||||
DumHelper::setOutgoingEncryptionLevel(*response, mCurrentEncryptionLevel);
|
||||
send(response);
|
||||
|
|
@ -591,7 +591,7 @@ InviteSession::provideAnswer(const Contents& answer)
|
|||
transition(Connected);
|
||||
sendAck(&answer);
|
||||
|
||||
mCurrentRemoteOfferAnswer = mProposedRemoteOfferAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(mProposedRemoteOfferAnswer);
|
||||
mCurrentLocalOfferAnswer = InviteSession::makeOfferAnswer(answer);
|
||||
break;
|
||||
|
||||
|
|
@ -840,7 +840,7 @@ InviteSession::targetRefresh(const NameAddr& localUri)
|
|||
void
|
||||
InviteSession::refer(const NameAddr& referTo, bool referSub)
|
||||
{
|
||||
refer(referTo,std::unique_ptr<resip::Contents>(0),referSub);
|
||||
refer(referTo, std::unique_ptr<resip::Contents>(nullptr),referSub);
|
||||
}
|
||||
void
|
||||
InviteSession::refer(const NameAddr& referTo, std::unique_ptr<resip::Contents> contents,bool referSub)
|
||||
|
|
@ -852,7 +852,7 @@ InviteSession::refer(const NameAddr& referTo, std::unique_ptr<resip::Contents> c
|
|||
refer->header(h_ReferTo) = referTo;
|
||||
refer->header(h_ReferredBy) = myAddr();
|
||||
refer->header(h_ReferredBy).remove(p_tag); // tag-param not permitted in rfc3892; not the same as generic-param
|
||||
refer->setContents(contents);
|
||||
refer->setContents(std::move(contents));
|
||||
if (!referSub)
|
||||
{
|
||||
refer->header(h_ReferSub).value() = "false";
|
||||
|
|
@ -938,7 +938,7 @@ InviteSession::referCommand(const NameAddr& referTo, bool referSub)
|
|||
void
|
||||
InviteSession::refer(const NameAddr& referTo, InviteSessionHandle sessionToReplace, bool referSub)
|
||||
{
|
||||
refer(referTo,sessionToReplace,std::unique_ptr<resip::Contents>(0),referSub);
|
||||
refer(referTo,sessionToReplace, std::unique_ptr<resip::Contents>(nullptr),referSub);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -955,13 +955,13 @@ InviteSession::refer(const NameAddr& referTo, InviteSessionHandle sessionToRepla
|
|||
replaces.param(p_toTag) = id.getRemoteTag();
|
||||
replaces.param(p_fromTag) = id.getLocalTag();
|
||||
|
||||
refer(referTo, replaces, contents, referSub);
|
||||
refer(referTo, replaces, std::move(contents), referSub);
|
||||
}
|
||||
|
||||
void
|
||||
InviteSession::refer(const NameAddr& referTo, const CallId& replaces, bool referSub)
|
||||
{
|
||||
refer(referTo,replaces,std::unique_ptr<resip::Contents>(0),referSub);
|
||||
refer(referTo, replaces, std::unique_ptr<resip::Contents>(nullptr), referSub);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -971,7 +971,7 @@ InviteSession::refer(const NameAddr& referTo, const CallId& replaces, std::uniqu
|
|||
{
|
||||
SharedPtr<SipMessage> refer(new SipMessage());
|
||||
mDialog.makeRequest(*refer, REFER);
|
||||
refer->setContents(contents);
|
||||
refer->setContents(std::move(contents));
|
||||
refer->header(h_ReferTo) = referTo;
|
||||
refer->header(h_ReferredBy) = myAddr();
|
||||
refer->header(h_ReferredBy).remove(p_tag);
|
||||
|
|
@ -1381,7 +1381,7 @@ InviteSession::dispatchConnected(const SipMessage& msg)
|
|||
*mLastRemoteSessionModification = msg;
|
||||
transition(ReceivedReinvite);
|
||||
mCurrentEncryptionLevel = getEncryptionLevel(msg);
|
||||
mProposedRemoteOfferAnswer = offerAnswer;
|
||||
mProposedRemoteOfferAnswer = std::move(offerAnswer);
|
||||
|
||||
handler->onOffer(getSessionHandle(), msg, *mProposedRemoteOfferAnswer);
|
||||
break;
|
||||
|
|
@ -1402,7 +1402,7 @@ InviteSession::dispatchConnected(const SipMessage& msg)
|
|||
// See rfc3311 5.2, 4th paragraph.
|
||||
*mLastRemoteSessionModification = msg;
|
||||
mCurrentEncryptionLevel = getEncryptionLevel(msg);
|
||||
mProposedRemoteOfferAnswer = offerAnswer;
|
||||
mProposedRemoteOfferAnswer = std::move(offerAnswer);
|
||||
handler->onOffer(getSessionHandle(), msg, *mProposedRemoteOfferAnswer);
|
||||
break;
|
||||
|
||||
|
|
@ -1466,7 +1466,7 @@ InviteSession::dispatchSentUpdate(const SipMessage& msg)
|
|||
mCurrentEncryptionLevel = getEncryptionLevel(msg);
|
||||
setCurrentLocalOfferAnswer(msg);
|
||||
|
||||
mCurrentRemoteOfferAnswer = offerAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(offerAnswer);
|
||||
handler->onAnswer(getSessionHandle(), msg, *mCurrentRemoteOfferAnswer);
|
||||
}
|
||||
else if(mProposedLocalOfferAnswer.get())
|
||||
|
|
@ -1569,13 +1569,13 @@ InviteSession::dispatchSentReinvite(const SipMessage& msg)
|
|||
|
||||
if (changed)
|
||||
{
|
||||
mCurrentRemoteOfferAnswer = offerAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(offerAnswer);
|
||||
handler->onRemoteAnswerChanged(getSessionHandle(), msg, *mCurrentRemoteOfferAnswer);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mCurrentRemoteOfferAnswer = offerAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(offerAnswer);
|
||||
handler->onAnswer(getSessionHandle(), msg, *mCurrentRemoteOfferAnswer);
|
||||
}
|
||||
|
||||
|
|
@ -1674,7 +1674,7 @@ InviteSession::dispatchSentReinviteNoOffer(const SipMessage& msg)
|
|||
handleSessionTimerResponse(msg);
|
||||
// mLastSessionModification = msg; // ?slg? why are we storing 200's?
|
||||
mCurrentEncryptionLevel = getEncryptionLevel(msg);
|
||||
mProposedRemoteOfferAnswer = offerAnswer;
|
||||
mProposedRemoteOfferAnswer = std::move(offerAnswer);
|
||||
handler->onOffer(getSessionHandle(), msg, *mProposedRemoteOfferAnswer);
|
||||
break;
|
||||
}
|
||||
|
|
@ -1758,7 +1758,7 @@ InviteSession::dispatchReceivedReinviteSentOffer(const SipMessage& msg)
|
|||
case OnAckAnswer:
|
||||
transition(Connected);
|
||||
setCurrentLocalOfferAnswer(msg);
|
||||
mCurrentRemoteOfferAnswer = offerAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(offerAnswer);
|
||||
mCurrentEncryptionLevel = getEncryptionLevel(msg);
|
||||
mCurrentRetransmit200 = 0; // stop the 200 retransmit timer
|
||||
|
||||
|
|
|
|||
|
|
@ -78,13 +78,13 @@ class InviteSession : public DialogUsage
|
|||
|
||||
/** sends a refer request */
|
||||
virtual void refer(const NameAddr& referTo, bool referSub = true);
|
||||
virtual void refer(const NameAddr& referTo, std::auto_ptr<resip::Contents> contents, bool referSub = true);
|
||||
virtual void refer(const NameAddr& referTo, std::unique_ptr<resip::Contents> contents, bool referSub = true);
|
||||
|
||||
/** sends a refer request with a replaces header */
|
||||
virtual void refer(const NameAddr& referTo, InviteSessionHandle sessionToReplace, bool referSub = true);
|
||||
virtual void refer(const NameAddr& referTo, InviteSessionHandle sessionToReplace, std::auto_ptr<resip::Contents> contents, bool referSub = true);
|
||||
virtual void refer(const NameAddr& referTo, InviteSessionHandle sessionToReplace, std::unique_ptr<resip::Contents> contents, bool referSub = true);
|
||||
virtual void refer(const NameAddr& referTo, const CallId& replaces, bool referSub = true);
|
||||
virtual void refer(const NameAddr& referTo, const CallId& replaces, std::auto_ptr<resip::Contents> contents, bool referSub = true);
|
||||
virtual void refer(const NameAddr& referTo, const CallId& replaces, std::unique_ptr<resip::Contents> contents, bool referSub = true);
|
||||
|
||||
/** sends an info request */
|
||||
virtual void info(const Contents& contents);
|
||||
|
|
@ -320,10 +320,10 @@ class InviteSession : public DialogUsage
|
|||
static Data toData(State state);
|
||||
void transition(State target);
|
||||
|
||||
std::auto_ptr<Contents> getOfferAnswer(const SipMessage& msg);
|
||||
std::unique_ptr<Contents> getOfferAnswer(const SipMessage& msg);
|
||||
bool isReliable(const SipMessage& msg);
|
||||
static std::auto_ptr<Contents> makeOfferAnswer(const Contents& offerAnswer);
|
||||
static std::auto_ptr<Contents> makeOfferAnswer(const Contents& offerAnswer, const Contents* alternative);
|
||||
static std::unique_ptr<Contents> makeOfferAnswer(const Contents& offerAnswer);
|
||||
static std::unique_ptr<Contents> makeOfferAnswer(const Contents& offerAnswer, const Contents* alternative);
|
||||
static void setOfferAnswer(SipMessage& msg, const Contents& offerAnswer, const Contents* alternative = 0);
|
||||
static void setOfferAnswer(SipMessage& msg, const Contents* offerAnswer);
|
||||
void provideProposedOffer();
|
||||
|
|
@ -355,11 +355,11 @@ class InviteSession : public DialogUsage
|
|||
NitState mNitState;
|
||||
NitState mServerNitState;
|
||||
|
||||
std::auto_ptr<Contents> mCurrentLocalOfferAnswer;
|
||||
std::auto_ptr<Contents> mProposedLocalOfferAnswer;
|
||||
std::unique_ptr<Contents> mCurrentLocalOfferAnswer;
|
||||
std::unique_ptr<Contents> mProposedLocalOfferAnswer;
|
||||
|
||||
std::auto_ptr<Contents> mCurrentRemoteOfferAnswer;
|
||||
std::auto_ptr<Contents> mProposedRemoteOfferAnswer;
|
||||
std::unique_ptr<Contents> mCurrentRemoteOfferAnswer;
|
||||
std::unique_ptr<Contents> mProposedRemoteOfferAnswer;
|
||||
|
||||
SharedPtr<SipMessage> mLastLocalSessionModification; // last UPDATE or reINVITE sent
|
||||
SharedPtr<SipMessage> mLastRemoteSessionModification; // last UPDATE or reINVITE received
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ InviteSessionCreator::InviteSessionCreator(DialogUsageManager& dum,
|
|||
{
|
||||
initialOffer.reset(initial->clone());
|
||||
}
|
||||
getLastRequest()->setContents(initialOffer);
|
||||
getLastRequest()->setContents(std::move(initialOffer));
|
||||
}
|
||||
//100rel
|
||||
switch(mDum.getMasterProfile()->getUacReliableProvisionalMode())
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace resip
|
|||
class OutgoingEvent : public Message
|
||||
{
|
||||
public:
|
||||
//OutgoingEvent(std::auto_ptr<SipMessage> msg);
|
||||
//OutgoingEvent(std::unique_ptr<SipMessage> msg);
|
||||
OutgoingEvent(SharedPtr<SipMessage> msg);
|
||||
OutgoingEvent(const OutgoingEvent&);
|
||||
~OutgoingEvent();
|
||||
|
|
@ -27,7 +27,7 @@ class OutgoingEvent : public Message
|
|||
virtual EncodeStream& encodeBrief(EncodeStream& strm) const;
|
||||
|
||||
private:
|
||||
//mutable std::auto_ptr<SipMessage> mMessage;
|
||||
//mutable std::unique_ptr<SipMessage> mMessage;
|
||||
SharedPtr<SipMessage> mMessage;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class ClientPagerMessageHandler
|
|||
virtual void onSuccess(ClientPagerMessageHandle, const SipMessage& status)=0;
|
||||
//!kh!
|
||||
// Application could re-page the failed contents or just ingore it.
|
||||
virtual void onFailure(ClientPagerMessageHandle, const SipMessage& status, std::auto_ptr<Contents> contents)=0;
|
||||
virtual void onFailure(ClientPagerMessageHandle, const SipMessage& status, std::unique_ptr<Contents> contents)=0;
|
||||
};
|
||||
|
||||
class ServerPagerMessageHandler
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ class ServerRegistrationHandler
|
|||
*/
|
||||
virtual void asyncUpdateContacts(ServerRegistrationHandle,
|
||||
const Uri& aor,
|
||||
std::auto_ptr<ContactPtrList> modifiedContactList,
|
||||
std::auto_ptr<ContactRecordTransactionLog> transactionLog)
|
||||
std::unique_ptr<ContactPtrList> modifiedContactList,
|
||||
std::unique_ptr<ContactRecordTransactionLog> transactionLog)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ class ServerRegistrationHandler
|
|||
*/
|
||||
virtual void asyncRemoveExpired(ServerRegistrationHandle,
|
||||
const resip::Uri& aor,
|
||||
std::auto_ptr<resip::ContactPtrList> contacts)
|
||||
std::unique_ptr<resip::ContactPtrList> contacts)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ ServerAuthManager::process(Message* msg)
|
|||
else
|
||||
{
|
||||
// challenge is not required, re-instate original message
|
||||
postCommand(unique_ptr<Message>(sipMsg));
|
||||
postCommand(std::move(sipMsg));
|
||||
return FeatureDoneAndEventDone;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -323,13 +323,13 @@ ServerInviteSession::provideAnswer(const Contents& answer)
|
|||
{
|
||||
case UAS_Offer:
|
||||
transition(UAS_OfferProvidedAnswer);
|
||||
mCurrentRemoteOfferAnswer = mProposedRemoteOfferAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(mProposedRemoteOfferAnswer);
|
||||
mCurrentLocalOfferAnswer = InviteSession::makeOfferAnswer(answer);
|
||||
break;
|
||||
|
||||
case UAS_EarlyOffer:
|
||||
transition(UAS_EarlyProvidedAnswer);
|
||||
mCurrentRemoteOfferAnswer = mProposedRemoteOfferAnswer;
|
||||
mCurrentRemoteOfferAnswer = std::move(mProposedRemoteOfferAnswer);
|
||||
mCurrentLocalOfferAnswer = InviteSession::makeOfferAnswer(answer);
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ ServerRegistration::accept(SipMessage& ok)
|
|||
mAsyncLocalStore->releaseLog(log,modifiedContacts);
|
||||
|
||||
mAsyncOkMsg = SharedPtr<SipMessage>(static_cast<SipMessage*>(ok.clone()));
|
||||
mDum.mServerRegistrationHandler->asyncUpdateContacts(getHandle(),mAor,modifiedContacts,log);
|
||||
mDum.mServerRegistrationHandler->asyncUpdateContacts(getHandle(), mAor, std::move(modifiedContacts), std::move(log));
|
||||
//!WARN! Must not access this object beyond this point. The client my call reject() or accept(), deleting this object. Also, watch out for local objects that are still in scope and access this object on destruction.
|
||||
return;
|
||||
}
|
||||
|
|
@ -642,7 +642,7 @@ ServerRegistration::asyncProcessFinalOkMsg(SipMessage &msg, ContactPtrList &cont
|
|||
|
||||
if (expired.get() && expired->size() > 0)
|
||||
{
|
||||
mDum.mServerRegistrationHandler->asyncRemoveExpired(getHandle(),mAor,expired);
|
||||
mDum.mServerRegistrationHandler->asyncRemoveExpired(getHandle(), mAor, std::move(expired));
|
||||
//!WARN! Must not access this object beyond this point. The client my call reject() or accept(), deleting this object. Also, watch out for local objects that are still in scope and access this object on destruction.
|
||||
return;
|
||||
}
|
||||
|
|
@ -684,7 +684,7 @@ ServerRegistration::asyncProvideContacts(std::unique_ptr<resip::ContactPtrList>
|
|||
case asyncStateWaitingForInitialContactList:
|
||||
{
|
||||
assert(mAsyncLocalStore.get() == 0);
|
||||
mAsyncLocalStore = resip::SharedPtr<AsyncLocalStore>(new AsyncLocalStore(contacts));
|
||||
mAsyncLocalStore = resip::SharedPtr<AsyncLocalStore>(new AsyncLocalStore(std::move(contacts)));
|
||||
mAsyncState = asyncStateProcessingRegistration;
|
||||
processRegistration(mRequest);
|
||||
break;
|
||||
|
|
@ -697,7 +697,7 @@ ServerRegistration::asyncProvideContacts(std::unique_ptr<resip::ContactPtrList>
|
|||
case asyncStateAcceptedWaitingForFinalContactList:
|
||||
{
|
||||
mAsyncState = asyncStateProvidedFinalContacts;
|
||||
asyncProcessFinalContacts(contacts);
|
||||
asyncProcessFinalContacts(std::move(contacts));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
@ -734,7 +734,7 @@ ServerRegistration::asyncProcessFinalContacts(std::unique_ptr<resip::ContactPtrL
|
|||
void
|
||||
ServerRegistration::AsyncLocalStore::create(std::unique_ptr<ContactPtrList> originalContacts)
|
||||
{
|
||||
mModifiedContacts = originalContacts;
|
||||
mModifiedContacts = std::move(originalContacts);
|
||||
mLog = std::unique_ptr<ContactRecordTransactionLog>(new ContactRecordTransactionLog());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class ServerRegistration: public NonDialogUsage
|
|||
|
||||
!CAUTION! This function must be called from the DUM thread.
|
||||
*/
|
||||
bool asyncProvideContacts(std::auto_ptr<resip::ContactPtrList> contacts);
|
||||
bool asyncProvideContacts(std::unique_ptr<resip::ContactPtrList> contacts);
|
||||
|
||||
resip::SharedPtr<ContactList> getOriginalContacts() { return mOriginalContacts; } // WARNING - use this only if async mode is not used
|
||||
const ContactList& getRequestContacts() { return mRequestContacts; }
|
||||
|
|
@ -132,7 +132,7 @@ class ServerRegistration: public NonDialogUsage
|
|||
* contact list. Once the final list is received via asyncProvideContacts(), this function finishes the REGISTER
|
||||
* processing.
|
||||
*/
|
||||
void asyncProcessFinalContacts(std::auto_ptr<resip::ContactPtrList> contacts);
|
||||
void asyncProcessFinalContacts(std::unique_ptr<resip::ContactPtrList> contacts);
|
||||
|
||||
/** Local datastore used to aggregate all changes to the current contact list when using the asynchronous logic.
|
||||
*/
|
||||
|
|
@ -140,9 +140,9 @@ class ServerRegistration: public NonDialogUsage
|
|||
{
|
||||
public:
|
||||
|
||||
AsyncLocalStore(std::auto_ptr<ContactPtrList> originalContacts)
|
||||
AsyncLocalStore(std::unique_ptr<ContactPtrList> originalContacts)
|
||||
{
|
||||
create(originalContacts);
|
||||
create(std::move(originalContacts));
|
||||
}
|
||||
|
||||
~AsyncLocalStore(void)
|
||||
|
|
@ -153,7 +153,7 @@ class ServerRegistration: public NonDialogUsage
|
|||
/** Setup this object in preparation for updating the records. Updates occur when processing a REGISTER
|
||||
message.
|
||||
*/
|
||||
void create(std::auto_ptr<ContactPtrList> originalContacts);
|
||||
void create(std::unique_ptr<ContactPtrList> originalContacts);
|
||||
|
||||
void destroy(void);
|
||||
|
||||
|
|
@ -170,16 +170,16 @@ class ServerRegistration: public NonDialogUsage
|
|||
/** Remove the transacation log and updated contact list. This object should be considered destroyed and
|
||||
not used after releasing.
|
||||
*/
|
||||
void releaseLog(std::auto_ptr<ContactRecordTransactionLog> &log, std::auto_ptr<ContactPtrList> &modifiedContacts)
|
||||
void releaseLog(std::unique_ptr<ContactRecordTransactionLog> &log, std::unique_ptr<ContactPtrList> &modifiedContacts)
|
||||
{
|
||||
log = mLog;
|
||||
modifiedContacts = mModifiedContacts;
|
||||
log = std::move(mLog);
|
||||
modifiedContacts = std::move(mModifiedContacts);
|
||||
}
|
||||
|
||||
unsigned int numContacts() { if(mModifiedContacts.get()) return (unsigned int)mModifiedContacts->size(); return 0; }
|
||||
private:
|
||||
std::auto_ptr<ContactRecordTransactionLog> mLog;
|
||||
std::auto_ptr<ContactPtrList> mModifiedContacts;
|
||||
std::unique_ptr<ContactRecordTransactionLog> mLog;
|
||||
std::unique_ptr<ContactPtrList> mModifiedContacts;
|
||||
};
|
||||
|
||||
resip::SharedPtr<AsyncLocalStore> mAsyncLocalStore;
|
||||
|
|
|
|||
|
|
@ -9,19 +9,19 @@ using namespace std;
|
|||
TargetCommand::TargetCommand(Target& target,
|
||||
unique_ptr<Message> message)
|
||||
: mTarget(target),
|
||||
mMessage(message)
|
||||
mMessage(std::move(message))
|
||||
{
|
||||
}
|
||||
|
||||
TargetCommand::TargetCommand(const TargetCommand& from)
|
||||
: mTarget(from.mTarget),
|
||||
mMessage(from.mMessage)
|
||||
mMessage(std::move(from.mMessage))
|
||||
{
|
||||
}
|
||||
|
||||
void TargetCommand::executeCommand()
|
||||
{
|
||||
mTarget.post(mMessage);
|
||||
mTarget.post(std::move(mMessage));
|
||||
}
|
||||
|
||||
Message* TargetCommand::clone() const
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@ class TargetCommand : public DumCommand
|
|||
{
|
||||
}
|
||||
virtual ~Target()=0;
|
||||
virtual void post(std::auto_ptr<Message>)=0;
|
||||
virtual void post(std::unique_ptr<Message>)=0;
|
||||
|
||||
protected:
|
||||
DialogUsageManager& mDum;
|
||||
};
|
||||
|
||||
TargetCommand(Target& target, std::auto_ptr<Message> message);
|
||||
TargetCommand(Target& target, std::unique_ptr<Message> message);
|
||||
TargetCommand(const TargetCommand&);
|
||||
void executeCommand();
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ class TargetCommand : public DumCommand
|
|||
|
||||
private:
|
||||
Target& mTarget;
|
||||
mutable std::auto_ptr<Message> mMessage;
|
||||
mutable std::unique_ptr<Message> mMessage;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ bool EncryptionManager::decrypt(SipMessage* msg)
|
|||
{
|
||||
if (csa.mContents.get())
|
||||
{
|
||||
msg->setContents(csa.mContents);
|
||||
msg->setContents(std::move(csa.mContents));
|
||||
|
||||
if (csa.mAttributes.get())
|
||||
{
|
||||
|
|
@ -298,7 +298,7 @@ bool EncryptionManager::decrypt(SipMessage* msg)
|
|||
{
|
||||
csa.mAttributes->setIdentityStrength(origSecurityAttributes->getIdentityStrength());
|
||||
}
|
||||
msg->setSecurityAttributes(csa.mAttributes);
|
||||
msg->setSecurityAttributes(std::move(csa.mAttributes));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -855,11 +855,11 @@ EncryptionManager::Result EncryptionManager::Decrypt::received(bool success,
|
|||
if (csa.mContents.get())
|
||||
{
|
||||
csa.mContents->checkParsed();
|
||||
mMsgToDecrypt->setContents(csa.mContents);
|
||||
mMsgToDecrypt->setContents(std::move(csa.mContents));
|
||||
|
||||
if (csa.mAttributes.get())
|
||||
{
|
||||
mMsgToDecrypt->setSecurityAttributes(csa.mAttributes);
|
||||
mMsgToDecrypt->setSecurityAttributes(std::move(csa.mAttributes));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1129,7 +1129,7 @@ Helper::ContentsSecAttrs EncryptionManager::Decrypt::getContents(SipMessage* mes
|
|||
|
||||
std::unique_ptr<Contents> c(contents);
|
||||
std::unique_ptr<SecurityAttributes> a(attr);
|
||||
return Helper::ContentsSecAttrs(c, a);
|
||||
return Helper::ContentsSecAttrs(std::move(c), std::move(a));
|
||||
}
|
||||
|
||||
Contents* EncryptionManager::Decrypt::getContentsRecurse(Contents** tree,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class EncryptionManager : public DumFeature
|
|||
|
||||
EncryptionManager(DialogUsageManager& dum, TargetCommand::Target& target);
|
||||
virtual ~EncryptionManager();
|
||||
void setRemoteCertStore(std::auto_ptr<RemoteCertStore> store);
|
||||
void setRemoteCertStore(std::unique_ptr<RemoteCertStore> store);
|
||||
virtual DumFeature::ProcessingResult process(Message* msg);
|
||||
|
||||
private:
|
||||
|
|
@ -143,7 +143,7 @@ class EncryptionManager : public DumFeature
|
|||
bool mMessageTaken;
|
||||
};
|
||||
|
||||
std::auto_ptr<RemoteCertStore> mRemoteCertStore;
|
||||
std::unique_ptr<RemoteCertStore> mRemoteCertStore;
|
||||
|
||||
typedef std::list<Request*> RequestList;
|
||||
RequestList mRequests;
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ private:
|
|||
resip::InviteSessionHandle mDestInviteSessionHandle;
|
||||
};
|
||||
PendingRequest mPendingRequest;
|
||||
std::auto_ptr<resip::SdpContents> mPendingOffer;
|
||||
std::unique_ptr<resip::SdpContents> mPendingOffer;
|
||||
|
||||
sdpcontainer::Sdp* mLocalSdp;
|
||||
sdpcontainer::Sdp* mRemoteSdp;
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ public:
|
|||
void processMediaStreamErrorEvent(unsigned int errorCode);
|
||||
|
||||
void sendInvite(resip::SharedPtr<resip::SipMessage> invite);
|
||||
void provideOffer(std::auto_ptr<resip::SdpContents> offer, resip::InviteSessionHandle& inviteSessionHandle, bool postOfferAccept);
|
||||
void provideAnswer(std::auto_ptr<resip::SdpContents> answer, resip::InviteSessionHandle& inviteSessionHandle, bool postAnswerAccept, bool postAnswerAlert);
|
||||
void provideOffer(std::unique_ptr<resip::SdpContents> offer, resip::InviteSessionHandle& inviteSessionHandle, bool postOfferAccept);
|
||||
void provideAnswer(std::unique_ptr<resip::SdpContents> answer, resip::InviteSessionHandle& inviteSessionHandle, bool postAnswerAccept, bool postAnswerAlert);
|
||||
void accept(resip::InviteSessionHandle& inviteSessionHandle);
|
||||
ConversationProfile::SecureMediaMode getSecureMediaMode() { return mSecureMediaMode; }
|
||||
flowmanager::MediaStream::SrtpCryptoSuite getSrtpCryptoSuite() { return mSrtpCryptoSuite; }
|
||||
|
|
@ -123,13 +123,13 @@ private:
|
|||
public:
|
||||
PendingOfferAnswer() {}
|
||||
bool mOffer;
|
||||
std::auto_ptr<resip::SdpContents> mSdp;
|
||||
std::unique_ptr<resip::SdpContents> mSdp;
|
||||
resip::InviteSessionHandle mInviteSessionHandle;
|
||||
bool mPostOfferAnswerAccept;
|
||||
bool mPostAnswerAlert;
|
||||
};
|
||||
PendingOfferAnswer mPendingOfferAnswer;
|
||||
void doProvideOfferAnswer(bool offer, std::auto_ptr<resip::SdpContents> sdp, resip::InviteSessionHandle& inviteSessionHandle, bool postOfferAnswerAccept, bool postAnswerAlert);
|
||||
void doProvideOfferAnswer(bool offer, std::unique_ptr<resip::SdpContents> sdp, resip::InviteSessionHandle& inviteSessionHandle, bool postOfferAnswerAccept, bool postAnswerAlert);
|
||||
sdpcontainer::Sdp* mProposedSdp; // stored here vs RemoteParticipant, since each forked leg needs access to the original offer
|
||||
|
||||
// Secure Media
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ ConnectionBase::preparseNewBytes(int bytesRead)
|
|||
std::unique_ptr<SendData> tryLater(transport()->make503(*mMessage, expectedWait/1000));
|
||||
if(tryLater.get())
|
||||
{
|
||||
transport()->send(tryLater);
|
||||
transport()->send(std::move(tryLater));
|
||||
}
|
||||
delete mMessage; // dropping message due to congestion
|
||||
mMessage = 0;
|
||||
|
|
@ -481,7 +481,7 @@ ConnectionBase::preparseNewBytes(int bytesRead)
|
|||
std::unique_ptr<SendData> tryLater = transport()->make503(*mMessage, expectedWait/1000);
|
||||
if(tryLater.get())
|
||||
{
|
||||
transport()->send(tryLater);
|
||||
transport()->send(std::move(tryLater));
|
||||
}
|
||||
delete mMessage; // dropping message due to congestion
|
||||
mMessage = 0;
|
||||
|
|
|
|||
|
|
@ -1860,21 +1860,21 @@ Helper::fromGruuUserPart(const Data& gruuUserPart,
|
|||
}
|
||||
#endif
|
||||
Helper::ContentsSecAttrs::ContentsSecAttrs()
|
||||
: mContents(0),
|
||||
mAttributes(0)
|
||||
: mContents(nullptr),
|
||||
mAttributes(nullptr)
|
||||
{}
|
||||
|
||||
Helper::ContentsSecAttrs::ContentsSecAttrs(std::unique_ptr<Contents> contents,
|
||||
std::unique_ptr<SecurityAttributes> attributes)
|
||||
: mContents(contents),
|
||||
mAttributes(attributes)
|
||||
: mContents(std::move(contents)),
|
||||
mAttributes(std::move(attributes))
|
||||
{}
|
||||
|
||||
// !!bwc!! Yikes! Destructive copy c'tor! Are we _sure_ this is the
|
||||
// intended behavior?
|
||||
Helper::ContentsSecAttrs::ContentsSecAttrs(const ContentsSecAttrs& rhs)
|
||||
: mContents(rhs.mContents),
|
||||
mAttributes(rhs.mAttributes)
|
||||
: mContents(std::move(rhs.mContents)),
|
||||
mAttributes(std::move(rhs.mAttributes))
|
||||
{}
|
||||
|
||||
Helper::ContentsSecAttrs&
|
||||
|
|
@ -1884,8 +1884,8 @@ Helper::ContentsSecAttrs::operator=(const ContentsSecAttrs& rhs)
|
|||
{
|
||||
// !!bwc!! Yikes! Destructive assignment operator! Are we _sure_ this is
|
||||
// the intended behavior?
|
||||
mContents = rhs.mContents;
|
||||
mAttributes = rhs.mAttributes;
|
||||
mContents = std::move(rhs.mContents);
|
||||
mAttributes = std::move(rhs.mAttributes);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -1992,7 +1992,7 @@ Helper::extractFromPkcs7(const SipMessage& message,
|
|||
}
|
||||
std::unique_ptr<Contents> c(b);
|
||||
std::unique_ptr<SecurityAttributes> a(attr);
|
||||
return ContentsSecAttrs(c, a);
|
||||
return ContentsSecAttrs(std::move(c), std::move(a));
|
||||
}
|
||||
|
||||
Helper::FailureMessageEffect
|
||||
|
|
@ -2176,7 +2176,7 @@ unique_ptr<SdpContents> Helper::getSdp(Contents* tree)
|
|||
}
|
||||
|
||||
//DebugLog(<< "No sdp" << endl);
|
||||
return emptysdp;
|
||||
return std::unique_ptr<SdpContents>();
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -526,12 +526,12 @@ class Helper
|
|||
struct ContentsSecAttrs
|
||||
{
|
||||
ContentsSecAttrs();
|
||||
ContentsSecAttrs(std::auto_ptr<Contents> contents,
|
||||
std::auto_ptr<SecurityAttributes> attributes);
|
||||
ContentsSecAttrs(std::unique_ptr<Contents> contents,
|
||||
std::unique_ptr<SecurityAttributes> attributes);
|
||||
ContentsSecAttrs(const ContentsSecAttrs& rhs);
|
||||
ContentsSecAttrs& operator=(const ContentsSecAttrs& rhs);
|
||||
mutable std::auto_ptr<Contents> mContents;
|
||||
mutable std::auto_ptr<SecurityAttributes> mAttributes;
|
||||
mutable std::unique_ptr<Contents> mContents;
|
||||
mutable std::unique_ptr<SecurityAttributes> mAttributes;
|
||||
};
|
||||
|
||||
static ContentsSecAttrs extractFromPkcs7(const SipMessage& message, Security& security);
|
||||
|
|
@ -544,7 +544,7 @@ class Helper
|
|||
|
||||
// Just simply walk the contents tree and return the first SdpContents in
|
||||
// the tree.
|
||||
static std::auto_ptr<SdpContents> getSdp(Contents* tree);
|
||||
static std::unique_ptr<SdpContents> getSdp(Contents* tree);
|
||||
|
||||
/** Looks at SIP headers and message source for a mismatch to make an
|
||||
assumption that the sender is behind a NAT device.
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public:
|
|||
|
||||
// used for statistics
|
||||
virtual unsigned int getFifoSize() const;
|
||||
virtual void send(std::auto_ptr<SendData> data);
|
||||
virtual void send(std::unique_ptr<SendData> data);
|
||||
virtual void poke();
|
||||
|
||||
// .bwc. This needs to be overridden if this transport runs in its own
|
||||
|
|
|
|||
|
|
@ -1024,20 +1024,20 @@ SipMessage::setContents(const Contents* contents)
|
|||
}
|
||||
else
|
||||
{
|
||||
setContents(unique_ptr<Contents>(0));
|
||||
setContents(unique_ptr<Contents>(nullptr));
|
||||
}
|
||||
}
|
||||
|
||||
Contents*
|
||||
SipMessage::getContents() const
|
||||
{
|
||||
if (mContents == 0 && mContentsHfv.getBuffer() != 0)
|
||||
if (mContents == nullptr && mContentsHfv.getBuffer() != nullptr)
|
||||
{
|
||||
if (empty(h_ContentType) ||
|
||||
!const_header(h_ContentType).isWellFormed())
|
||||
{
|
||||
StackLog(<< "SipMessage::getContents: ContentType header does not exist - implies no contents");
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
DebugLog(<< "SipMessage::getContents: "
|
||||
<< const_header(h_ContentType).type()
|
||||
|
|
@ -1087,12 +1087,12 @@ SipMessage::releaseContents()
|
|||
{
|
||||
Contents* c=getContents();
|
||||
// .bwc. unique_ptr owns the Contents. No other references allowed!
|
||||
unique_ptr<Contents> ret(c ? c->clone() : 0);
|
||||
setContents(std::unique_ptr<Contents>(0));
|
||||
unique_ptr<Contents> ret(c ? c->clone() : nullptr);
|
||||
setContents(std::unique_ptr<Contents>(nullptr));
|
||||
|
||||
if (ret.get() != 0 && !ret->isWellFormed())
|
||||
{
|
||||
ret.reset(0);
|
||||
ret.reset(nullptr);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
@ -1108,7 +1108,7 @@ SipMessage::header(const ExtensionHeader& headerName) const
|
|||
if (isEqualNoCase(i->first, headerName.getName()))
|
||||
{
|
||||
HeaderFieldValueList* hfvs = i->second;
|
||||
if (hfvs->getParserContainer() == 0)
|
||||
if (hfvs->getParserContainer() == nullptr)
|
||||
{
|
||||
SipMessage* nc_this(const_cast<SipMessage*>(this));
|
||||
hfvs->setParserContainer(nc_this->makeParserContainer<StringCategory>(hfvs, Headers::RESIP_DO_NOT_USE));
|
||||
|
|
@ -1694,7 +1694,7 @@ SipMessage::mergeUri(const Uri& source)
|
|||
void
|
||||
SipMessage::setSecurityAttributes(unique_ptr<SecurityAttributes> sec)
|
||||
{
|
||||
mSecurityAttributes = sec;
|
||||
mSecurityAttributes = std::move(sec);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1746,7 +1746,7 @@ SipMessage::copyOutboundDecoratorsToStackCancel(SipMessage& cancel)
|
|||
{
|
||||
if((*i)->copyToStackCancels())
|
||||
{
|
||||
cancel.addOutboundDecorator(*(new unique_ptr<MessageDecorator>((*i)->clone())));
|
||||
cancel.addOutboundDecorator(std::move(*(new unique_ptr<MessageDecorator>((*i)->clone()))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1760,7 +1760,7 @@ SipMessage::copyOutboundDecoratorsToStackFailureAck(SipMessage& ack)
|
|||
{
|
||||
if((*i)->copyToStackFailureAcks())
|
||||
{
|
||||
ack.addOutboundDecorator(*(new unique_ptr<MessageDecorator>((*i)->clone())));
|
||||
ack.addOutboundDecorator(std::move(*(new unique_ptr<MessageDecorator>((*i)->clone()))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ SipStack::addTransport(std::unique_ptr<Transport> transport)
|
|||
}
|
||||
}
|
||||
mPorts.insert(transport->port());
|
||||
mTransactionController->transportSelector().addTransport(transport,true);
|
||||
mTransactionController->transportSelector().addTransport(std::move(transport), true);
|
||||
}
|
||||
|
||||
Fifo<TransactionMessage>&
|
||||
|
|
@ -682,7 +682,7 @@ SipStack::post(std::unique_ptr<ApplicationMessage> message,
|
|||
unsigned int secondsLater,
|
||||
TransactionUser* tu)
|
||||
{
|
||||
postMS(message, secondsLater*1000, tu);
|
||||
postMS(std::move(message), secondsLater*1000, tu);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ class SipStack : public FdSetIOObserver
|
|||
@param transport Pointer to an externally created transport. SipStack
|
||||
assumes ownership.
|
||||
*/
|
||||
void addTransport( std::auto_ptr<Transport> transport);
|
||||
void addTransport( std::unique_ptr<Transport> transport);
|
||||
|
||||
/**
|
||||
Returns the fifo that subclasses of Transport should use for the rxFifo
|
||||
|
|
@ -397,14 +397,14 @@ class SipStack : public FdSetIOObserver
|
|||
*/
|
||||
void send(const SipMessage& msg, TransactionUser* tu=0);
|
||||
|
||||
void send(std::auto_ptr<SipMessage> msg, TransactionUser* tu = 0);
|
||||
void send(std::unique_ptr<SipMessage> msg, TransactionUser* tu = 0);
|
||||
|
||||
/** @brief this is only if you want to send to a destination not in the route.
|
||||
@note You probably don't want to use it. */
|
||||
void sendTo(std::auto_ptr<SipMessage> msg, const Uri& uri, TransactionUser* tu=0);
|
||||
void sendTo(std::unique_ptr<SipMessage> msg, const Uri& uri, TransactionUser* tu=0);
|
||||
/** @brief this is only if you want to send to a destination not in the route.
|
||||
@note You probably don't want to use it. */
|
||||
void sendTo(std::auto_ptr<SipMessage> msg, const Tuple& tuple, TransactionUser* tu=0);
|
||||
void sendTo(std::unique_ptr<SipMessage> msg, const Tuple& tuple, TransactionUser* tu=0);
|
||||
|
||||
/**
|
||||
@brief send a message to a destination not in the route
|
||||
|
|
@ -468,7 +468,7 @@ class SipStack : public FdSetIOObserver
|
|||
|
||||
@param tu TransactionUser to post to.
|
||||
*/
|
||||
void post(std::auto_ptr<ApplicationMessage> message,
|
||||
void post(std::unique_ptr<ApplicationMessage> message,
|
||||
unsigned int secondsLater,
|
||||
TransactionUser* tu=0);
|
||||
|
||||
|
|
@ -484,7 +484,7 @@ class SipStack : public FdSetIOObserver
|
|||
|
||||
@param tu TransactionUser to post to.
|
||||
*/
|
||||
void postMS(const std::auto_ptr<ApplicationMessage> message,
|
||||
void postMS(const std::unique_ptr<ApplicationMessage> message,
|
||||
unsigned int ms,
|
||||
TransactionUser* tu=0);
|
||||
|
||||
|
|
@ -495,7 +495,7 @@ class SipStack : public FdSetIOObserver
|
|||
|
||||
@param message ApplicationMessage to post
|
||||
*/
|
||||
void post(std::auto_ptr<ApplicationMessage> message);
|
||||
void post(std::unique_ptr<ApplicationMessage> message);
|
||||
|
||||
/**
|
||||
@brief Makes the message available to the TU later
|
||||
|
|
@ -1050,7 +1050,7 @@ class SipStack : public FdSetIOObserver
|
|||
|
||||
/** @brief All aspects of the Transaction State Machine / DNS resolver **/
|
||||
TransactionController* mTransactionController;
|
||||
std::auto_ptr<ProducerFifoBuffer<TransactionMessage> > mStateMacFifoBuffer;
|
||||
std::unique_ptr<ProducerFifoBuffer<TransactionMessage> > mStateMacFifoBuffer;
|
||||
|
||||
TransactionControllerThread* mTransactionControllerThread;
|
||||
TransportSelectorThread* mTransportSelectorThread;
|
||||
|
|
|
|||
|
|
@ -161,9 +161,9 @@ class TransactionState : public DnsHandler
|
|||
Tuple mResponseTarget; // used to reply to requests
|
||||
|
||||
// used when the DnsResult moves to another transport on failure. Only
|
||||
// used for outgoing stateful, so auto_ptr for space efficiency.
|
||||
std::auto_ptr<NameAddr> mOriginalContact;
|
||||
std::auto_ptr<Via> mOriginalVia;
|
||||
// used for outgoing stateful, so unique_ptr for space efficiency.
|
||||
std::unique_ptr<NameAddr> mOriginalContact;
|
||||
std::unique_ptr<Via> mOriginalVia;
|
||||
|
||||
const Data mId;
|
||||
const MethodTypes mMethod;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class Transport : public FdSetIOObserver
|
|||
*/
|
||||
virtual bool isFinished() const=0;
|
||||
|
||||
std::auto_ptr<SendData> makeSendData( const Tuple& tuple, const Data& data, const Data& tid, const Data &sigcompId = Data::Empty);
|
||||
std::unique_ptr<SendData> makeSendData( const Tuple& tuple, const Data& data, const Data& tid, const Data &sigcompId = Data::Empty);
|
||||
|
||||
/**
|
||||
@todo !bwc! What we do with a SendData is flexible. It might make a
|
||||
|
|
@ -154,7 +154,7 @@ class Transport : public FdSetIOObserver
|
|||
@todo !bch! Should this be protected and not public?
|
||||
!bwc! TransportSelector uses this directly for retransmissions.
|
||||
*/
|
||||
virtual void send(std::auto_ptr<SendData> data)=0;
|
||||
virtual void send(std::unique_ptr<SendData> data)=0;
|
||||
|
||||
/**
|
||||
Called when a writer is done adding messages to the TxFifo; this is
|
||||
|
|
@ -263,10 +263,10 @@ class Transport : public FdSetIOObserver
|
|||
void makeFailedResponse(const SipMessage& msg,
|
||||
int responseCode = 400,
|
||||
const char * warning = 0);
|
||||
std::auto_ptr<SendData> make503(SipMessage& msg,
|
||||
std::unique_ptr<SendData> make503(SipMessage& msg,
|
||||
UInt16 retryAfter);
|
||||
|
||||
std::auto_ptr<SendData> make100(SipMessage& msg);
|
||||
std::unique_ptr<SendData> make100(SipMessage& msg);
|
||||
void setRemoteSigcompId(SipMessage&msg, Data& id);
|
||||
// mark the received= and rport parameters if necessary
|
||||
static void stampReceived(SipMessage* request);
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ TransportSelector::addTransport(std::unique_ptr<Transport> autoTransport,
|
|||
{
|
||||
if(immediate)
|
||||
{
|
||||
addTransportInternal(autoTransport);
|
||||
addTransportInternal(std::move(autoTransport));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -373,7 +373,7 @@ TransportSelector::checkTransportAddQueue()
|
|||
std::unique_ptr<Transport> t(mTransportsToAdd.getNext(-1));
|
||||
while(t.get())
|
||||
{
|
||||
addTransportInternal(t);
|
||||
addTransportInternal(std::move(t));
|
||||
t.reset(mTransportsToAdd.getNext(0));
|
||||
}
|
||||
}
|
||||
|
|
@ -1166,7 +1166,7 @@ TransportSelector::transmit(SipMessage* msg, Tuple& target, SendData* sendData)
|
|||
*sendData = *send;
|
||||
}
|
||||
|
||||
transport->send(send);
|
||||
transport->send(std::move(send));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class TransportSelector
|
|||
/// Causes transport process loops to be interrupted if there is stuff in
|
||||
/// their transmit fifos.
|
||||
void poke();
|
||||
void addTransport( std::auto_ptr<Transport> transport, bool immediate);
|
||||
void addTransport( std::unique_ptr<Transport> transport, bool immediate);
|
||||
|
||||
DnsResult* createDnsResult(DnsHandler* handler);
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ class TransportSelector
|
|||
}
|
||||
|
||||
private:
|
||||
void addTransportInternal( std::auto_ptr<Transport> transport);
|
||||
void addTransportInternal( std::unique_ptr<Transport> transport);
|
||||
void checkTransportAddQueue();
|
||||
Connection* findConnection(const Tuple& dest) const;
|
||||
Transport* findTransportBySource(Tuple& src, const SipMessage* msg) const;
|
||||
|
|
@ -244,7 +244,7 @@ class TransportSelector
|
|||
|
||||
int mAvgBufferSize;
|
||||
Fifo<Transport> mTransportsToAdd;
|
||||
std::auto_ptr<SelectInterruptor> mSelectInterruptor;
|
||||
std::unique_ptr<SelectInterruptor> mSelectInterruptor;
|
||||
FdPollItemHandle mInterruptorHandle;
|
||||
|
||||
friend class TestTransportSelector;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class TransportSelectorThread : public ThreadIf
|
|||
|
||||
protected:
|
||||
TransportSelector& mSelector;
|
||||
std::auto_ptr<FdPollGrp> mPollGrp;
|
||||
std::unique_ptr<FdPollGrp> mPollGrp;
|
||||
|
||||
}; // class TransportSelectorThread
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class TransportThread : public ThreadIf
|
|||
|
||||
protected:
|
||||
Transport& mTransport;
|
||||
std::auto_ptr<FdPollGrp> mPollGrp;
|
||||
std::unique_ptr<FdPollGrp> mPollGrp;
|
||||
}; // class TransportThread
|
||||
|
||||
} // namespace resip
|
||||
|
|
|
|||
|
|
@ -599,12 +599,12 @@ UdpTransport::processRxParse(char *buffer, int len, Tuple& sender)
|
|||
if(mExternalUnknownDatagramHandler)
|
||||
{
|
||||
unique_ptr<Data> datagram(new Data(buffer,len));
|
||||
(*mExternalUnknownDatagramHandler)(this,sender,datagram);
|
||||
(*mExternalUnknownDatagramHandler)(this,sender, std::move(datagram));
|
||||
}
|
||||
|
||||
// Idea: consider backing buffer out of message and letting caller reuse it
|
||||
delete message;
|
||||
message=0;
|
||||
message = nullptr;
|
||||
return origBufferConsumed;
|
||||
}
|
||||
|
||||
|
|
@ -643,10 +643,10 @@ UdpTransport::processRxParse(char *buffer, int len, Tuple& sender)
|
|||
std::unique_ptr<SendData> tryLater(make503(*message, getExpectedWaitForIncoming()/1000));
|
||||
if(tryLater.get())
|
||||
{
|
||||
send(tryLater);
|
||||
send(std::move(tryLater));
|
||||
}
|
||||
delete message; // dropping message due to congestion
|
||||
message = 0;
|
||||
message = nullptr;
|
||||
return origBufferConsumed;
|
||||
}
|
||||
|
||||
|
|
@ -654,7 +654,7 @@ UdpTransport::processRxParse(char *buffer, int len, Tuple& sender)
|
|||
{
|
||||
delete message; // cannot use it, so, punt on it...
|
||||
// basicCheck queued any response required
|
||||
message = 0;
|
||||
message = nullptr;
|
||||
return origBufferConsumed;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public:
|
|||
* @param transport contains a pointer to the specific UdpTransport object that
|
||||
* received the unknown packet.
|
||||
* @param unknownDatagram contains the actual contents of unknown data received. */
|
||||
virtual void operator()(UdpTransport* transport, const Tuple& source, std::auto_ptr<Data> unknownDatagram) = 0;
|
||||
virtual void operator()(UdpTransport* transport, const Tuple& source, std::unique_ptr<Data> unknownDatagram) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1903,7 +1903,7 @@ BaseSecurity::checkAndSetIdentity(SipMessage& msg, const Data& certDer) const
|
|||
sec->setIdentity(msg.const_header(h_From).uri().getAor());
|
||||
sec->setIdentityStrength(SecurityAttributes::FailedIdentity);
|
||||
}
|
||||
msg.setSecurityAttributes(sec);
|
||||
msg.setSecurityAttributes(std::move(sec));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
Boost.org
|
||||
*/
|
||||
|
||||
#include <memory> // std::auto_ptr, std::allocator
|
||||
#include <memory> // std::unique_ptr, std::allocator
|
||||
#include <functional> // std::less
|
||||
#include <exception> // std::exception
|
||||
#include <new> // std::bad_alloc
|
||||
|
|
@ -239,9 +239,9 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
// auto_ptr<Y> is special cased to provide the strong guarantee
|
||||
// unique_ptr<Y> is special cased to provide the strong guarantee
|
||||
template<class Y>
|
||||
explicit shared_count(std::auto_ptr<Y> & r): pi_(new sp_counted_base_impl< Y *, checked_deleter<Y> >(r.get(), checked_deleter<Y>()))
|
||||
explicit shared_count(std::unique_ptr<Y> & r): pi_(new sp_counted_base_impl< Y *, checked_deleter<Y> >(r.get(), checked_deleter<Y>()))
|
||||
{
|
||||
r.release();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
#include "rutil/SharedCount.hxx"
|
||||
#include <memory> // for std::auto_ptr
|
||||
#include <memory> // for std::unique_ptr
|
||||
#include <algorithm> // for std::swap
|
||||
#include <functional> // for std::less
|
||||
#include <typeinfo> // for std::bad_cast
|
||||
|
|
@ -151,7 +151,7 @@ public:
|
|||
}
|
||||
|
||||
template<class Y>
|
||||
explicit SharedPtr(std::auto_ptr<Y> & r): px(r.get()), pn()
|
||||
explicit SharedPtr(std::unique_ptr<Y> & r): px(r.get()), pn()
|
||||
{
|
||||
Y * tmp = r.get();
|
||||
pn = shared_count(r);
|
||||
|
|
@ -167,7 +167,7 @@ public:
|
|||
}
|
||||
|
||||
template<class Y>
|
||||
SharedPtr & operator=(std::auto_ptr<Y> & r)
|
||||
SharedPtr & operator=(std::unique_ptr<Y> & r)
|
||||
{
|
||||
this_type(r).swap(*this);
|
||||
return *this;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class DnsThread : public ThreadIf
|
|||
|
||||
protected:
|
||||
DnsStub& mDnsStub;
|
||||
std::auto_ptr<FdPollGrp> mPollGrp;
|
||||
std::unique_ptr<FdPollGrp> mPollGrp;
|
||||
}; // class DnsThread
|
||||
|
||||
} // namespace resip
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class SHA1Buffer : public std::streambuf
|
|||
// this adds overhead, two additional new/delete.
|
||||
// could get rid of the overhead if, sizeof(SHA_CTX) and SHA_DIGEST_LENGTH are known and FIXED.
|
||||
// could use pimpl to get rid of one new/delete pair.
|
||||
std::auto_ptr<SHA_CTX> mContext;
|
||||
std::unique_ptr<SHA_CTX> mContext;
|
||||
std::vector<char> mBuf;
|
||||
bool mBlown;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue