monotone

monotone Mtn Source Tree

Root/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(rsa_keypair_id); // keyname@domain.you.own
37ATOMIC_NOVERIFY(rsa_pub_key); // some nice numbers
38ATOMIC_NOVERIFY(rsa_priv_key); // some nice numbers
39ATOMIC_NOVERIFY(old_arc4_rsa_priv_key); // ... in the old storage format
40ATOMIC_NOVERIFY(rsa_sha1_signature); // some other nice numbers
41ATOMIC_NOVERIFY(rsa_oaep_sha_data);
42
43// Special case: these classes need to befriend their verify functions.
44// See vocab.cc for details.
45
46// key for netsync session HMAC
47ATOMIC_HOOKED(netsync_session_key,
48 friend void verify(netsync_session_key &););
49// 160-bit SHA-1 HMAC
50ATOMIC_HOOKED(netsync_hmac_value,
51 friend void verify(netsync_hmac_value &););
52
53ATOMIC_NOVERIFY(attr_key);
54ATOMIC_NOVERIFY(attr_value);
55
56DECORATE(revision); // thing associated with a revision
57DECORATE(roster); // thing associated with a roster
58DECORATE(manifest); // thing associated with a manifest
59DECORATE(file); // thing associated with a file
60DECORATE(key); // thing associated with a key
61DECORATE(epoch); // thing associated with an epoch
62
63ENCODING_NOVERIFY(gzip); // thing which is gzipped
64ENCODING(hexenc); // thing which is hex-encoded
65ENCODING_NOVERIFY(base64); // thing which is base64-encoded
66
67ATOMIC_NOVERIFY(prefix); // raw encoding of a merkle tree prefix
68ATOMIC_NOVERIFY(merkle); // raw encoding of a merkle tree node
69
70// instantiate those bits of the template vocabulary actually in use.
71
72// decorations
73EXTERN template class epoch<id>;
74EXTERN template class file<id>;
75EXTERN template class key<id>;
76EXTERN template class manifest<id>;
77EXTERN template class revision<id>;
78EXTERN template class roster<id>;
79
80EXTERN template class epoch<data>;
81EXTERN template class file<data>;
82EXTERN template class manifest<data>;
83EXTERN template class revision<data>;
84EXTERN template class roster<data>;
85
86EXTERN template class file<delta>;
87EXTERN template class manifest<delta>;
88EXTERN template class roster<delta>;
89
90// encodings
91EXTERN template class hexenc<data>;
92EXTERN template class hexenc<id>;
93EXTERN template class hexenc<inodeprint>;
94EXTERN template class hexenc<prefix>;
95EXTERN template class hexenc<rsa_sha1_signature>;
96
97EXTERN template class base64<cert_value>;
98EXTERN template class base64<data>;
99EXTERN template class base64<merkle>;
100EXTERN template class base64<old_arc4_rsa_priv_key>;
101EXTERN template class base64<rsa_priv_key>;
102EXTERN template class base64<rsa_pub_key>;
103EXTERN template class base64<rsa_sha1_signature>;
104EXTERN template class base64<var_name>;
105EXTERN template class base64<var_value>;
106
107EXTERN template class gzip<data> ;
108EXTERN template class base64< gzip<data> >;
109
110EXTERN template class gzip<delta> ;
111EXTERN template class base64< gzip<delta> >;
112
113// Local Variables:
114// mode: C++
115// fill-column: 76
116// c-file-style: "gnu"
117// indent-tabs-mode: nil
118// End:
119// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
120

Archive Download this file

Branches

Tags

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