/* notmuch - Not much of an email program, (just index and search) * * Copyright © 2013 Peter Wang * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see http://www.gnu.org/licenses/ . * * Author: Peter Wang */ #include "notmuch-client.h" int notmuch_insert_command (void *ctx, int argc, char *argv[]) { notmuch_config_t *config; notmuch_database_t *notmuch; const char *db_path; config = notmuch_config_open (ctx, NULL, NULL); if (config == NULL) return 1; db_path = notmuch_config_get_database_path (config); if (notmuch_database_open (notmuch_config_get_database_path (config), NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much)) return 1; notmuch_database_destroy (notmuch); return 1; }