Commit 9b42b6f8 authored by François Grisez's avatar François Grisez

Remove all thow derectives (deprecated since C++11)

parent 5f695f5f
......@@ -559,7 +559,7 @@ ConfigBoolean::ConfigBoolean(const string &name, const string &help, const strin
: ConfigValue(name, Boolean, help, default_value, oid_index) {
}
bool ConfigBoolean::parse(const string &value)throw (FlexisipException){
bool ConfigBoolean::parse(const string &value) {
if (value == "true" || value == "1")
return true;
else if (value == "false" || value == "0")
......
......@@ -446,7 +446,7 @@ class ConfigValue : public GenericEntry {
class ConfigBoolean : public ConfigValue {
public:
static bool parse(const std::string &value) throw (FlexisipException);
static bool parse(const std::string &value);
ConfigBoolean(const std::string &name, const std::string &help, const std::string &default_value, oid oid_index);
bool read() const;
bool readNext() const;
......
......@@ -47,7 +47,7 @@ long BooleanExpression::ptr() {
}
#ifndef NO_SOFIA
bool BooleanExpression::eval(const sip_t *sip) throw(FlexisipException) {
bool BooleanExpression::eval(const sip_t *sip) {
bool result;
try {
SipAttributes attr(sip);
......
......@@ -40,7 +40,7 @@ class BooleanExpression {
public:
#ifndef NO_SOFIA
bool eval(const sip_t *sip) throw(FlexisipException);
bool eval(const sip_t *sip);
#endif
virtual bool eval(const SipAttributes *args) = 0;
virtual ~BooleanExpression();
......
......@@ -37,8 +37,8 @@ class MediaRelay : public Module, protected ModuleToolbox {
~MediaRelay();
virtual void onLoad(const GenericStruct *modconf);
virtual void onUnload();
virtual void onRequest(std::shared_ptr<RequestSipEvent> &ev) throw (FlexisipException);
virtual void onResponse(std::shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException);
virtual void onRequest(std::shared_ptr<RequestSipEvent> &ev);
virtual void onResponse(std::shared_ptr<ResponseSipEvent> &ev);
virtual void onIdle();
protected:
......
......@@ -619,7 +619,7 @@ public:
return false;
}
void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException) {
void onRequest(shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
sip_p_preferred_identity_t *ppi = NULL;
......@@ -712,7 +712,7 @@ public:
ev->suspendProcessing();
}
}
void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException){
void onResponse(shared_ptr<ResponseSipEvent> &ev) {
if (!mNewAuthOn407)
return; /*nop*/
......
......@@ -45,7 +45,7 @@ class ContactRouteInserter : public Module {
mContactMasquerader = unique_ptr<ContactMasquerader>(new ContactMasquerader(mAgent, mCtRtParamName));
}
void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException) {
void onRequest(shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
const sip_method_t rq_method = sip->sip_request->rq_method;
......@@ -73,7 +73,7 @@ class ContactRouteInserter : public Module {
}
}
}
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException){
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
if (mMasqueradeInvites &&
......
......@@ -271,7 +271,7 @@ class DoSProtection : public Module, ModuleToolbox {
su_timer_set_interval(ctx->timer, invokeLambdaFromSofiaTimerCallback, ctx, mBanTime * 60 * 1000);
}
void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException) {
void onRequest(shared_ptr<RequestSipEvent> &ev) {
shared_ptr<tport_t> inTport = ev->getIncomingTport();
tport_t *tport = inTport.get();
......@@ -360,7 +360,7 @@ class DoSProtection : public Module, ModuleToolbox {
}
}
void onResponse(std::shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException){
void onResponse(std::shared_ptr<ResponseSipEvent> &ev) {
};
......
......@@ -37,8 +37,8 @@ class ForwardModule : public Module, ModuleToolbox {
ForwardModule(Agent *ag);
virtual void onDeclare(GenericStruct *module_config);
virtual void onLoad(const GenericStruct *root);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev);
~ForwardModule();
void sendRequest(shared_ptr<RequestSipEvent> &ev, url_t *dest);
......@@ -206,7 +206,7 @@ public:
shared_ptr<RequestSipEvent> mEv;
};
void ForwardModule::onRequest(shared_ptr<RequestSipEvent> &ev) throw(FlexisipException) {
void ForwardModule::onRequest(shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
url_t *dest = NULL;
......@@ -373,7 +373,7 @@ bool ForwardModule::isLooping(shared_ptr<RequestSipEvent> &ev, const char *branc
return false;
}
void ForwardModule::onResponse(shared_ptr<ResponseSipEvent> &ev) throw(FlexisipException) {
void ForwardModule::onResponse(shared_ptr<ResponseSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
ev->send(ms);
}
......
......@@ -29,7 +29,7 @@ class ModuleGarbageIn : public Module, protected ModuleToolbox {
~ModuleGarbageIn() {
}
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException){
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) {
const sip_t *sip = ev->getMsgSip()->getSip();
if (sip->sip_request->rq_method == sip_method_options) {
ev->reply(200, NULL, TAG_END());
......@@ -40,7 +40,7 @@ class ModuleGarbageIn : public Module, protected ModuleToolbox {
ev->terminateProcessing();
}
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException){
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) {
SLOGD << "Garbage: processing terminated";
ev->terminateProcessing();
}
......
......@@ -342,9 +342,9 @@ class GatewayAdapter : public Module {
virtual void onLoad(const GenericStruct *module_config);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev);
virtual bool isValidNextConfig(const ConfigValue &cv);
......@@ -423,7 +423,7 @@ void GatewayAdapter::onLoad(const GenericStruct *module_config) {
}
}
void GatewayAdapter::onRequest(shared_ptr<RequestSipEvent> &ev) throw(FlexisipException) {
void GatewayAdapter::onRequest(shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
......@@ -466,7 +466,7 @@ void GatewayAdapter::onRequest(shared_ptr<RequestSipEvent> &ev) throw(FlexisipEx
}
}
void GatewayAdapter::onResponse(shared_ptr<ResponseSipEvent> &ev) throw(FlexisipException) {
void GatewayAdapter::onResponse(shared_ptr<ResponseSipEvent> &ev) {
}
void GatewayAdapter::nua_callback(nua_event_t event, int status, char const *phrase, nua_t *nua, nua_magic_t *ctx,
......
......@@ -29,8 +29,8 @@ class LoadBalancer : public Module, public ModuleToolbox {
virtual ~LoadBalancer();
virtual void onDeclare(GenericStruct *module_config);
virtual void onLoad(const GenericStruct *modconf);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev);
private:
vector<string> mRoutes;
......@@ -66,7 +66,7 @@ void LoadBalancer::onLoad(const GenericStruct *modconf) {
mRoutesCount = mRoutes.size();
}
void LoadBalancer::onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException){
void LoadBalancer::onRequest(shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
uint32_t call_hash;
sip_t *sip = ms->getSip();
......@@ -87,7 +87,7 @@ void LoadBalancer::onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipExc
}
}
void LoadBalancer::onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException){
void LoadBalancer::onResponse(shared_ptr<ResponseSipEvent> &ev) {
/*nothing to do*/
}
......
......@@ -212,7 +212,7 @@ void MediaRelay::configureContext(shared_ptr<RelayedCall> &c){
}
void MediaRelay::onRequest(shared_ptr<RequestSipEvent> &ev) throw(FlexisipException) {
void MediaRelay::onRequest(shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
......@@ -304,7 +304,7 @@ void MediaRelay::processResponseWithSDP(const shared_ptr<RelayedCall> &c, const
m->update(msg, sip);
}
void MediaRelay::onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException) {
void MediaRelay::onResponse(shared_ptr<ResponseSipEvent> &ev) {
shared_ptr<MsgSip> ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
msg_t *msg = ms->getMsg();
......
......@@ -31,7 +31,7 @@ class NatHelper : public Module, protected ModuleToolbox {
~NatHelper() {
}
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException) {
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) {
shared_ptr<MsgSip> ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
sip_request_t *rq = sip->sip_request;
......@@ -57,7 +57,7 @@ class NatHelper : public Module, protected ModuleToolbox {
// Idea for future: for the case where a natted proxy forwards a REGISTER (which can be detected , we could add
// a Path header corresponding to this proxy
}
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException){
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_status_t *st = ms->getSip()->sip_status;
sip_cseq_t *cseq = ms->getSip()->sip_cseq;
......
......@@ -95,11 +95,11 @@ class ModulePresence : public Module, ModuleToolbox {
}
return false;
}
void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException){
void onRequest(shared_ptr<RequestSipEvent> &ev) {
if (isMessageAPresenceMessage(ev))
route(ev);
}
void onResponse(std::shared_ptr<ResponseSipEvent> &ev)throw (FlexisipException){};
void onResponse(std::shared_ptr<ResponseSipEvent> &ev) {};
public:
ModulePresence(Agent *ag) : Module(ag) {
......
......@@ -68,8 +68,8 @@ class PushNotification : public Module, public ModuleToolbox {
PushNotification(Agent *ag);
virtual ~PushNotification();
void onDeclare(GenericStruct *module_config);
virtual void onRequest(std::shared_ptr<RequestSipEvent> &ev) throw (FlexisipException);
virtual void onResponse(std::shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException);
virtual void onRequest(std::shared_ptr<RequestSipEvent> &ev);
virtual void onResponse(std::shared_ptr<ResponseSipEvent> &ev);
virtual void onLoad(const GenericStruct *mc);
PushNotificationService *getService() const {
return mPNS;
......@@ -482,7 +482,7 @@ bool PushNotification::needsPush(const sip_t *sip) {
return false;
}
void PushNotification::onRequest(std::shared_ptr<RequestSipEvent> &ev) throw(FlexisipException) {
void PushNotification::onRequest(std::shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
if (needsPush(sip)) {
......@@ -499,7 +499,7 @@ void PushNotification::onRequest(std::shared_ptr<RequestSipEvent> &ev) throw(Fle
}
}
void PushNotification::onResponse(std::shared_ptr<ResponseSipEvent> &ev) throw(FlexisipException) {
void PushNotification::onResponse(std::shared_ptr<ResponseSipEvent> &ev) {
shared_ptr<OutgoingTransaction> transaction = dynamic_pointer_cast<OutgoingTransaction>(ev->getOutgoingAgent());
int code = ev->getMsgSip()->getSip()->sip_status->st_status;
if (transaction != NULL && code >= 180 && code != 503) {
......
......@@ -61,11 +61,11 @@ class ModuleRedirect : public Module, ModuleToolbox {
void onUnload() {
}
void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException){
void onRequest(shared_ptr<RequestSipEvent> &ev) {
ev->reply(SIP_302_MOVED_TEMPORARILY, SIPTAG_CONTACT(sip_contact_dup(&mHome, mContact)),
SIPTAG_SERVER_STR(getAgent()->getServerString()), TAG_END());
}
void onResponse(std::shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException){};
void onResponse(std::shared_ptr<ResponseSipEvent> &ev) {};
public:
ModuleRedirect(Agent *ag) : Module(ag) {
......
......@@ -560,7 +560,7 @@ void ModuleRegistrar::processUpdateRequest(shared_ptr<SipEventT> &ev, const sip_
}
}
void ModuleRegistrar::onRequest(shared_ptr<RequestSipEvent> &ev) throw(FlexisipException) {
void ModuleRegistrar::onRequest(shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
if (sip->sip_request->rq_method != sip_method_register)
......@@ -655,7 +655,7 @@ void ModuleRegistrar::onRequest(shared_ptr<RequestSipEvent> &ev) throw(FlexisipE
}
}
void ModuleRegistrar::onResponse(shared_ptr<ResponseSipEvent> &ev) throw(FlexisipException) {
void ModuleRegistrar::onResponse(shared_ptr<ResponseSipEvent> &ev) {
if (!mUpdateOnResponse)
return;
const shared_ptr<MsgSip> &reMs = ev->getMsgSip();
......
......@@ -130,9 +130,9 @@ class ModuleRegistrar : public Module, public ModuleToolbox {
virtual void onUnload();
virtual void onRequest(std::shared_ptr<RequestSipEvent> &ev) throw (FlexisipException);
virtual void onRequest(std::shared_ptr<RequestSipEvent> &ev);
virtual void onResponse(std::shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException);
virtual void onResponse(std::shared_ptr<ResponseSipEvent> &ev);
template <typename SipEventT, typename ListenerT>
void processUpdateRequest(std::shared_ptr<SipEventT> &ev, const sip_t *sip);
......
......@@ -156,9 +156,9 @@ class ModuleRouter : public Module, public ModuleToolbox, public ForkContextList
virtual void onUnload() {
}
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev);
virtual void onForkContextFinished(shared_ptr<ForkContext> ctx);
void extractContactByUniqueId(string uid);
......@@ -907,7 +907,7 @@ static vector<string> split(const char *data, const char *delim) {
return res;
}
void ModuleRouter::onRequest(shared_ptr<RequestSipEvent> &ev) throw(FlexisipException) {
void ModuleRouter::onRequest(shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
......@@ -976,7 +976,7 @@ void ModuleRouter::onRequest(shared_ptr<RequestSipEvent> &ev) throw(FlexisipExce
}
}
void ModuleRouter::onResponse(shared_ptr<ResponseSipEvent> &ev) throw(FlexisipException) {
void ModuleRouter::onResponse(shared_ptr<ResponseSipEvent> &ev) {
ForkContext::processResponse(ev);
}
......
......@@ -29,7 +29,7 @@ class ModuleSanityChecker : public Module, protected ModuleToolbox {
~ModuleSanityChecker() {
}
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException){
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) {
sip_t *sip = ev->getMsgSip()->getSip();
const char *error = checkHeaders(sip);
......@@ -42,7 +42,7 @@ class ModuleSanityChecker : public Module, protected ModuleToolbox {
}
}
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException){
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) {
// don't check our responses ;)
}
......
......@@ -34,8 +34,8 @@ class StatisticsCollector : public Module, ModuleToolbox {
~StatisticsCollector();
virtual void onDeclare(GenericStruct *module_config);
virtual void onLoad(const GenericStruct *root);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev);
private:
int managePublishContent(const shared_ptr<RequestSipEvent> ev);
......@@ -85,7 +85,7 @@ void StatisticsCollector::onLoad(const GenericStruct *mc) {
LOGI("StatisticsCollector: setup with collector address '%s'", value.c_str());
}
void StatisticsCollector::onRequest(shared_ptr<RequestSipEvent> &ev) throw(FlexisipException) {
void StatisticsCollector::onRequest(shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
url_t url = *sip->sip_request->rq_url;
......@@ -103,7 +103,7 @@ void StatisticsCollector::onRequest(shared_ptr<RequestSipEvent> &ev) throw(Flexi
}
}
void StatisticsCollector::onResponse(shared_ptr<ResponseSipEvent> &ev) throw(FlexisipException) {
void StatisticsCollector::onResponse(shared_ptr<ResponseSipEvent> &ev) {
}
/*avoid crash if x is NULL on libc versions <4.5.26 */
......
......@@ -69,8 +69,8 @@ class Transcoder : public Module, protected ModuleToolbox {
Transcoder(Agent *ag);
~Transcoder();
virtual void onLoad(const GenericStruct *module_config);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException);
virtual void onRequest(shared_ptr<RequestSipEvent> &ev);
virtual void onResponse(shared_ptr<ResponseSipEvent> &ev);
virtual void onIdle();
virtual void onDeclare(GenericStruct *mc);
#ifdef ENABLE_TRANSCODER
......@@ -122,10 +122,10 @@ void Transcoder::onLoad(const GenericStruct *mc) {
}
void Transcoder::onIdle() {
}
void Transcoder::onRequest(shared_ptr<RequestSipEvent> &ev) throw(FlexisipException) {
void Transcoder::onRequest(shared_ptr<RequestSipEvent> &ev) {
LOGA("Transcoder support is not compiled");
}
void Transcoder::onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException) {
void Transcoder::onResponse(shared_ptr<ResponseSipEvent> &ev) {
LOGA("Transcoder support is not compiled");
}
#endif
......@@ -419,7 +419,7 @@ void Transcoder::processAck(TranscodedCall *ctx, shared_ptr<RequestSipEvent> &ev
}
}
void Transcoder::onRequest(shared_ptr<RequestSipEvent> &ev) throw (FlexisipException){
void Transcoder::onRequest(shared_ptr<RequestSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
......@@ -533,7 +533,7 @@ static bool isEarlyMedia(sip_t *sip) {
return false;
}
void Transcoder::onResponse(shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException) {
void Transcoder::onResponse(shared_ptr<ResponseSipEvent> &ev) {
const shared_ptr<MsgSip> &ms = ev->getMsgSip();
sip_t *sip = ms->getSip();
msg_t *msg = ms->getMsg();
......
......@@ -162,8 +162,8 @@ class Module : protected ConfigValueListener {
virtual void onUnload() {
}
virtual void onRequest(std::shared_ptr<RequestSipEvent> &ev) throw (FlexisipException) = 0;
virtual void onResponse(std::shared_ptr<ResponseSipEvent> &ev) throw (FlexisipException) = 0;
virtual void onRequest(std::shared_ptr<RequestSipEvent> &ev) = 0;
virtual void onResponse(std::shared_ptr<ResponseSipEvent> &ev) = 0;
virtual bool doOnConfigStateChanged(const ConfigValue &conf, ConfigState state);
virtual void onIdle() {
......
......@@ -27,9 +27,9 @@ class EtagManager {
public:
virtual void invalidateETag(const std::string &eTag) = 0;
virtual void modifyEtag(const std::string &oldEtag, const std::string &newEtag) throw(FlexisipException) = 0;
virtual void modifyEtag(const std::string &oldEtag, const std::string &newEtag) = 0;
virtual void addEtag(const std::shared_ptr<PresentityPresenceInformation> &info,
const std::string &etag) throw(FlexisipException) = 0;
const std::string &etag) = 0;
};
}
......
......@@ -31,7 +31,7 @@ using namespace std;
namespace flexisip {
ListSubscription::ListSubscription(unsigned int expires, belle_sip_server_transaction_t *ist,
belle_sip_provider_t *aProv) throw(FlexisipException)
belle_sip_provider_t *aProv)
: Subscription("Presence", expires, belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(ist)), aProv),
mLastNotify(chrono::system_clock::time_point::min()), mMinNotifyInterval(2 /*60*/), mVersion(0), mTimer(NULL) {
belle_sip_request_t *request = belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(ist));
......@@ -134,7 +134,7 @@ void ListSubscription::addInstanceToResource(rlmi::Resource &resource, list<bell
SLOGI << "Presence info added to list [" << mName << " for entity [" << presentityInformation.getEntity() << "]";
}
void ListSubscription::notify(bool isFullState) throw(FlexisipException) {
void ListSubscription::notify(bool isFullState) {
belle_sip_multipart_body_handler_t *multiPartBody;
try {
char *uri = belle_sip_uri_to_string(mName);
......
......@@ -60,12 +60,12 @@ class ListSubscription : public Subscription {
// ListSubscription(unsigned int expires,list<const belle_sip_uri_t *> resources,belle_sip_dialog_t*
// aDialog,belle_sip_provider_t* aProv);
ListSubscription(unsigned int expires, belle_sip_server_transaction_t *ist,
belle_sip_provider_t *aProv) throw(FlexisipException);
belle_sip_provider_t *aProv);
virtual ~ListSubscription();
std::list<std::shared_ptr<PresentityPresenceInformationListener>> &getListeners();
/* Notify taking state from all pending Presentity listener*/
void notify(bool isFullState) throw(FlexisipException);
void notify(bool isFullState);
protected:
// this function is call by each PresentityResourceListener to centralize notifications
......
......@@ -55,7 +55,7 @@ PresenceServer::Init::Init() {
s->addChildrenValues(items);
}
PresenceServer::PresenceServer() throw(FlexisipException)
PresenceServer::PresenceServer()
: mStarted(true)
, mIterateThread(nullptr) {
......@@ -122,7 +122,7 @@ PresenceServer::~PresenceServer() {
SLOGD << "Presence server destroyed";
}
void PresenceServer::_start(bool withThread) throw(FlexisipException) {
void PresenceServer::_start(bool withThread) {
if (!mEnabled) return;
GenericStruct *cr = GenericManager::get()->getRoot();
std::string get_users_with_phones_request = cr->get<GenericStruct>("module::Authentication")
......@@ -159,11 +159,11 @@ void PresenceServer::_start(bool withThread) throw(FlexisipException) {
}
}
void PresenceServer::start() throw(FlexisipException) {
void PresenceServer::start() {
_start(true);
}
void PresenceServer::run() throw(FlexisipException){
void PresenceServer::run() {
_start(false);
while (mStarted){
belle_sip_main_loop_run(belle_sip_stack_get_main_loop(mStack));
......@@ -256,8 +256,7 @@ void PresenceServer::processTransactionTerminated(PresenceServer *thiz,
}
}
void PresenceServer::processPublishRequestEvent(const belle_sip_request_event_t *event) throw(BelleSipSignalingException,
FlexisipException) {
void PresenceServer::processPublishRequestEvent(const belle_sip_request_event_t *event) {
belle_sip_request_t *request = belle_sip_request_event_get_request(event);
std::shared_ptr<PresentityPresenceInformation> presenceInfo;
......@@ -514,8 +513,7 @@ void PresenceServer::processPublishRequestEvent(const belle_sip_request_event_t
belle_sip_server_transaction_send_response(server_transaction, resp);
}
void PresenceServer::processSubscribeRequestEvent(const belle_sip_request_event_t *event) throw(BelleSipSignalingException,
FlexisipException) {
void PresenceServer::processSubscribeRequestEvent(const belle_sip_request_event_t *event) {
belle_sip_request_t *request = belle_sip_request_event_get_request(event);
/*
......@@ -770,8 +768,7 @@ const std::shared_ptr<PresentityPresenceInformation> PresenceServer::getPresence
return presenceInformationsByEtagIt->second;
}
void PresenceServer::addPresenceInfo(const std::shared_ptr<PresentityPresenceInformation> &presenceInfo) throw(
FlexisipException) {
void PresenceServer::addPresenceInfo(const std::shared_ptr<PresentityPresenceInformation> &presenceInfo) {
if (getPresenceInfo(presenceInfo->getEntity())) {
throw FLEXISIP_EXCEPTION << "Presence information element already exist for" << presenceInfo;
......@@ -818,7 +815,7 @@ void PresenceServer::invalidateETag(const string &eTag) {
}
}
void PresenceServer::modifyEtag(const string &oldEtag, const string &newEtag) throw(FlexisipException) {
void PresenceServer::modifyEtag(const string &oldEtag, const string &newEtag) {
auto presenceInformationsByEtagIt = mPresenceInformationsByEtag.find(oldEtag);
if (presenceInformationsByEtagIt == mPresenceInformationsByEtag.end())
throw FLEXISIP_EXCEPTION << "Unknown etag [" << oldEtag << "]";
......@@ -826,7 +823,7 @@ void PresenceServer::modifyEtag(const string &oldEtag, const string &newEtag) th
mPresenceInformationsByEtag.erase(oldEtag);
}
void PresenceServer::addEtag(const std::shared_ptr<PresentityPresenceInformation> &info,
const string &etag) throw(FlexisipException) {
const string &etag) {
auto presenceInformationsByEtagIt = mPresenceInformationsByEtag.find(etag);
if (presenceInformationsByEtagIt != mPresenceInformationsByEtag.end())
throw FLEXISIP_EXCEPTION << "Already existing etag [" << etag << "] use PresenceServer::modifyEtag instead ";
......
......@@ -69,12 +69,12 @@ public:
class PresenceServer : public PresentityManager {
public:
PresenceServer() throw (FlexisipException);
PresenceServer();
~PresenceServer();
//Starts presence server as a thread
void start() throw (FlexisipException);
void start();
//Directly run the presence server (in current thread).
void run() throw (FlexisipException);
void run();
void stop();
belle_sip_main_loop_t* getBelleSipMainLoop();
void addPresenceInfoObserver(const std::shared_ptr<PresenceInfoObserver> &observer);
......@@ -102,9 +102,9 @@ private:
static void processResponseEvent(PresenceServer * thiz, const belle_sip_response_event_t *event);
static void processTimeout(PresenceServer * thiz, const belle_sip_timeout_event_t *event) ;
static void processTransactionTerminated(PresenceServer * thiz, const belle_sip_transaction_terminated_event_t *event);
void _start(bool withThread) throw (FlexisipException);
void processPublishRequestEvent(const belle_sip_request_event_t *event) throw (BelleSipSignalingException,FlexisipException);
void processSubscribeRequestEvent(const belle_sip_request_event_t *event) throw (BelleSipSignalingException,FlexisipException);
void _start(bool withThread);
void processPublishRequestEvent(const belle_sip_request_event_t *event);
void processSubscribeRequestEvent(const belle_sip_request_event_t *event);
/*
......@@ -116,11 +116,11 @@ private:
* @throw in case an entry already exist for this entity;
* */
std::shared_ptr<PresentityPresenceInformation> getPresenceInfo(const belle_sip_uri_t* identity) const ;
void addPresenceInfo(const std::shared_ptr<PresentityPresenceInformation>& ) throw (FlexisipException);
void addPresenceInfo(const std::shared_ptr<PresentityPresenceInformation>& );
void invalidateETag(const std::string& eTag) ;
void modifyEtag(const std::string& oldEtag, const std::string& newEtag) throw (FlexisipException);
void addEtag(const std::shared_ptr<PresentityPresenceInformation>& info,const std::string& etag) throw (FlexisipException);
void modifyEtag(const std::string& oldEtag, const std::string& newEtag);
void addEtag(const std::shared_ptr<PresentityPresenceInformation>& info,const std::string& etag);
std::map<std::string,std::shared_ptr<PresentityPresenceInformation>> mPresenceInformationsByEtag;
std::unordered_map<const belle_sip_uri_t*,std::shared_ptr<PresentityPresenceInformation>,std::hash<const belle_sip_uri_t*>,bellesip::UriComparator> mPresenceInformations;
......@@ -136,7 +136,7 @@ private:
void removeListener(const std::shared_ptr<PresentityPresenceInformationListener>& listerner);
void removeSubscription(std::shared_ptr<Subscription> &identity) throw();
//void notify(Subscription& subscription,PresentityPresenceInformation& presenceInformation) throw (FlexisipException);
//void notify(Subscription& subscription,PresentityPresenceInformation& presenceInformation);
std::unordered_map<const belle_sip_uri_t*,std::list<std::shared_ptr<Subscription>>,std::hash<const belle_sip_uri_t*>,bellesip::UriComparator> mSubscriptionsByEntity;
/**/
std::vector<std::shared_ptr<PresenceInfoObserver> > mPresenceInfoObservers;
......
......@@ -113,7 +113,7 @@ string PresentityPresenceInformation::putTuples(pidf::Presence::TupleSequence &t
}
string PresentityPresenceInformation::updateTuples(pidf::Presence::TupleSequence &tuples,
data_model::Person &person, string &eTag,
int expires) throw(FlexisipException) {
int expires) {
return setOrUpdate(&tuples, &person, &eTag, expires);
}
void PresenceInformationElement::clearTuples() {
......@@ -121,7 +121,7 @@ void PresenceInformationElement::clearTuples() {
}
string PresentityPresenceInformation::setOrUpdate(pidf::Presence::TupleSequence *tuples,
data_model::Person *person, const string *eTag,
int expires) throw(FlexisipException) {
int expires) {
PresenceInformationElement *informationElement = NULL;
// etag ?
......@@ -196,7 +196,7 @@ string PresentityPresenceInformation::setOrUpdate(pidf::Presence::TupleSequence
return generatedETag;
}
string PresentityPresenceInformation::refreshTuplesForEtag(const string &eTag, int expires) throw(FlexisipException) {
string PresentityPresenceInformation::refreshTuplesForEtag(const string &eTag, int expires) {
return setOrUpdate(NULL, NULL, &eTag, expires);
}
......@@ -330,7 +330,7 @@ bool PresentityPresenceInformation::hasDefaultElement() {
bool PresentityPresenceInformation::isKnown() {
return mInformationElements.size() > 0 || hasDefaultElement();
}
string PresentityPresenceInformation::getPidf(bool extended) throw(FlexisipException) {
string PresentityPresenceInformation::getPidf(bool extended) {
stringstream out;
try {
char *entity = belle_sip_uri_to_string(getEntity());
......
......@@ -118,13 +118,13 @@ class PresentityPresenceInformation : public std::enable_shared_from_this<Presen
* @return new eTag
* */
std::string updateTuples(pidf::Presence::TupleSequence &tuples, data_model::Person &person, std::string &eTag,
int expires) throw(FlexisipException);
int expires);
/*
* refresh a publish
* @return new eTag
* */
std::string refreshTuplesForEtag(const std::string &eTag, int expires) throw(FlexisipException);
std::string refreshTuplesForEtag(const std::string &eTag, int expires);