Fix build warnings for gcc 9 18/220918/2 accepted/tizen/unified/20191227.142729 submit/tizen/20191226.234511
authorSemun Lee <semun.lee@samsung.com>
Thu, 26 Dec 2019 01:54:40 +0000 (10:54 +0900)
committerSemun Lee <semun.lee@samsung.com>
Thu, 26 Dec 2019 05:47:12 +0000 (14:47 +0900)
Removed all the dynamic exception specifications which are deprecated
since c++11

Change-Id: I1ca350acd7d7f0e189d6d7df815140bf8c6d8839
Signed-off-by: Semun Lee <semun.lee@samsung.com>
include/ClientChannel.h
include/Reader.h
include/SEService.h
include/Session.h
src/ClientChannel.cpp
src/Reader.cpp
src/SEService.cpp
src/Session.cpp

index e02d3f2..c735176 100644 (file)
@@ -56,12 +56,8 @@ public:
                        transmitCallback callback, void *userParam);
                bool selectNext() { return false; }
 
-               void closeSync()
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorSecurity &, ErrorIllegalParameter &);
-               int transmitSync(const ByteArray &command, ByteArray &result)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               void closeSync();
+               int transmitSync(const ByteArray &command, ByteArray &result);
 
                void *getHandle() { return handle; }
 
index ea3e30b..5e19944 100644 (file)
@@ -50,13 +50,10 @@ private:
                        GAsyncResult *res, gpointer user_data);
 
 public:
-               void closeSessions()
-                       throw(ErrorIO &, ErrorIllegalState &);
+               void closeSessions();
 
                int openSession(openSessionCallback callback, void *userData);
-               SessionHelper *openSessionSync()
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               SessionHelper *openSessionSync();
 
                void *getHandle() { return handle; }
 
index b8bbb35..8efea8b 100644 (file)
@@ -59,17 +59,12 @@ private:
                bool parseReaderInformation(unsigned int count, const ByteArray &data);
                bool parseReaderInformation(GVariant *variant);
 
-               bool _initialize()
-                       throw(ErrorIO &);
-               bool initialize(void *context, serviceConnected handler)
-                       throw(ErrorIO &, ErrorIllegalParameter &);
-               bool initialize(void *context, SEServiceListener *listener)
-                       throw(ErrorIO &, ErrorIllegalParameter &);
-               int _initialize_sync()
-                       throw(ErrorIO &, ExceptionBase &);
+               bool _initialize();
+               bool initialize(void *context, serviceConnected handler);
+               bool initialize(void *context, SEServiceListener *listener);
+               int _initialize_sync();
                int _initialize_sync_do_not_throw_exception();
-               bool initializeSync(void *context)
-                       throw(ErrorIO &, ErrorIllegalParameter &, ExceptionBase &);
+               bool initializeSync(void *context);
 
                static void reader_inserted(GObject *source_object,
                        guint reader_id, gchar *reader_name,
@@ -83,12 +78,9 @@ private:
                        GAsyncResult *res, gpointer user_data);
 
 public:
-               SEService(void *user_data, serviceConnected handler)
-                       throw(ErrorIO &, ErrorIllegalParameter &);
-               SEService(void *user_data, SEServiceListener *listener)
-                       throw(ErrorIO &, ErrorIllegalParameter &);
-               SEService(void *user_data)
-                       throw(ErrorIO &, ErrorIllegalParameter &, ExceptionBase &);
+               SEService(void *user_data, serviceConnected handler);
+               SEService(void *user_data, SEServiceListener *listener);
+               SEService(void *user_data);
                ~SEService();
 
                void setEventHandler(se_service_event_cb cb, void *context);
index 54e2b5a..fdf7f53 100644 (file)
@@ -47,13 +47,9 @@ private:
 
                int openChannel(int id, const ByteArray &aid, openChannelCallback callback, void *userData);
 
-               Channel *openChannelSync(int id, const ByteArray &aid)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               Channel *openChannelSync(int id, const ByteArray &aid);
 
-               Channel *openChannelSync(int id, const ByteArray &aid, unsigned char P2)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               Channel *openChannelSync(int id, const ByteArray &aid, unsigned char P2);
 
                static void session_get_atr_cb(GObject *source_object,
                        GAsyncResult *res, gpointer user_data);
