diff options
Diffstat (limited to 'src/gnunet_chat_handle.h')
-rw-r--r-- | src/gnunet_chat_handle.h | 72 |
1 files changed, 50 insertions, 22 deletions
diff --git a/src/gnunet_chat_handle.h b/src/gnunet_chat_handle.h index 837a16e..b287336 100644 --- a/src/gnunet_chat_handle.h +++ b/src/gnunet_chat_handle.h | |||
@@ -30,10 +30,7 @@ | |||
30 | #include <gnunet/gnunet_container_lib.h> | 30 | #include <gnunet/gnunet_container_lib.h> |
31 | #include <gnunet/gnunet_arm_service.h> | 31 | #include <gnunet/gnunet_arm_service.h> |
32 | #include <gnunet/gnunet_fs_service.h> | 32 | #include <gnunet/gnunet_fs_service.h> |
33 | #include <gnunet/gnunet_gns_service.h> | ||
34 | #include <gnunet/gnunet_identity_service.h> | ||
35 | #include <gnunet/gnunet_messenger_service.h> | 33 | #include <gnunet/gnunet_messenger_service.h> |
36 | #include <gnunet/gnunet_reclaim_service.h> | ||
37 | #include <gnunet/gnunet_regex_service.h> | 34 | #include <gnunet/gnunet_regex_service.h> |
38 | #include <gnunet/gnunet_util_lib.h> | 35 | #include <gnunet/gnunet_util_lib.h> |
39 | 36 | ||
@@ -53,31 +50,62 @@ struct GNUNET_CHAT_Handle | |||
53 | struct GNUNET_FS_Handle *fs; | 50 | struct GNUNET_FS_Handle *fs; |
54 | 51 | ||
55 | /* | 52 | /* |
56 | * required: (names can be resolved as well as zones and members) | ||
57 | */ | ||
58 | struct GNUNET_GNS_Handle *gns; | ||
59 | |||
60 | /* | ||
61 | * optional: (if not anonymous to receive private key) | ||
62 | * (has to be reset as soon as the private key changes) | ||
63 | */ | ||
64 | struct GNUNET_IDENTITY_Handle *identity; | ||
65 | |||
66 | /* | ||
67 | * required! | 53 | * required! |
68 | */ | 54 | */ |
69 | struct GNUNET_MESSENGER_Handle *messenger; | 55 | struct GNUNET_MESSENGER_Handle *messenger; |
70 | |||
71 | /* | ||
72 | * feature/optional: (maybe add new reclaim message kind?) | ||
73 | * (the message would automatically issue the ticket) | ||
74 | * (send the ticket and consume it) | ||
75 | */ | ||
76 | struct GNUNET_RECLAIM_Handle *reclaim; | ||
77 | } handles; | 56 | } handles; |
78 | 57 | ||
79 | struct GNUNET_CONTAINER_MultiHashMap *contacts; | 58 | struct { |
59 | struct GNUNET_CONTAINER_MultiShortmap *short_map; | ||
60 | struct GNUNET_CONTAINER_MultiHashMap *hash_map; | ||
61 | } contacts; | ||
62 | |||
80 | struct GNUNET_CONTAINER_MultiHashMap *groups; | 63 | struct GNUNET_CONTAINER_MultiHashMap *groups; |
64 | struct GNUNET_CONTAINER_MultiHashMap *contexts; | ||
65 | struct GNUNET_CONTAINER_MultiHashMap *files; | ||
66 | |||
67 | GNUNET_CHAT_ContextMessageCallback msg_cb; | ||
68 | void *msg_cls; | ||
69 | |||
70 | GNUNET_CHAT_WarningCallback warn_cb; | ||
71 | void *warn_cls; | ||
81 | }; | 72 | }; |
82 | 73 | ||
74 | int | ||
75 | handle_update_chat_contact (struct GNUNET_CHAT_Handle *handle, | ||
76 | struct GNUNET_CHAT_Contact *chatContact, | ||
77 | int removeContact); | ||
78 | |||
79 | int | ||
80 | handle_update_chat_group (struct GNUNET_CHAT_Handle *handle, | ||
81 | struct GNUNET_CHAT_Group *chatGroup, | ||
82 | int removeGroup); | ||
83 | |||
84 | int | ||
85 | handle_update_chat_context (struct GNUNET_CHAT_Handle *handle, | ||
86 | struct GNUNET_CHAT_Context *context, | ||
87 | int removeContext); | ||
88 | |||
89 | int | ||
90 | handle_update_chat_file (struct GNUNET_CHAT_Handle *handle, | ||
91 | struct GNUNET_CHAT_File *file, | ||
92 | int removeFile); | ||
93 | |||
94 | struct GNUNET_CHAT_Contact* | ||
95 | handle_get_chat_contact (struct GNUNET_CHAT_Handle *handle, | ||
96 | const struct GNUNET_MESSENGER_Contact *contact); | ||
97 | |||
98 | void | ||
99 | handle_set_chat_contact (struct GNUNET_CHAT_Handle *handle, | ||
100 | const struct GNUNET_MESSENGER_Contact *contact, | ||
101 | struct GNUNET_CHAT_Contact *chatContact); | ||
102 | |||
103 | struct GNUNET_CHAT_Context* | ||
104 | handle_get_chat_context (struct GNUNET_CHAT_Handle *handle, | ||
105 | const struct GNUNET_HashCode *key); | ||
106 | |||
107 | struct GNUNET_CHAT_File* | ||
108 | handle_get_chat_file (struct GNUNET_CHAT_Handle *handle, | ||
109 | const struct GNUNET_HashCode *hash); | ||
110 | |||
83 | #endif /* GNUNET_CHAT_HANDLE_H_ */ | 111 | #endif /* GNUNET_CHAT_HANDLE_H_ */ |