From 46480df047fb9edbb58cf6c4da7f251c88442cce Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Sun, 9 Sep 2012 13:24:31 +2000 Subject: [PATCH] Re: [PATCH 05/11] lib: add ability to store recipients in message structure --- 01/dd3f73a2458d5e506190f0b1f7ecd7e88e5a30 | 161 ++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 01/dd3f73a2458d5e506190f0b1f7ecd7e88e5a30 diff --git a/01/dd3f73a2458d5e506190f0b1f7ecd7e88e5a30 b/01/dd3f73a2458d5e506190f0b1f7ecd7e88e5a30 new file mode 100644 index 000000000..e68db91da --- /dev/null +++ b/01/dd3f73a2458d5e506190f0b1f7ecd7e88e5a30 @@ -0,0 +1,161 @@ +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 29B9F431FC0 + for ; Sat, 8 Sep 2012 10:24:39 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 QusqGVHkNkGp for ; + Sat, 8 Sep 2012 10:24:37 -0700 (PDT) +Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU + [18.9.25.12]) + by olra.theworths.org (Postfix) with ESMTP id E08F7431FAF + for ; Sat, 8 Sep 2012 10:24:33 -0700 (PDT) +X-AuditID: 1209190c-b7fd26d0000008d9-83-504b7f519174 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP + id EF.5B.02265.15F7B405; Sat, 8 Sep 2012 13:24:33 -0400 (EDT) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q88HOXa4020245; + Sat, 8 Sep 2012 13:24:33 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q88HOWRL026365 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Sat, 8 Sep 2012 13:24:33 -0400 (EDT) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1TAOlj-00061h-Se; Sat, 08 Sep 2012 13:24:31 -0400 +Date: Sat, 8 Sep 2012 13:24:31 -0400 +From: Austin Clements +To: Jameson Graef Rollins +Subject: Re: [PATCH 05/11] lib: add ability to store recipients in message + structure +Message-ID: <20120908172431.GA22240@mit.edu> +References: <1345427570-26518-1-git-send-email-jrollins@finestructure.net> + <1345427570-26518-2-git-send-email-jrollins@finestructure.net> + <1345427570-26518-3-git-send-email-jrollins@finestructure.net> + <1345427570-26518-4-git-send-email-jrollins@finestructure.net> + <1345427570-26518-5-git-send-email-jrollins@finestructure.net> + <1345427570-26518-6-git-send-email-jrollins@finestructure.net> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <1345427570-26518-6-git-send-email-jrollins@finestructure.net> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT1w2s9w4w2HZO1WLPPi+L6zdnMjsw + edw9zeXxbNUt5gCmKC6blNSczLLUIn27BK6MZ7fPMxdMFK1Yf3wWUwPjeoEuRg4OCQETif3H + zLoYOYFMMYkL99azdTFycQgJ7GOU+NG1jhnCWc8oMef0NBYI5wSTxKPL+6DKljBKbJr8iAWk + n0VARaJ5SQOYzSagIbFt/3JGEFtEwEyi58sfMJtZQEti68YPYLawQJhE85EZbCA2r4COxNXD + u1ghhvYzS2w6/4oFIiEocXLmExaY5hv/XjKB3M0sIC2x/B8HSJhTwFvi3KN97CC2KNANU05u + Y5vAKDQLSfcsJN2zELoXMDKvYpRNya3SzU3MzClOTdYtTk7My0st0jXUy80s0UtNKd3ECApq + TkmeHYxvDiodYhTgYFTi4d0g5xUgxJpYVlyZe4hRkoNJSZR3d413gBBfUn5KZUZicUZ8UWlO + avEhRgkOZiUR3uvpQDnelMTKqtSifJiUNAeLkjjv5ZSb/kIC6YklqdmpqQWpRTBZGQ4OJQne + 8jqgRsGi1PTUirTMnBKENBMHJ8hwHqDhK0FqeIsLEnOLM9Mh8qcYFaXEeVeAJARAEhmleXC9 + sKTzilEc6BVh3mqQKh5gwoLrfgU0mAlosMgzD5DBJYkIKakGxoX6E3gF0rfZ9/18aqj2oVb/ + QfBspZB2Q02WKRe3br88WcW5+MRf1qaDpVyPLkw6ay3NecKDg+P8YeM87bdzdZ2K+otqD7Vk + rBD7W8u6acLRfi2PpvN/GEUmGNWm3TsyQfBPkah/wdPrwo4fhG9UuGddsArs73tWcOPbqdj8 + 3Qv+7zj49t+xn0osxRmJhlrMRcWJAAOqUgsVAwAA +Cc: Notmuch Mail +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: Sat, 08 Sep 2012 17:24:39 -0000 + +Quoth Jameson Graef Rollins on Aug 19 at 6:52 pm: +> Added as a string, in parallel to the authors element. +> --- +> lib/message.cc | 18 ++++++++++++++++++ +> lib/notmuch-private.h | 9 +++++++++ +> 2 files changed, 27 insertions(+) +> +> diff --git a/lib/message.cc b/lib/message.cc +> index 978de06..fa28073 100644 +> --- a/lib/message.cc +> +++ b/lib/message.cc +> @@ -36,6 +36,7 @@ struct visible _notmuch_message { +> notmuch_string_list_t *filename_term_list; +> notmuch_string_list_t *filename_list; +> char *author; +> + char *recipients; +> notmuch_message_file_t *message_file; +> notmuch_message_list_t *replies; +> unsigned long flags; +> @@ -109,6 +110,7 @@ _notmuch_message_create_for_document (const void *talloc_owner, +> message->filename_list = NULL; +> message->message_file = NULL; +> message->author = NULL; +> + message->recipients = NULL; +> +> message->replies = _notmuch_message_list_create (message); +> if (unlikely (message->replies == NULL)) { +> @@ -808,6 +810,22 @@ notmuch_message_set_author (notmuch_message_t *message, +> return; +> } +> +> +const char * +> +notmuch_message_get_recipients (notmuch_message_t *message) +> +{ +> + return message->recipients; +> +} +> + +> +void +> +notmuch_message_set_recipients (notmuch_message_t *message, +> + const char *recipients) +> +{ +> + if (message->recipients) +> + talloc_free(message->recipients); +> + message->recipients = talloc_strdup(message, recipients); + +Missing spaces before parameter lists. + +> + return; +> +} +> + +> void +> _notmuch_message_set_header_values (notmuch_message_t *message, +> const char *date, +> diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h +> index bfb4111..27a41b6 100644 +> --- a/lib/notmuch-private.h +> +++ b/lib/notmuch-private.h +> @@ -325,6 +325,15 @@ notmuch_message_set_author (notmuch_message_t *message, const char *author); +> const char * +> notmuch_message_get_author (notmuch_message_t *message); +> +> +/* Set the recipients of 'message' - this is the representation used +> + * when displaying the message */ +> +void +> +notmuch_message_set_recipients (notmuch_message_t *message, const char *recipients); +> + +> +/* Get the authors of 'message' */ +> +const char * +> +notmuch_message_get_recipients (notmuch_message_t *message); +> + +> +> /* index.cc */ +> + +-- +Austin Clements MIT/'06/PhD/CSAIL +amdragon@mit.edu http://web.mit.edu/amdragon + Somewhere in the dream we call reality you will find me, + searching for the reality we call dreams. -- 2.26.2