monotone

monotone Mtn Source Tree

Root/src/vocab_terms.hh

1// Copyright (C) 2002 Graydon Hoare <graydon@pobox.com>
2//
3// This program is made available under the GNU GPL version 2.0 or
4// greater. See the accompanying file COPYING for details.
5//
6// This program is distributed WITHOUT ANY WARRANTY; without even the
7// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8// PURPOSE.
9
10// this fragment is included into both vocab.hh and vocab.cc,
11// in order to facilitate external instantiation of most of the
12// vocabulary, minimize code duplication, speed up compilation, etc.
13
14ATOMIC_NOVERIFY(external); // "external" string in unknown system charset
15ATOMIC_NOVERIFY(utf8); // unknown string in UTF8 charset
16ATOMIC(symbol); // valid basic io symbol (alphanumeric or _ chars)
17
18ATOMIC_BINARY(id); // hash of data
19ATOMIC_NOVERIFY(data); // meaningless blob
20ATOMIC_NOVERIFY(delta); // xdelta between 2 datas
21ATOMIC_NOVERIFY(inodeprint); // fingerprint of an inode
22
23ATOMIC_NOVERIFY(branch_name); // utf-8
24
25ATOMIC(cert_name); // symbol-of-your-choosing
26ATOMIC_NOVERIFY(cert_value); // symbol-of-your-choosing
27
28// some domains: "database" (+ default_server, default_pattern),
29// server_key (+ servername/key)
30// branch_alias (+ short form/long form)
31// trust_seed (+ branch/seed)
32ATOMIC_NOVERIFY(var_domain); // symbol-of-your-choosing
33ATOMIC_NOVERIFY(var_name); // symbol-of-your-choosing
34ATOMIC_NOVERIFY(var_value); // symbol-of-your-choosing
35
36ATOMIC(key_name); // keyname@domain.you.own
37ATOMIC_NOVERIFY(external_key_name); // maybe a key_name, maybe a key_id
38ATOMIC_NOVERIFY(rsa_pub_key); // some nice numbers
39ATOMIC_NOVERIFY(rsa_priv_key); // some nice numbers
40ATOMIC_NOVERIFY(old_arc4_rsa_priv_key); // ... in the old storage format
41ATOMIC_NOVERIFY(rsa_sha1_signature); // some other nice numbers
42ATOMIC_NOVERIFY(rsa_oaep_sha_data);
43
44// Special case: these classes need to befriend their verify functions.
45// See vocab.cc for details.
46
47// key for netsync session HMAC
48ATOMIC_HOOKED(netsync_session_key,
49 friend void verify(netsync_session_key &););
50// 160-bit SHA-1 HMAC
51ATOMIC_HOOKED(netsync_hmac_value,
52 friend void verify(netsync_hmac_value &););
53
54ATOMIC_NOVERIFY(attr_key);
55ATOMIC_NOVERIFY(attr_value);
56
57DECORATE(revision); // thing associated with a revision
58DECORATE(roster); // thing associated with a roster
59DECORATE(manifest); // thing associated with a manifest
60DECORATE(file); // thing associated with a file
61DECORATE(key); // thing associated with a key
62DECORATE(epoch); // thing associated with an epoch
63
64ENCODING_NOVERIFY(gzip); // thing which is gzipped
65ENCODING(hexenc); // thing which is hex-encoded
66ENCODING_NOVERIFY(base64); // thing which is base64-encoded
67
68ATOMIC_NOVERIFY(prefix); // raw encoding of a merkle tree prefix
69ATOMIC_NOVERIFY(merkle); // raw encoding of a merkle tree node
70
71// instantiate those bits of the template vocabulary actually in use.
72
73// decorations
74EXTERN template class epoch<id>;
75EXTERN template class file<id>;
76EXTERN template class key<id>;
77EXTERN template class manifest<id>;
78EXTERN template class revision<id>;
79EXTERN template class roster<id>;
80
81EXTERN template class epoch<data>;
82EXTERN template class file<data>;
83EXTERN template class manifest<data>;
84EXTERN template class revision<data>;
85EXTERN template class roster<data>;
86
87EXTERN template class file<delta>;
88EXTERN template class manifest<delta>;
89EXTERN template class roster<delta>;
90
91// encodings
92EXTERN template class hexenc<data>;
93EXTERN template class hexenc<id>;
94EXTERN template class hexenc<inodeprint>;
95EXTERN template class hexenc<prefix>;
96EXTERN template class hexenc<rsa_sha1_signature>;
97
98EXTERN template class base64<cert_value>;
99EXTERN template class base64<data>;
100EXTERN template class base64<merkle>;
101EXTERN template class base64<old_arc4_rsa_priv_key>;
102EXTERN template class base64<rsa_priv_key>;
103EXTERN template class base64<rsa_pub_key>;
104EXTERN template class base64<rsa_sha1_signature>;
105EXTERN template class base64<var_name>;
106EXTERN template class base64<var_value>;
107
108EXTERN template class gzip<data> ;
109EXTERN template class base64< gzip<data> >;
110
111EXTERN template class gzip<delta> ;
112EXTERN template class base64< gzip<delta> >;
113
114// Local Variables:
115// mode: C++
116// fill-column: 76
117// c-file-style: "gnu"
118// indent-tabs-mode: nil
119// End:
120// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status