/* * Copyright (c) 2011, Mika Laitio. * * This program is licensed under the terms and conditions of the * Apache License, version 2.0. The full text of the Apache License is at * http://www.apache.org/licenses/LICENSE-2.0 * */ #include #include #include "VCardDirectoryImporter.h" int main(int argc, char *argv[]) { int ret_val; int err_flg; QCoreApplication application(argc, argv); VCardDirectoryImporter importer; ret_val = EXIT_FAILURE; if (application.arguments().count() >= 2) { err_flg = importer.importVCardsDirectoryContacts(application.arguments().at(1)); if (err_flg == 0) { importer.saveContacts(); ret_val = application.exec(); } } else { qDebug() << "Error, directory containing v-card contact files (*.vcr) not specified."; qDebug() << "Please, give the v-card directory as a first parameter for the application."; } return ret_val; }