@@ -63,8 +59,7 @@ private:
                        GAsyncResult *res, gpointer user_data);
 
 public:
-               void closeChannels()
-                       throw(ErrorIO &, ErrorIllegalState &);
+               void closeChannels();
 
                int getATR(getATRCallback callback, void *userData);
                int close(closeSessionCallback callback, void *userData);
@@ -74,45 +69,25 @@ public:
                int openLogicalChannel(const ByteArray &aid, openChannelCallback callback, void *userData);
                int openLogicalChannel(const unsigned char *aid, unsigned int length, openChannelCallback callback, void *userData);
 
-               const ByteArray getATRSync()
-                       throw(ExceptionBase &, ErrorIO &, ErrorSecurity &,
-                               ErrorIllegalState &, ErrorIllegalParameter &);
+               const ByteArray getATRSync();
 
-               void closeSync()
-                       throw(ExceptionBase &, ErrorIO &, ErrorSecurity &,
-                               ErrorIllegalState &, ErrorIllegalParameter &);
+               void closeSync();
 
-               Channel *openBasicChannelSync(const ByteArray &aid)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               Channel *openBasicChannelSync(const ByteArray &aid);
 
-               Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length);
 
-               Channel *openLogicalChannelSync(const ByteArray &aid)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               Channel *openLogicalChannelSync(const ByteArray &aid);
 
-               Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length);
 
-               Channel *openBasicChannelSync(const ByteArray &aid, unsigned char P2)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               Channel *openBasicChannelSync(const ByteArray &aid, unsigned char P2);
 
-               Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2);
 
-               Channel *openLogicalChannelSync(const ByteArray &aid, unsigned char P2)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               Channel *openLogicalChannelSync(const ByteArray &aid, unsigned char P2);
 
-               Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &);
+               Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2);
 
                size_t getChannelCount() const;
                void *getHandle() { return handle; }
index 3f515ec..0d905d8 100755 (executable)
@@ -163,8 +163,6 @@ namespace smartcard_service_api
        }
 
        void ClientChannel::closeSync()
-               throw(ExceptionBase &, ErrorIO &, ErrorSecurity &,
-                       ErrorIllegalState &, ErrorIllegalParameter &)
        {
                if (isClosed() == false)
                {
@@ -228,8 +226,6 @@ namespace smartcard_service_api
        }
 
        int ClientChannel::transmitSync(const ByteArray &command, ByteArray &result)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                int rv = SCARD_ERROR_OK;
 
index 13f812a..e91f301 100755 (executable)
@@ -82,7 +82,6 @@ namespace smartcard_service_api
        }
 
        void Reader::closeSessions()
-               throw(ErrorIO &, ErrorIllegalState &)
        {
                size_t i;
 
@@ -93,8 +92,6 @@ namespace smartcard_service_api
        }
 
        SessionHelper *Reader::openSessionSync()
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                Session *session = NULL;
 
index 35ba27c..71450d1 100644 (file)
@@ -47,8 +47,7 @@ namespace smartcard_service_api
        }
 
        SEService::SEService(void *user_data, serviceConnected handler)
-               throw(ErrorIO &, ErrorIllegalParameter &) :
-               SEServiceHelper(), handle(-1), context(NULL), listener(NULL),
+               : SEServiceHelper(), handle(-1), context(NULL), listener(NULL),
                event_handler(NULL), event_handler_context(NULL),
                proxy(NULL), version(VERSION)
        {
@@ -56,8 +55,7 @@ namespace smartcard_service_api
        }
 
        SEService::SEService(void *user_data, SEServiceListener *listener)
-               throw(ErrorIO &, ErrorIllegalParameter &) :
-               SEServiceHelper(), handle(-1), handler(NULL),
+               : SEServiceHelper(), handle(-1), handler(NULL),
                event_handler(NULL), event_handler_context(NULL),
                proxy(NULL), version(VERSION)
        {
@@ -65,8 +63,7 @@ namespace smartcard_service_api
        }
 
        SEService::SEService(void *user_data)
