gnunet-service-messenger.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. This file is part of GNUnet.
  3. Copyright (C) 2020 GNUnet e.V.
  4. GNUnet is free software: you can redistribute it and/or modify it
  5. under the terms of the GNU Affero General Public License as published
  6. by the Free Software Foundation, either version 3 of the License,
  7. or (at your option) any later version.
  8. GNUnet is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. SPDX-License-Identifier: AGPL3.0-or-later
  15. */
  16. /**
  17. * @author Tobias Frisch
  18. * @file src/messenger/gnunet-service-messenger.h
  19. * @brief GNUnet MESSENGER service
  20. */
  21. #ifndef GNUNET_SERVICE_MESSENGER_H
  22. #define GNUNET_SERVICE_MESSENGER_H
  23. #include "platform.h"
  24. #include "gnunet_cadet_service.h"
  25. #include "gnunet_container_lib.h"
  26. #include "gnunet_crypto_lib.h"
  27. #include "gnunet_identity_service.h"
  28. #include "gnunet_mq_lib.h"
  29. #include "gnunet_peer_lib.h"
  30. #include "gnunet_protocols.h"
  31. #include "gnunet_util_lib.h"
  32. /**
  33. * Message to create a handle for a client
  34. */
  35. struct GNUNET_MESSENGER_CreateMessage
  36. {
  37. struct GNUNET_MessageHeader header;
  38. };
  39. /**
  40. * Message to update the handle (its EGO key) for a client
  41. */
  42. struct GNUNET_MESSENGER_UpdateMessage
  43. {
  44. struct GNUNET_MessageHeader header;
  45. };
  46. /**
  47. * Message to destroy the handle for a client
  48. */
  49. struct GNUNET_MESSENGER_DestroyMessage
  50. {
  51. struct GNUNET_MessageHeader header;
  52. };
  53. /**
  54. * Message to receive the current name of a handle
  55. */
  56. struct GNUNET_MESSENGER_NameMessage
  57. {
  58. struct GNUNET_MessageHeader header;
  59. };
  60. /**
  61. * Message to receive the current public key of a handle
  62. */
  63. struct GNUNET_MESSENGER_KeyMessage
  64. {
  65. struct GNUNET_MessageHeader header;
  66. struct GNUNET_IDENTITY_PublicKey pubkey;
  67. };
  68. /**
  69. * General message to confirm interaction with a room
  70. */
  71. struct GNUNET_MESSENGER_RoomMessage
  72. {
  73. struct GNUNET_MessageHeader header;
  74. struct GNUNET_PeerIdentity door;
  75. struct GNUNET_HashCode key;
  76. };
  77. /**
  78. * Message to receive the current member id of a handle in room
  79. */
  80. struct GNUNET_MESSENGER_MemberMessage
  81. {
  82. struct GNUNET_MessageHeader header;
  83. struct GNUNET_HashCode key;
  84. struct GNUNET_ShortHashCode id;
  85. };
  86. /**
  87. * Message to send something into a room
  88. */
  89. struct GNUNET_MESSENGER_SendMessage
  90. {
  91. struct GNUNET_MessageHeader header;
  92. struct GNUNET_HashCode key;
  93. };
  94. /**
  95. * Message to receive something from a room
  96. */
  97. struct GNUNET_MESSENGER_RecvMessage
  98. {
  99. struct GNUNET_MessageHeader header;
  100. struct GNUNET_HashCode key;
  101. struct GNUNET_HashCode hash;
  102. };
  103. #endif //GNUNET_SERVICE_MESSENGER_H