-
Notifications
You must be signed in to change notification settings - Fork 292
/
notes.h
45 lines (39 loc) · 1.04 KB
/
notes.h
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
#ifndef NOTE_TYPES
#define NOTE_TYPES
#include <stdbool.h>
enum note_type {
NOTE_TYPE_NONE = -1,
NOTE_TYPE_AMEX,
NOTE_TYPE_BANK,
NOTE_TYPE_CREDIT,
NOTE_TYPE_DATABASE,
NOTE_TYPE_DRIVERS_LICENSE,
NOTE_TYPE_EMAIL,
NOTE_TYPE_HEALTH_INSURANCE,
NOTE_TYPE_IM,
NOTE_TYPE_INSURANCE,
NOTE_TYPE_MASTERCARD,
NOTE_TYPE_MEMBERSHIP,
NOTE_TYPE_PASSPORT,
NOTE_TYPE_SERVER,
NOTE_TYPE_SOFTWARE_LICENSE,
NOTE_TYPE_SSH_KEY,
NOTE_TYPE_SSN,
NOTE_TYPE_VISA,
NOTE_TYPE_WIFI,
NUM_NOTE_TYPES, /* keep last */
};
#define MAX_FIELD_CT 12
struct note_template {
const char *shortname;
const char *name;
const char *fields[MAX_FIELD_CT + 1];
};
extern struct note_template note_templates[];
const char *notes_get_name(enum note_type note_type);
bool note_field_is_multiline(enum note_type note_type, const char *field);
bool note_has_field(enum note_type note_type, const char *field);
enum note_type notes_get_type_by_shortname(const char *shortname);
enum note_type notes_get_type_by_name(const char *type_str);
char *note_type_usage();
#endif /* NOTE_TYPES */