Re: [PATCH 05/11] lib: add ability to store recipients in message structure
authorAustin Clements <amdragon@MIT.EDU>
Sat, 8 Sep 2012 17:24:31 +0000 (13:24 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:26 +0000 (09:49 -0800)
01/dd3f73a2458d5e506190f0b1f7ecd7e88e5a30 [new file with mode: 0644]

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