-               throw(ErrorIO &, ErrorIllegalParameter &, ExceptionBase &) :
-               SEServiceHelper(), handle(-1), handler(NULL), listener(NULL),
+               : SEServiceHelper(), handle(-1), handler(NULL), listener(NULL),
                event_handler(NULL), event_handler_context(NULL),
                proxy(NULL), version(VERSION)
        {
@@ -252,7 +249,7 @@ namespace smartcard_service_api
                }
        }
 
-       bool SEService::_initialize() throw(ErrorIO &)
+       bool SEService::_initialize()
        {
                bool result = false;
 
@@ -349,7 +346,7 @@ namespace smartcard_service_api
                return result;
        }
 
-       int SEService::_initialize_sync() throw(ErrorIO &, ExceptionBase &)
+       int SEService::_initialize_sync()
        {
                gint result;
                guint handle;
@@ -402,7 +399,6 @@ namespace smartcard_service_api
        }
 
        bool SEService::initialize(void *context, serviceConnected handler)
-               throw(ErrorIO &, ErrorIllegalParameter &)
        {
                if (context == NULL)
                {
@@ -416,7 +412,6 @@ namespace smartcard_service_api
        }
 
        bool SEService::initialize(void *context, SEServiceListener *listener)
-               throw(ErrorIO &, ErrorIllegalParameter &)
        {
                if (context == NULL)
                {
@@ -430,7 +425,6 @@ namespace smartcard_service_api
        }
 
        bool SEService::initializeSync(void *context)
-               throw(ErrorIO &, ErrorIllegalParameter &, ExceptionBase &)
        {
                this->context = context;
 
index 4270e4e..a600e1d 100755 (executable)
@@ -84,7 +84,7 @@ namespace smartcard_service_api
                channels.clear();
        }
 
-       void Session::closeChannels() throw(ErrorIO &, ErrorIllegalState &)
+       void Session::closeChannels()
        {
                size_t i;
 
@@ -243,8 +243,6 @@ namespace smartcard_service_api
        }
 
        const ByteArray Session::getATRSync()
-               throw(ExceptionBase &, ErrorIO &, ErrorSecurity &,
-                       ErrorIllegalState &, ErrorIllegalParameter &)
        {
                ByteArray result;
 
@@ -321,8 +319,6 @@ namespace smartcard_service_api
        }
 
        void Session::closeSync()
-               throw(ExceptionBase &, ErrorIO &, ErrorSecurity &,
-                       ErrorIllegalState &, ErrorIllegalParameter &)
        {
                if (isClosed() == false)
                {
@@ -392,15 +388,11 @@ namespace smartcard_service_api
                return count;
        }
        Channel *Session::openChannelSync(int id, const ByteArray &aid)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                return openChannelSync(id, aid, 0x00);
        }
 
        Channel *Session::openChannelSync(int id, const ByteArray &aid, unsigned char P2)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                Channel *channel = NULL;
 
@@ -488,22 +480,16 @@ namespace smartcard_service_api
        }
 
        Channel *Session::openBasicChannelSync(const ByteArray &aid)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                return openChannelSync(0, aid, 0x00);
        }
 
        Channel *Session::openBasicChannelSync(const ByteArray &aid, unsigned char P2)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                return openChannelSync(0, aid, P2);
        }
 
        Channel *Session::openBasicChannelSync(const unsigned char *aid, unsigned int length)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                ByteArray temp(aid, length);
 
@@ -511,8 +497,6 @@ namespace smartcard_service_api
        }
 
        Channel *Session::openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                ByteArray temp(aid, length);
 
@@ -533,22 +517,16 @@ namespace smartcard_service_api
        }
 
        Channel *Session::openLogicalChannelSync(const ByteArray &aid)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                return openChannelSync(1, aid, 0x00);
        }
 
        Channel *Session::openLogicalChannelSync(const ByteArray &aid, unsigned char P2)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                return openChannelSync(1, aid, P2);
        }
 
        Channel *Session::openLogicalChannelSync(const unsigned char *aid, unsigned int length)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                ByteArray temp(aid, length);
 
@@ -556,8 +534,6 @@ namespace smartcard_service_api
        }
 
        Channel *Session::openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2)
-               throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                       ErrorIllegalParameter &, ErrorSecurity &)
        {
                ByteArray temp(aid, length);