throw(ErrorIO &, ErrorIllegalParameter &, ExceptionBase &);
~SEService();
- static SEService *createInstance(void *user_data, SEServiceListener *listener)
- throw(ErrorIO &, ErrorIllegalParameter &);
- static SEService *createInstance(void *user_data, serviceConnected handler)
- throw(ErrorIO &, ErrorIllegalParameter &);
-
void setEventHandler(se_service_event_cb cb, void *context);
void shutdown();
void shutdownSync();
Name: capi-network-smartcard
Summary: A Smartcard library in Native API
-Version: 0.0.11
-Release: 1
+Version: 0.0.12
+Release: 0
Group: Network & Connectivity/Smartcard
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
%{_includedir}/*.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libcapi-network-smartcard.so
-%{_bindir}/smartcard_unit_test
\ No newline at end of file
+%{_bindir}/smartcard_unit_test
&result, &session_id, NULL, &error) == true) {
if (result == SCARD_ERROR_OK) {
/* create new instance of channel */
- session = new Session(context, this,
+ session = new (std::nothrow)Session(context, this,
GUINT_TO_POINTER(session_id));
if (session != NULL) {
sessions.push_back(session);
&result, &handle, res, &error) == true) {
if (result == SCARD_ERROR_OK) {
/* create new instance of channel */
- session = new Session(reader->context, reader,
+ session = new (std::nothrow)Session(reader->context, reader,
GUINT_TO_POINTER(handle));
if (session != NULL) {
reader->sessions.push_back(session);
_BEGIN();
if (isSecureElementPresent() == true) {
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;
}
}
- SEService *SEService::createInstance(void *user_data,
- SEServiceListener *listener)
- throw(ErrorIO &, ErrorIllegalParameter &)
- {
- return new SEService(user_data, listener);
- }
-
- SEService *SEService::createInstance(void *user_data,
- serviceConnected handler)
- throw(ErrorIO &, ErrorIllegalParameter &)
- {
- return new SEService(user_data, handler);
- }
-
void SEService::reader_inserted(GObject *source_object,
guint reader_id, gchar *reader_name, gpointer user_data)
{
_INFO("[MSG_NOTIFY_SE_INSERTED]");
/* add readers */
- reader = new Reader(service->context,
+ reader = new (std::nothrow)Reader(service->context,
reader_name, GUINT_TO_POINTER(reader_id));
if (reader != NULL) {
SECURE_LOGD("Reader : name [%s], handle [%08x]", name, handle);
/* add readers */
- reader = new Reader(GUINT_TO_POINTER(this->handle), name, GUINT_TO_POINTER(handle));
+ reader = new (std::nothrow)Reader(GUINT_TO_POINTER(this->handle), name, GUINT_TO_POINTER(handle));
if (reader == NULL)
{
_ERR("alloc failed");
SECURE_LOGD("Reader [%d] : name [%s], handle [%p]", i, name, handle);
/* add readers */
- reader = new Reader(context, name, handle);
+ reader = new (std::nothrow)Reader(context, name, handle);
if (reader == NULL)
{
_ERR("alloc failed");
try
{
- service = new SEService(user_data, (serviceConnected)callback);
+ service = new (std::nothrow)SEService(user_data, (serviceConnected)callback);
}
catch (...)
{
try
{
- service = new SEService(user_data, (serviceConnected)connected);
+ service = new (std::nothrow)SEService(user_data, (serviceConnected)connected);
}
catch (...)
{
try
{
- service = new SEService(user_data);
+ service = new (std::nothrow)SEService(user_data);
}
catch (ExceptionBase &e)
{
var_response, response);
/* create new instance of channel */
- channel = new ClientChannel(session->context,
+ channel = new (std::nothrow)ClientChannel(session->context,
session, channel_id,
response, GUINT_TO_POINTER(channel_id));
if (channel != NULL) {
if (getReader()->isSecureElementPresent() == true) {
if (atr.isEmpty() == true) {
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;
closed = true;
closeChannels();
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;
var_response, response);
/* create new instance of channel */
- channel = new ClientChannel(context,
+ channel = new (std::nothrow)ClientChannel(context,
this, channel_number,
response, GUINT_TO_POINTER(channel_id));
if (channel != NULL) {
if (getReader()->isSecureElementPresent() == true) {
GVariant *var_aid;
- CallbackParam *param = new CallbackParam();
+ CallbackParam *param = new (std::nothrow)CallbackParam();
param->instance = this;
param->callback = (void *)callback;