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(ace); // unknown string in ACE form
17ATOMIC(symbol); // valid basic io symbol (alphanumeric or _ chars)
18
19ATOMIC_NOVERIFY(id); // hash of data
20ATOMIC_NOVERIFY(data); // meaningless blob
21ATOMIC_NOVERIFY(delta); // xdelta between 2 datas
22ATOMIC_NOVERIFY(inodeprint); // fingerprint of an inode
23
24ATOMIC_NOVERIFY(branch_name); // utf-8
25ATOMIC_NOVERIFY(globish); // kinda like a glob, see globish.hh (also, utf-8)
26
27ATOMIC(cert_name); // symbol-of-your-choosing
28ATOMIC_NOVERIFY(cert_value); // symbol-of-your-choosing
29
30// some domains: "database" (+ default_server, default_pattern),
31// server_key (+ servername/key)
32// branch_alias (+ short form/long form)
33// trust_seed (+ branch/seed)
34ATOMIC_NOVERIFY(var_domain); // symbol-of-your-choosing
35ATOMIC_NOVERIFY(var_name); // symbol-of-your-choosing
36ATOMIC_NOVERIFY(var_value); // symbol-of-your-choosing
37
38ATOMIC(rsa_keypair_id); // keyname@domain.you.own
39ATOMIC_NOVERIFY(rsa_pub_key); // some nice numbers
40ATOMIC_NOVERIFY(rsa_priv_key); // some nice numbers
41ATOMIC_NOVERIFY(rsa_sha1_signature); // some other nice numbers
42ATOMIC_NOVERIFY(rsa_oaep_sha_data);
43
44ATOMIC(netsync_session_key); // key for netsync session HMAC
45ATOMIC(netsync_hmac_value); // 160-bit SHA-1 HMAC
46
47ATOMIC_NOVERIFY(attr_key);
48ATOMIC_NOVERIFY(attr_value);
49
50DECORATE(revision); // thing associated with a revision
51DECORATE(roster); // thing associated with a roster
52DECORATE(manifest); // thing associated with a manifest
53DECORATE(file); // thing associated with a file
54DECORATE(key); // thing associated with a key
55DECORATE(epoch); // thing associated with an epoch
56
57ENCODING(gzip); // thing which is gzipped
58ENCODING(hexenc); // thing which is hex-encoded
59ENCODING(base64); // thing which is base64-encoded
60ENCODING(arc4); // thing which is arc4-encrypted
61
62ATOMIC_NOVERIFY(prefix); // raw encoding of a merkle tree prefix
63ATOMIC_NOVERIFY(merkle); // raw encoding of a merkle tree node
64
65// instantiate those bits of the template vocabulary actually in use.
66
67EXTERN template class hexenc<id>;
68EXTERN template class revision< hexenc<id> >;
69EXTERN template class roster< hexenc<id> >;
70EXTERN template class manifest< hexenc<id> >;
71EXTERN template class file< hexenc<id> >;
72EXTERN template class key< hexenc<id> >;
73EXTERN template class epoch< hexenc<id> >;
74
75EXTERN template class hexenc<inodeprint>;
76
77EXTERN template class hexenc<data>;
78EXTERN template class epoch< hexenc<data> >;
79
80EXTERN template class gzip<data>;
81EXTERN template class base64< gzip<data> >;
82
83EXTERN template class revision< data >;
84EXTERN template class roster< data >;
85EXTERN template class manifest< data >;
86EXTERN template class file< data >;
87
88EXTERN template class gzip<delta>;
89EXTERN template class base64< gzip<delta> >;
90
91EXTERN template class roster< delta >;
92EXTERN template class manifest< delta >;
93EXTERN template class file< delta >;
94
95EXTERN template class arc4<rsa_priv_key>;
96EXTERN template class base64< arc4<rsa_priv_key> >;
97EXTERN template class base64< rsa_pub_key >;
98EXTERN template class base64< rsa_priv_key >;
99EXTERN template class base64< rsa_sha1_signature >;
100EXTERN template class hexenc< rsa_sha1_signature >;
101EXTERN template class base64< cert_value >;
102
103EXTERN template class base64< var_name >;
104EXTERN template class base64< var_value >;
105
106EXTERN template class hexenc<prefix>;
107EXTERN template class base64<merkle>;
108EXTERN template class base64<data>;
109
110// instantiate those bits of the stream operator vocab (again) actually in
111// use. "again" since stream operators are friends, not members.
112
113EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc<id> const &);
114EXTERN template std::ostream & operator<< <>(std::ostream &, revision< hexenc<id> > const &);
115EXTERN template std::ostream & operator<< <>(std::ostream &, roster< hexenc<id> > const &);
116EXTERN template std::ostream & operator<< <>(std::ostream &, manifest< hexenc<id> > const &);
117EXTERN template std::ostream & operator<< <>(std::ostream &, file< hexenc<id> > const &);
118EXTERN template std::ostream & operator<< <>(std::ostream &, epoch< hexenc<id> > const &);
119
120EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc<inodeprint> const &);
121
122EXTERN template std::ostream & operator<< <>(std::ostream &, roster<data> const &);
123EXTERN template std::ostream & operator<< <>(std::ostream &, manifest<data> const &);
124
125EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc<data> const &);
126EXTERN template std::ostream & operator<< <>(std::ostream &, epoch< hexenc<data> > const &);
127
128EXTERN template std::ostream & operator<< <>(std::ostream &, gzip<data> const &);
129EXTERN template std::ostream & operator<< <>(std::ostream &, base64< gzip<data> > const &);
130EXTERN template std::ostream & operator<< <>(std::ostream &, revision< base64< gzip<data> > > const &);
131EXTERN template std::ostream & operator<< <>(std::ostream &, manifest< base64< gzip<data> > > const &);
132EXTERN template std::ostream & operator<< <>(std::ostream &, file< base64< gzip<data> > > const &);
133
134EXTERN template std::ostream & operator<< <>(std::ostream &, gzip<delta> const &);
135EXTERN template std::ostream & operator<< <>(std::ostream &, base64< gzip<delta> > const &);
136EXTERN template std::ostream & operator<< <>(std::ostream &, manifest< base64< gzip<delta> > > const &);
137EXTERN template std::ostream & operator<< <>(std::ostream &, file< base64< gzip<delta> > > const &);
138
139EXTERN template std::ostream & operator<< <>(std::ostream &, arc4<rsa_priv_key> const &);
140EXTERN template std::ostream & operator<< <>(std::ostream &, base64< arc4<rsa_priv_key> > const &);
141EXTERN template std::ostream & operator<< <>(std::ostream &, base64< rsa_pub_key > const &);
142EXTERN template std::ostream & operator<< <>(std::ostream &, base64< rsa_sha1_signature > const &);
143EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc< rsa_sha1_signature > const &);
144EXTERN template std::ostream & operator<< <>(std::ostream &, base64< cert_value > const &);
145
146EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc<prefix> const &);
147EXTERN template std::ostream & operator<< <>(std::ostream &, base64<merkle> const &);
148
149
150// Local Variables:
151// mode: C++
152// fill-column: 76
153// c-file-style: "gnu"
154// indent-tabs-mode: nil
155// End:
156// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
157

Archive Download this file

Branches

Tags

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