aboutsummaryrefslogtreecommitdiff
path: root/src/gnunet_chat_invitation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnunet_chat_invitation.c')
-rw-r--r--src/gnunet_chat_invitation.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/gnunet_chat_invitation.c b/src/gnunet_chat_invitation.c
index 44f7787..9562daa 100644
--- a/src/gnunet_chat_invitation.c
+++ b/src/gnunet_chat_invitation.c
@@ -24,14 +24,24 @@
24 24
25#include "gnunet_chat_invitation.h" 25#include "gnunet_chat_invitation.h"
26 26
27void 27struct GNUNET_CHAT_Invitation*
28GNUNET_CHAT_invitation_accept (struct GNUNET_CHAT_Invitation *invitation) 28invitation_create_from_message (struct GNUNET_CHAT_Context *context,
29 const struct GNUNET_MESSENGER_MessageInvite *message)
29{ 30{
30 //TODO 31 struct GNUNET_CHAT_Invitation *invitation = GNUNET_new(struct GNUNET_CHAT_Invitation);
32
33 invitation->context = context;
34
35 GNUNET_memcpy(&(invitation->key), &(message->key), sizeof(invitation->key));
36 invitation->door = GNUNET_PEER_intern(&(message->door));
37
38 return invitation;
31} 39}
32 40
33void 41void
34GNUNET_CHAT_invitation_decline (struct GNUNET_CHAT_Invitation *invitation) 42invitation_destroy (struct GNUNET_CHAT_Invitation *invitation)
35{ 43{
36 //TODO 44 GNUNET_PEER_decrement_rcs(&(invitation->door), 1);
45
46 GNUNET_free(invitation);
37} 47}