From 5c8de8b69bc223f38a31f62a701f276d17b740c9 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 2 Nov 2013 20:15:16 +2100 Subject: [PATCH] [PATCH] lib: update documentation of callback functions for database_compact and database_upgrade. --- 04/bfb739d7536c534ddaf10481d9d3afc0cf2b5a | 95 +++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 04/bfb739d7536c534ddaf10481d9d3afc0cf2b5a diff --git a/04/bfb739d7536c534ddaf10481d9d3afc0cf2b5a b/04/bfb739d7536c534ddaf10481d9d3afc0cf2b5a new file mode 100644 index 000000000..c30cdcc7b --- /dev/null +++ b/04/bfb739d7536c534ddaf10481d9d3afc0cf2b5a @@ -0,0 +1,95 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 79A52431FAF + for ; Fri, 1 Nov 2013 16:15:50 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id bZPffedN-E3g for ; + Fri, 1 Nov 2013 16:15:46 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 6D17A431FAE + for ; Fri, 1 Nov 2013 16:15:46 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1VcNwK-0002BP-Ty; Fri, 01 Nov 2013 20:15:40 -0300 +Received: (nullmailer pid 5441 invoked by uid 1000); Fri, 01 Nov 2013 + 23:15:35 -0000 +From: david@tethera.net +To: notmuch@notmuchmail.org +Subject: [PATCH] lib: update documentation of callback functions for + database_compact and database_upgrade. +Date: Fri, 1 Nov 2013 20:15:16 -0300 +Message-Id: <1383347716-5375-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.8.4.rc3 +In-Reply-To: + <2a58adbdc1257f16579692544b4bcbadca3d3045.1383315568.git.jani@nikula.org> +References: + <2a58adbdc1257f16579692544b4bcbadca3d3045.1383315568.git.jani@nikula.org> +Cc: David Bremner +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 01 Nov 2013 23:15:50 -0000 + +From: David Bremner + +Compact was missing callback documentation entirely, and upgrade did not discuss the +closure parameter. +--- +This patch depends on + + id:2a58adbdc1257f16579692544b4bcbadca3d3045.1383315568.git.jani@nikula.org + +BTW, I didn't completely understand the remark about SONAME bumps; +since we're providing new symbols, it doesn't really matter what the +signature is? + + lib/notmuch.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/notmuch.h b/lib/notmuch.h +index cd301a4..82fd599 100644 +--- a/lib/notmuch.h ++++ b/lib/notmuch.h +@@ -227,6 +227,9 @@ typedef void (*notmuch_compact_status_cb_t)(const char *message, void *closure); + * The database will be opened with NOTMUCH_DATABASE_MODE_READ_WRITE + * during the compaction process to ensure no writes are made. + * ++ * If the optional callback function 'status_cb' is non-NULL, it will ++ * be called with diagnostic and informational messages. The argument ++ * 'closure' is passed verbatim to any callback invoked. + */ + notmuch_status_t + notmuch_database_compact (const char* path, +@@ -270,7 +273,8 @@ notmuch_database_needs_upgrade (notmuch_database_t *database); + * provide progress indication to the user. If non-NULL it will be + * called periodically with 'progress' as a floating-point value in + * the range of [0.0 .. 1.0] indicating the progress made so far in +- * the upgrade process. ++ * the upgrade process. The argument 'closure' is passed verbatim to ++ * any callback invoked. + */ + notmuch_status_t + notmuch_database_upgrade (notmuch_database_t *database, +-- +1.8.4.rc3 + -- 2.26.2