splitting 'struct GNUNET_CRYPTO_EccPublicKey' into one struct for signing and another...
[oweals/gnunet.git] / src / psycstore / psycstore.h
1 /*
2      This file is part of GNUnet.
3      (C) 2013 Christian Grothoff (and other contributing authors)
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public Liceidentity as published
7      by the Free Software Foundation; either version 3, or (at your
8      option) any later version.
9
10      GNUnet is distributed in the hope that it will be useful, but
11      WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      General Public Liceidentity for more details.
14
15      You should have received a copy of the GNU General Public Liceidentity
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20
21 /**
22  * @file psycstore/psycstore.h
23  * @brief Common type definitions for the PSYCstore service and API.
24  * @author Gabor X Toth
25  */
26
27 #ifndef PSYCSTORE_H
28 #define PSYCSTORE_H
29
30 #include "gnunet_common.h"
31
32
33 GNUNET_NETWORK_STRUCT_BEGIN
34
35 /**
36  * Answer from service to client about last operation.
37  */
38 struct ResultCodeMessage
39 {
40   /**
41    * Type: GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_CODE
42    */
43   struct GNUNET_MessageHeader header;
44
45   /**
46    * Status code for the last operation, in NBO.
47    * (currently not used).
48    */
49   uint32_t result_code GNUNET_PACKED;
50
51   /* followed by 0-terminated error message (on error) */
52
53 };
54
55
56 /**
57  * @see GNUNET_PSYCSTORE_membership_store()
58  */
59 struct MembershipStoreMessage
60 {
61   const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key;
62   const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key;
63   int did_join;
64   uint64_t announced_at;
65   uint64_t effective_since;
66   uint64_t group_generation;
67 };
68
69
70 /**
71  * @see GNUNET_PSYCSTORE_membership_test()
72  */
73 struct MembershipTestMessage
74 {
75   const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key;
76   const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key;
77   uint64_t message_id;
78   uint64_t group_generation;
79 };
80
81 GNUNET_NETWORK_STRUCT_END
82
83 #endif