private:
virtual void onStart() override;
- void onSimContactImport(int totalCount, int importedCount);
+ virtual void onCanceled() override;
+ bool onSimContactImport(int totalCount, int importedCount);
size_t m_TotalCount;
};
#include "Utils/Logger.h"
#include <contacts.h>
+#include <notification.h>
using namespace Contacts::Settings;
contacts_disconnect_on_thread();
}
+void ImportFromSimController::onCanceled()
+{
+ int err = notification_status_message_post(_("IDS_PB_SBODY_IMPORTING_CANCELLED_M_STATUS_ABB"));
+ WARN_IF_ERR(err, "notification_status_message_post() failed.");
+}
-void ImportFromSimController::onSimContactImport(int totalCount, int importedCount)
+bool ImportFromSimController::onSimContactImport(int totalCount, int importedCount)
{
if (!m_TotalCount) {
m_TotalCount = totalCount;
setTotalCount(totalCount);
}
- onProgress(importedCount);
+
+ return onProgress(importedCount);
}