unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob b381b8e8f0ea206eab75400f7470eb28e4cbf622 1443 bytes (raw)
name: tag-util.h 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 
#ifndef _TAG_UTIL_H
#define _TAG_UTIL_H

#include "notmuch-client.h"

typedef struct {
    const char *tag;
    notmuch_bool_t remove;
} tag_operation_t;

#define TAG_OP_LIST_INITIAL_SIZE 10

typedef struct {
    tag_operation_t *ops;
    int count;
    int size;
} tag_op_list_t;

/* Use powers of 2 */
typedef enum  { TAG_FLAG_NONE = 0,
		TAG_FLAG_MAILDIR_SYNC = 1,
		TAG_FLAG_REMOVE_ALL = 2 } tag_op_flag_t;


typedef int (*tag_callback_t)(void *ctx,
			      notmuch_database_t *notmuch,
			      const char *query_string,
			      tag_op_list_t *tag_ops,
			      tag_op_flag_t flags);

int
parse_tag_stream (void *ctx,
		  notmuch_database_t *notmuch,
		  FILE *input,
		  tag_callback_t callback,
		  tag_op_flag_t flags,
		  volatile sig_atomic_t *interrupted);

/*
 * Returns: 0 for OK, 1 for skipped line, -1 for fatal(ish) error.
 */
int
parse_tag_line (void *ctx, char *line, char **query_str, tag_op_list_t *ops);

tag_op_list_t
*tag_op_list_create (void *ctx);

int
tag_op_list_append (void *ctx,
		    tag_op_list_t *list,
		    const char *tag,
		    notmuch_bool_t remove);

notmuch_status_t
tag_op_list_apply (notmuch_message_t *message,
		   tag_op_list_t *tag_ops,
		   tag_op_flag_t flags);

int
tag_op_list_from_string (void *ctx,
			 char *tag_string,
			 notmuch_bool_t remove,
			 tag_op_list_t *tag_ops);

notmuch_bool_t
tag_op_list_empty (tag_op_list_t *list);

void
tag_op_list_reset (tag_op_list_t *list);

#endif

debug log:

solving b381b8e ...
found b381b8e in https://yhetil.org/notmuch/1353265498-3839-9-git-send-email-david@tethera.net/

applying [1/1] https://yhetil.org/notmuch/1353265498-3839-9-git-send-email-david@tethera.net/
diff --git a/tag-util.h b/tag-util.h
new file mode 100644
index 0000000..b381b8e

Checking patch tag-util.h...
Applied patch tag-util.h cleanly.

index at:
100644 b381b8e8f0ea206eab75400f7470eb28e4cbf622	tag-util.h

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).